It works but the output is broken :)

master
Caleb Fontenot 2024-03-21 17:08:36 +07:00
parent 39b0da17b9
commit 118d95a69d
219 changed files with 7927 additions and 0 deletions

7
.gitignore vendored

@ -92,3 +92,10 @@
/Semester 3/Assignments/Templates01_CalebFontenot/target/
/Semester 3/Assignments/MaxTask/target/
/Semester 3/Assignments/MP1_Ajax/target/
/Semester 3/Assignments/templates4_2/target/
/Semester 3/Assignments/functions/build/
/Semester 3/Assignments/functions/dist/
/Semester 3/Assignments/AjaxReview/target/
/Semester 3/Assignments/TermProject1_CalebFontenot/target/
/Semester 3/Assignments/params/target/
/Semester 3/Assignments/templatesMatricesSample/target/

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>10-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>gfv700ee10</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
<org-netbeans-modules-projectapi.jsf_2e_language>Facelets</org-netbeans-modules-projectapi.jsf_2e_language>
<netbeans.hint.jdkPlatform>JDK_15__System_</netbeans.hint.jdkPlatform>
</properties>
</project-shared-configuration>

@ -0,0 +1,48 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>asdv</groupId>
<artifactId>AjaxReview</artifactId>
<version>1</version>
<packaging>war</packaging>
<name>AjaxReview-1</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jakartaee>10.0.0</jakartaee>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>${jakartaee}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>13.0.3</version>
<classifier>jakarta</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,13 @@
package asdv.ajaxreview;
import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
/**
* Configures Jakarta RESTful Web Services for the application.
* @author Juneau
*/
@ApplicationPath("resources")
public class JakartaRestConfiguration extends Application {
}

@ -0,0 +1,20 @@
package asdv.ajaxreview.resources;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Response;
/**
*
* @author
*/
@Path("jakartaee10")
public class JakartaEE10Resource {
@GET
public Response ping(){
return Response
.ok("ping Jakarta EE")
.build();
}
}

@ -0,0 +1,40 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package beans;
import jakarta.inject.Named;
import jakarta.enterprise.context.RequestScoped;
/**
*
* @author asdv5
*/
@Named(value = "ajax1")
@RequestScoped
public class Ajax1
{
private String input1;
private String input2;
public String getInput1()
{
return input1;
}
public void setInput1(String input1)
{
this.input1 = input1;
}
public String getInput2()
{
return input2;
}
public void setInput2(String input2)
{
this.input2 = input2;
}
}

@ -0,0 +1,78 @@
package beans;
import jakarta.enterprise.context.RequestScoped;
import jakarta.faces.application.FacesMessage;
import jakarta.inject.Named;
import utilities.Utilities;
@Named(value = "ajax2")
@RequestScoped
public class Ajax2
{
private String farheneitTemperature;
private String celciusTemperature = "default value";
private String testInput;
private String miles;
public Ajax2()
{
System.out.println("-----------------------------------------constructor Ajax2()");
}
public String getTestInput()
{
return this.testInput;
}
public void setTestInput( String testInput)
{
System.out.println("testInput setter called");
this.testInput = testInput;
}
public String getMiles()
{
return miles;
}
public void setMiles(String miles)
{
System.out.println("miles: " + miles);
this.miles = miles;
}
public String milesToKilometers()
{
if ( this.miles == null )
return null;
double miles = Double.parseDouble( this.miles );
double km = miles * 1.65;
return String.valueOf(km);
}
public String getFarheneitTemperature(){return farheneitTemperature;}
public void setFarheneitTemperature(String farheneitTemperature)
{
System.out.println("setFarheneitTemperature: " + farheneitTemperature);
this.farheneitTemperature = farheneitTemperature;
this.celciusTemperature = convertFtoC();
Utilities.addMessage(FacesMessage.SEVERITY_INFO, farheneitTemperature, celciusTemperature);
}
public String getCelciusTemperature(){
return celciusTemperature;}
private String convertFtoC()
{
double f = Double.parseDouble( this.farheneitTemperature );
double c = (f - 32) * ( 5.0 / 9.0);
System.out.println("far: " + this.farheneitTemperature);
System.out.println("convert " + c);
celciusTemperature = String.valueOf(c);
return celciusTemperature;
}
}

@ -0,0 +1,73 @@
package beans;
import java.util.logging.Level;
import java.util.logging.Logger;
import jakarta.enterprise.context.RequestScoped;
import jakarta.inject.Named;
@Named(value = "ajax3")
@RequestScoped
public class Ajax3
{
private static final Logger logger
= Logger.getLogger(Ajax3.class.getName());
private String firstName = "default";
private String lastName;
private String phone;
private String age;
private String address;
public Ajax3()
{
logger.log(Level.INFO, "Ajax3 constructor called" );
}
public String getFirstName()
{
return firstName;
}
public void setFirstName(String firstName)
{
this.firstName = firstName;
}
public String getLastName()
{
return lastName;
}
public void setLastName(String lastName)
{
this.lastName = lastName;
}
public String getPhone()
{
return phone;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getAge()
{
return age;
}
public void setAge(String age)
{
this.age = age;
}
public String getAddress()
{
return address;
}
public void setAddress(String address)
{
this.address = address;
}
public void ajaxAction(String executeNrender)
{
System.out.println(executeNrender);
logger.log(Level.INFO, "First Name = {0}", this.firstName);
logger.log(Level.INFO, "Last Name = {0}", this.lastName);
logger.log(Level.INFO, "Phone = {0}", this.phone);
logger.log(Level.INFO, "Age = {0}", this.age);
logger.log(Level.INFO, "Address = {0}", this.address);
System.out.println("--------------------------------------");
}
}

@ -0,0 +1,73 @@
package beans;
import jakarta.inject.Named;
import jakarta.enterprise.context.SessionScoped;
import java.io.Serializable;
import jakarta.faces.application.FacesMessage;
import jakarta.faces.event.AbortProcessingException;
import jakarta.faces.event.AjaxBehaviorEvent;
import utilities.Utilities;
@Named(value = "ajax5")
@SessionScoped
public class Ajax5 implements Serializable
{
private boolean buttonRed = false;
private String input;
public void mouseOverListener(AjaxBehaviorEvent event)
throws AbortProcessingException
{
System.out.println("mouseOverListener");
setButtonRed(true);
Utilities.addMessage(FacesMessage.SEVERITY_INFO, "mouseOverListener", "red = true, input=" + input);
}
public void mouseOutListener(AjaxBehaviorEvent event)
throws AbortProcessingException
{
System.out.println("mouseOutListener");
setButtonRed(false);
Utilities.addMessage(FacesMessage.SEVERITY_INFO, "mouseOutListener", "red = false, input=" + input);
}
public String getInput()
{
return input;
}
public void setInput(String input)
{
this.input = input;
}
public boolean isButtonRed()
{
return buttonRed;
}
public void setButtonRed(boolean buttonRed)
{
this.buttonRed = buttonRed;
}
public void actionMethod()
{
Utilities.addMessage(FacesMessage.SEVERITY_INFO, "actionMethod()", "input=" + input);
}
}

@ -0,0 +1,44 @@
package beans;
import jakarta.inject.Named;
import jakarta.enterprise.context.SessionScoped;
import java.io.Serializable;
import jakarta.faces.application.FacesMessage;
import jakarta.faces.event.AbortProcessingException;
import jakarta.faces.event.AjaxBehaviorEvent;
import utilities.Utilities;
/**
*
* @author ASDV2
*/
@Named(value = "ajax6")
@SessionScoped
public class Ajax6 implements Serializable
{
private int brand = 0;
public int getBrand()
{
return brand;
}
public void setBrand(int brand)
{
this.brand = brand;
}
public void clickListener(AjaxBehaviorEvent event)
throws AbortProcessingException
{
Utilities.addMessage(FacesMessage.SEVERITY_INFO, "clickListener", "brand= "+ brand);
}
public void changeListener(AjaxBehaviorEvent event)
throws AbortProcessingException
{
Utilities.addMessage(FacesMessage.SEVERITY_INFO, "changeListener", "brand= "+ brand);
}
}

@ -0,0 +1,60 @@
package beans;
import jakarta.enterprise.context.RequestScoped;
import jakarta.faces.application.FacesMessage;
import jakarta.inject.Named;
import utilities.Utilities;
@Named(value = "ajax7")
@RequestScoped
public class Ajax7
{
private String farheneitTemperature;
private String celciusTemperature;
private String miles;
public String getMiles()
{
return miles;
}
public void setMiles(String miles)
{
this.miles = miles;
}
public String milesToKilometers()
{
if ( this.miles == null || "".equals(miles) )
return null;
double miles = Double.parseDouble( this.miles );
double km = miles * 1.65;
return String.valueOf(km);
}
public String getFarheneitTemperature(){return farheneitTemperature;}
public void setFarheneitTemperature(String farheneitTemperature)
{
this.farheneitTemperature = farheneitTemperature;
this.celciusTemperature = convertFtoC();
Utilities.addMessage(FacesMessage.SEVERITY_INFO, farheneitTemperature, celciusTemperature);
}
public String getCelciusTemperature(){
return celciusTemperature;}
private String convertFtoC()
{
if ( "".equals(this.farheneitTemperature ) ||farheneitTemperature == null )
return "";
double f = Double.parseDouble( this.farheneitTemperature );
double c = (f - 32) * ( 5.0 / 9.0);
celciusTemperature = String.valueOf(c);
return celciusTemperature;
}
}

@ -0,0 +1,47 @@
package utilities;
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
import jakarta.faces.application.FacesMessage;
import jakarta.faces.context.FacesContext;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
/**
*
* @author asdv5
*/
public class Utilities
{
public static String simpleDateFormat( Date date)
{
if ( date == null )
return null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd hh:mm");
String s = sdf.format( date);
return s;
}
public static void addMessage(FacesMessage.Severity severity, String summary, String detail)
{
FacesMessage msg = new FacesMessage(severity, summary, detail);
FacesContext.getCurrentInstance().addMessage(null, msg);
}
public static void clearAllMessages()
{
FacesContext context = FacesContext.getCurrentInstance();
Iterator<FacesMessage> it = context.getMessages();
while (it.hasNext())
{
it.next();
it.remove();
}
}
}

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="3.0" xmlns="https://jakarta.ee/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd">
<!-- Define Persistence Unit -->
<persistence-unit name="my_persistence_unit">
</persistence-unit>
</persistence>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="all">
</beans>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="6.0" xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd">
<context-param>
<param-name>jakarta.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
<mime-mapping>
<extension>eot</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
<mime-mapping>
<extension>otf</extension>
<mime-type>font/opentype</mime-type>
</mime-mapping>
<mime-mapping>
<extension>ttf</extension>
<mime-type>application/x-font-ttf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>woff</extension>
<mime-type>application/x-font-woff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>woff2</extension>
<mime-type>application/x-font-woff2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svg</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
</web-app>

@ -0,0 +1,37 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="jakarta.faces.html"
xmlns:f="jakarta.faces.core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>ajax1</title>
</h:head>
<h:body>
<h3> Ajax tag embedded</h3>
<h4> On event keyup we execute/process this and we render one ID</h4>
<h:form>
<p:panelGrid columns="2" style="width: 50%">
<h:inputText id="inputName1"
value="#{ajax1.input1}">
<f:ajax event="keyup" execute="@this"
render="id_out1"
/>
</h:inputText>
<h:outputText id="id_out1" value="#{ajax1.input1}" />
<p:inputText id="inputName2"
value="#{ajax1.input2}">
<p:ajax event="keyup" process="@this"
update="id_out2"
/>
</p:inputText>
<p:outputLabel id="id_out2" value="#{ajax1.input2}" />
</p:panelGrid>
</h:form>
</h:body>
</html>

@ -0,0 +1,95 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>ajax2</title>
</h:head>
<h:body>
<h3> Ajax tag embedded -- Temperature Converter</h3>
<h4> event keyup reg-ex validation and multi-render with nested IDs. No need to specify IDs of parents</h4>
1. The Ajax2 constructor is called once, even though we have 2 h:forms, upon rendering. ( see Glassfish Log and line 20 of Ajax2.java)
<br/><br/>
2. Upon entering numbers in h:form id="idForm1" at LINE 34, we execute the inputText and we render all
ids that exits within h:form id="idForm1". We cannot render IDs outside this form.
We CANNOT render outPutText id_nested_cField2
<br/><br/>
3. Upon entering numbers in h:form id="idForm2" at LINE 51, we execute the inputText and we render all
ids that exists within h:form id="idForm2".
We CAN render outputText id_nested_cField2 becuase it is in within the form idForm2.
<br/><br/>
4. Upon every number typed in inputText id="id_in1" of form id="idForm1"
the constructor of the bean is called , then its setter. The output to celcius and the grown are called when we render.
<br/><br/>
5. The nested ID= id_nested_cField2 can be accessed only from with form
id="idForm2"
<br/><br/>
6. The command button of id=id_cm2 only updates the upper form with id="idForm1", because it has ajax=true
while the command button id=id_cm2 updates both upper and lpwer form forms
<h:form id="idForm1" >
<p:growl id="id_growl1" showDetail="true" showSummary="true"
life="4000"
redisplay="false"/>
<h:inputText id="id_in1" value="#{ajax2.farheneitTemperature}">
<f:ajax event="keyup" execute="@this"
render="cField1
id_nested_cField2
id_growl1" />
<f:validateRegex pattern = "[-+]?[0-9]*\.?[0-9]"/>
</h:inputText><br/>
<h:outputText value="Temperature in Celsius: #{ajax2.celciusTemperature}"
id="cField3"/>
<br/>
<p:commandButton id="id_cm1" ajax="true" value="send only this form because ajax=true" update="id_growl1"/>
</h:form>
<h:form id="idForm2" >
<p:growl id="id_growl2" showDetail="true" showSummary="true"
life="4000"
redisplay="false"/>
<p:panelGrid id="pg1" style="width: 100%" >
<p:column style="width: 100%">
<p:panelGrid id="pg2">
<p:column><h2> nested Ids</h2> </p:column>
<p:column>
<h2>
<h:outputText value="#{ajax2.celciusTemperature}"
id="id_nested_cField2"/>
</h2>
</p:column>
</p:panelGrid>
</p:column>
</p:panelGrid>
<br/>
<h:inputText value="#{ajax2.farheneitTemperature}">
<f:ajax event="keyup" execute="@this"
render="cField1
id_nested_cField2
d_growl2" />
<f:validateRegex pattern = "[-+]?[0-9]*\.?[0-9]"/>
</h:inputText><br/>
<h2>
Temperature in Celsius:
<h:outputText value="#{ajax2.celciusTemperature}"
id="cField1"/>
</h2>
<p:commandButton id="id_cm2" ajax="false" value="send all forms becuase ajax=false" update="id_growl"/>
</h:form>
</h:body>
</html>

@ -0,0 +1,126 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>ajax3</title>
</h:head>
<h:body>
1. constructor of ajax3 bean called once upon rending
<br/> <br/>
2. Test all cases one by one and see the outputs
<hr/>
AJAX - execute=form a render=@form
<h:form>
First Name <h:inputText value="#{ajax3.firstName}"/>
Last Name <h:inputText value="#{ajax3.lastName}"/>
Phone: <h:inputText value="#{ajax3.phone}"/>
Age: <h:inputText value="#{ajax3.age}"/>
Address: <h:inputText value="#{ajax3.address}"/>
<h:commandButton value="Say Hello" action='#{ajax3.ajaxAction("execute=form a render=@form")}'>
<f:ajax execute="@form" render="@form"/>
</h:commandButton>
<h:panelGrid columns="6">
<h:outputText style="font-weight: bold;" value="@form"/>
<h:outputText style="color:red;" value="First Name: #{ajax3.firstName}"/>
<h:outputText style="color:blue;" value="Last Name: #{ajax3.lastName}"/>
<h:outputText style="color:green;" value="Phone: #{ajax3.phone}"/>
<h:outputText style="color:brown;" value="Age: #{ajax3.age}"/>
<h:outputText style="color: blueviolet" value="Address: #{ajax3.address}"/>
</h:panelGrid>
</h:form>
<br/>
<hr/>
AJAX - execute=@none , render=@form
<h:form>
First Name: <h:inputText value="#{ajax3.firstName}"/>
Last Name: <h:inputText value="#{ajax3.lastName}"/>
Phone: <h:inputText value="#{ajax3.phone}"/>
Age: <h:inputText value="#{ajax3.age}"/>
Address: <h:inputText value="#{ajax3.address}"/>
<h:commandButton value="Say Hello" action="#{ajax3.ajaxAction('execute=@none render=@form')}">
<f:ajax execute="@none" render="@form"/>
</h:commandButton>
<h:panelGrid columns="6">
<h:outputText style="font-weight: bold;" value="@form"/>
<h:outputText style="color:red;" value="First Name: #{ajax3.firstName}"/>
<h:outputText style="color:blue;" value="Last Name: #{ajax3.lastName}"/>
<h:outputText style="color:green;" value="Phone: #{ajax3.phone}"/>
<h:outputText style="color:brown;" value="Age: #{ajax3.age}"/>
<h:outputText style="color: blueviolet" value="Address: #{ajax3.address}"/>
</h:panelGrid>
</h:form>
<br/>
<hr/>
AJAX - execute=@this render=@form
<h:form>
First Name <h:inputText value="#{ajax3.firstName}"/>
Last Name <h:inputText value="#{ajax3.lastName}"/>
Phone: <h:inputText value="#{ajax3.phone}"/>
Age: <h:inputText value="#{ajax3.age}"/>
Address: <h:inputText value="#{ajax3.address}"/>
<h:commandButton value="Say Hello" action='#{ajax3.ajaxAction("execute=@this render=@form")}'>
<f:ajax execute="@this" render="@form"/>
</h:commandButton>
<hr/>
<h:panelGrid columns="6">
<h:outputText style="font-weight: bold;" value="@this"/>
<h:outputText value="Name: #{ajax3.firstName}"/>
<h:outputText value="Surname: #{ajax3.lastName}"/>
<h:outputText value="Phone: #{ajax3.phone}"/>
<h:outputText value="Age: #{ajax3.age}"/>
<h:outputText value="Address: #{ajax3.address}"/>
</h:panelGrid>
</h:form>
<br/>
<hr/>
AJAX - identifiers
<h:form>
First Name <h:inputText value="#{ajax3.firstName}"/>
Last Name <h:inputText id="nameInputId" value="#{ajax3.lastName}"/>
Phone: <h:inputText id="phoneInputId" value="#{ajax3.phone}"/>
Age: <h:inputText value="#{ajax3.age}"/>
Address: <h:inputText id="addressInputId" value="#{ajax3.address}"/>
<h:commandButton value="Say Hello" action="#{ajax3.ajaxAction('identifiers')}">
<f:ajax execute="nameInputId phoneInputId addressInputId" render="nameOutputId phoneOutputId ageOutputId"/>
</h:commandButton>
<hr/>
<h:panelGrid columns="6">
<h:outputText style="font-weight: bold;" value="identifiers"/>
<h:outputText style="color:red;" value="First Name: #{ajax3.firstName}"/>
<h:outputText id="nameOutputId" style="color:blue;" value="Last Name: #{ajax3.lastName}"/>
<h:outputText id="phoneOutputId" style="color:green;" value="Phone: #{ajax3.phone}"/>
<h:outputText id="ageOutputId" style="color:brown;" value="Age: #{ajax3.age}"/>
<h:outputText style="color: blueviolet" value="Address: #{ajax3.address}"/>
</h:panelGrid>
</h:form>
<br/>
<hr/>
AJAX - execute=@all render=@all
<hr/>
<h:form>
First Name <h:inputText value="#{ajax3.firstName}"/>
Last Name <h:inputText value="#{ajax3.lastName}"/>
Phone: <h:inputText value="#{ajax3.phone}"/>
Age: <h:inputText value="#{ajax3.age}"/>
Address: <h:inputText value="#{ajax3.address}"/>
<h:commandButton value="Say Hello" action="#{ajax3.ajaxAction('execute=@all render=@all')}">
<f:ajax execute="@all" render="@all"/>
</h:commandButton>
<hr/>
<h:panelGrid columns="6">
<h:outputText style="font-weight: bold;" value="@all"/>
<h:outputText style="color:red;" value="First Name: #{ajax3.firstName}"/>
<h:outputText style="color:blue;" value="Last Name: #{ajax3.lastName}"/>
<h:outputText style="color:green;" value="Phone: #{ajax3.phone}"/>
<h:outputText style="color:brown;" value="Age: #{ajax3.age}"/>
<h:outputText style="color: blueviolet" value="Address: #{ajax3.address}"/>
</h:panelGrid>
</h:form>
</h:body>
</html>

@ -0,0 +1,123 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>ajax4</title>
</h:head>
<h:body>
<hr/>
AJAX - process=form a update=@form
<h:form>
First Name <p:inputText style="width: 80px;" value="#{ajax3.firstName}"/>
Last Name <p:inputText style="width: 80px;" value="#{ajax3.lastName}"/>
Phone: <p:inputText style="width: 80px;" value="#{ajax3.phone}"/>
Age: <p:inputText style="width: 80px;" value="#{ajax3.age}"/>
Address: <p:inputText style="width: 80px;" value="#{ajax3.address}"/>
<p:commandButton value="Say Hello" action='#{ajax3.ajaxAction("process=form a update=@form")}'>
<p:ajax process="@form" update="@form"/>
</p:commandButton>
<p:panelGrid columns="6">
<p:outputLabel style="font-weight: bold;" value="@form"/>
<p:outputLabel style="color:red;" value="First Name: #{ajax3.firstName}"/>
<p:outputLabel style="color:blue;" value="Last Name: #{ajax3.lastName}"/>
<p:outputLabel style="color:green;" value="Phone: #{ajax3.phone}"/>
<p:outputLabel style="color:brown;" value="Age: #{ajax3.age}"/>
<p:outputLabel style="color: blueviolet" value="Address: #{ajax3.address}"/>
</p:panelGrid>
</h:form>
<br/>
<hr/>
AJAX - process=@none , update=@form
<h:form>
First Name: <p:inputText value="#{ajax3.firstName}"/>
Last Name: <p:inputText value="#{ajax3.lastName}"/>
Phone: <p:inputText value="#{ajax3.phone}"/>
Age: <p:inputText value="#{ajax3.age}"/>
Address: <p:inputText value="#{ajax3.address}"/>
<p:commandButton value="Say Hello" action="#{ajax3.ajaxAction('process=@none update=@form')}">
<p:ajax process="@none" update="@form"/>
</p:commandButton>
<p:panelGrid columns="6">
<h:outputLabel style="font-weight: bold;" value="@form"/>
<h:outputLabel style="color:red;" value="First Name: #{ajax3.firstName}"/>
<h:outputLabel style="color:blue;" value="Last Name: #{ajax3.lastName}"/>
<h:outputLabel style="color:green;" value="Phone: #{ajax3.phone}"/>
<h:outputLabel style="color:brown;" value="Age: #{ajax3.age}"/>
<h:outputLabel style="color: blueviolet" value="Address: #{ajax3.address}"/>
</p:panelGrid>
</h:form>
<br/>
<hr/>
AJAX - process=@this update=@form
<h:form>
First Name <p:inputText value="#{ajax3.firstName}"/>
Last Name <p:inputText value="#{ajax3.lastName}"/>
Phone: <p:inputText value="#{ajax3.phone}"/>
Age: <p:inputText value="#{ajax3.age}"/>
Address: <p:inputText value="#{ajax3.address}"/>
<p:commandButton value="Say Hello" action='#{ajax3.ajaxAction("process=@this update=@form")}'>
<p:ajax process="@this" update="@form"/>
</p:commandButton>
<hr/>
<h:panelGrid columns="6">
<h:outputLabel style="font-weight: bold;" value="@this"/>
<h:outputLabel value="Name: #{ajax3.firstName}"/>
<h:outputLabel value="Surname: #{ajax3.lastName}"/>
<h:outputLabel value="Phone: #{ajax3.phone}"/>
<h:outputLabel value="Age: #{ajax3.age}"/>
<h:outputLabel value="Address: #{ajax3.address}"/>
</h:panelGrid>
</h:form>
<br/>
<hr/>
AJAX - identifiers
<h:form>
First Name <p:inputText value="#{ajax3.firstName}"/>
Last Name <p:inputText id="nameInputId" value="#{ajax3.lastName}"/>
Phone: <p:inputText id="phoneInputId" value="#{ajax3.phone}"/>
Age: <p:inputText value="#{ajax3.age}"/>
Address: <p:inputText id="addressInputId" value="#{ajax3.address}"/>
<p:commandButton value="Say Hello" action="#{ajax3.ajaxAction('identifiers')}">
<p:ajax process="nameInputId phoneInputId addressInputId" update="nameOutputId phoneOutputId ageOutputId"/>
</p:commandButton>
<hr/>
<h:panelGrid columns="6">
<h:outputLabel style="font-weight: bold;" value="identifiers"/>
<h:outputLabel style="color:red;" value="First Name: #{ajax3.firstName}"/>
<h:outputLabel id="nameOutputId" style="color:blue;" value="Last Name: #{ajax3.lastName}"/>
<h:outputLabel id="phoneOutputId" style="color:green;" value="Phone: #{ajax3.phone}"/>
<h:outputLabel id="ageOutputId" style="color:brown;" value="Age: #{ajax3.age}"/>
<h:outputLabel style="color: blueviolet" value="Address: #{ajax3.address}"/>
</h:panelGrid>
</h:form>
<br/>
<hr/>
AJAX - process=@all update=@all
<hr/>
<h:form>
First Name <p:inputText value="#{ajax3.firstName}"/>
Last Name <p:inputText value="#{ajax3.lastName}"/>
Phone: <p:inputText value="#{ajax3.phone}"/>
Age: <p:inputText value="#{ajax3.age}"/>
Address: <p:inputText value="#{ajax3.address}"/>
<p:commandButton value="Say Hello" action="#{ajax3.ajaxAction('process=@all update=@all')}">
<p:ajax process="@all" update="@all"/>
</p:commandButton>
<hr/>
<h:panelGrid columns="6">
<h:outputLabel style="font-weight: bold;" value="@all"/>
<h:outputLabel style="color:red;" value="First Name: #{ajax3.firstName}"/>
<h:outputLabel style="color:blue;" value="Last Name: #{ajax3.lastName}"/>
<h:outputLabel style="color:green;" value="Phone: #{ajax3.phone}"/>
<h:outputLabel style="color:brown;" value="Age: #{ajax3.age}"/>
<h:outputLabel style="color: blueviolet" value="Address: #{ajax3.address}"/>
</h:panelGrid>
</h:form>
</h:body>
</html>

@ -0,0 +1,36 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>ajax5</title>
</h:head>
<h:body >
1.When an Ajax event triggers in the button, then it calls its listener AND the action method
<br/><br/>
2. In Order to send the form you must use f:ajax execute="@form" render="@form", line 25
<br/><br/>
<h:form>
<p:growl id="id_growl" showDetail="true" showSummary="true"
life="2000"
redisplay="false"/>
<h:inputText value="#{ajax5.input}"/>
<br/>
<h:commandButton value="Send form"
style="#{ajax5.buttonRed?'background-color:red':'background-color:yellow'}"
action="#{ajax5.actionMethod()}">
<f:ajax execute="@form" render="@form" />
<f:ajax event="mouseover" execute="@this" render="@this id_growl"
listener="#{ajax5.mouseOverListener}" />
<f:ajax event="mouseout" execute="@this" render="@this id_growl"
listener="#{ajax5.mouseOutListener}" />
</h:commandButton>
</h:form >
</h:body>
</html>

@ -0,0 +1,42 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>ajax6</title>
</h:head>
<h:body>
<h3> Valid event names you may use : blur, change, click, dblclick, focus, keydown, keypress, keyup, mousedown, mousemove, mouseout, mouseover, mouseup, valueChange.</h3>
<br/>
1. When it makes sense you can add events as needed and listeners for them.
<br/> <br/>
<h:form>
<p:growl id="id_growl1" showDetail="true" showSummary="true"
life="2000"
redisplay="false"/>
<p:growl id="id_growl2" showDetail="true" showSummary="true"
life="6000"
redisplay="false"/>
<h:selectOneMenu value="#{ajax6.brand}" id="brandID" >
<f:ajax event="change" execute="@this" render=" id_growl2"
listener="#{ajax6.changeListener}" />
<f:ajax event="click" execute="@this" render=" id_growl1"
listener="#{ajax6.clickListener}" />
<f:selectItem itemLabel="Ford" itemValue="1" />
<f:selectItem itemLabel="Chevy" itemValue="2" />
<f:selectItem itemLabel="Fiat" itemValue="3" />
<f:selectItem itemLabel="Honda" itemValue="4" />
<f:selectItem itemLabel="Opel" itemValue="5" />
<f:selectItem itemLabel="VW" itemValue="6" />
</h:selectOneMenu>
</h:form >
</h:body>
</html>

@ -0,0 +1,53 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:f5="http://xmlns.jcp.org/jsf/passthrough">
<h:head>
<title>ajax7</title>
</h:head>
<h:body>
<h2>1. Ajax tag as Wrapper, the keyup applies to all wrapped in it </h2>
<h2>2. Both inputs are validated and executed </h2>
<h:form>
<p:growl id="id_growl" showDetail="true" showSummary="true"
life="2000"
redisplay="false"/>
<f:ajax event="keyup" execute="tempID milesID"
render="cField kField id_growl" >
<h:inputText id="tempID"
f5:placeholder="Temperature in Fahrenheit"
value="#{ajax7.farheneitTemperature}">
<f:validateRegex pattern = "[0-9]*"/>
</h:inputText>
<br/><br/>
<h:inputText id="milesID"
f5:placeholder="Miles"
value="#{ajax7.miles}">
<f:validateRegex pattern = "[0-9]*"/>
</h:inputText>
</f:ajax>
<h2>
Temperature in Celsius:
<h:outputText value="#{ajax7.celciusTemperature}"
id="cField"/>
</h2>
<h2>
Kilometers:
<h:outputText value="#{ajax7.milesToKilometers()}"
id="kField"/>
</h2>
<h:commandButton value="Send to Server 2 inputs"> </h:commandButton>
</h:form>
</h:body>
</html>

@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Ajax in button</title>
</h:head>
<h:body>
<h:form>
<h:commandLink value="1. Ajax tag on event keyup one render" action="ajax1"/>
<br/><br/>
<h:commandLink value="2. Ajax tag on event keyup validation and multi-rendrer" action="ajax2"/>
<br/><br/>
<h:commandLink value="3. Ajax tag on command button -- all cases" action="ajax3"/>
<br/><br/>
<h:commandLink value="4. Ajax Primefaces tag on command button -- all cases" action="ajax4"/>
<br/><br/>
<h:commandLink value="5. Ajax tag one with multi-events multi-listeners" action="ajax5"/>
<br/><br/>
<h:commandLink value="6. Ajax tag select one menu" action="ajax6"/>
<br/><br/>
<h:commandLink value="7. Wrapper-Ajax tag on keyup" action="ajax7"/>
</h:form>
</h:body>
</html>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>10-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>gfv700ee10</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
<netbeans.hint.jdkPlatform>JDK_11__System_</netbeans.hint.jdkPlatform>
<org-netbeans-modules-projectapi.jsf_2e_language>Facelets</org-netbeans-modules-projectapi.jsf_2e_language>
</properties>
</project-shared-configuration>

@ -0,0 +1,48 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.slcc.asdv.caleb</groupId>
<artifactId>TermProject1_CalebFontenot</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>TermProject1_CalebFontenot-1.0-SNAPSHOT</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jakartaee>10.0.0</jakartaee>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>${jakartaee}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>13.0.5</version>
<classifier>jakarta</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,13 @@
package edu.slcc.asdv.caleb.termproject1_calebfontenot;
import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
/**
* Configures Jakarta RESTful Web Services for the application.
* @author Juneau
*/
@ApplicationPath("resources")
public class JakartaRestConfiguration extends Application {
}

@ -0,0 +1,24 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.beans;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import java.io.Serializable;
import java.util.ArrayList;
/**
*
* @author A. V. Markou
*/
@Named(value = "matrixBeanA")
@ViewScoped
public class MatrixBeanA implements Serializable
{
ArrayList<ArrayList<String>> matrix = new ArrayList<ArrayList<String>>();
}

@ -0,0 +1,26 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.beans;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import org.primefaces.PrimeFaces;
/**
*
* @author A. V. Markou
*/
@Named(value = "matrixBeanB")
@ViewScoped
public class MatrixBeanB implements Serializable
{
ArrayList<ArrayList<String>> matrix = new ArrayList<ArrayList<String>>();
}

@ -0,0 +1,24 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.beans;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
/**
*
* @author A. V. Markou
*/
@Named(value = "matrixBeanC")
@ViewScoped
public class MatrixBeanC implements Serializable
{
ArrayList<ArrayList<String>> matrix = new ArrayList<ArrayList<String>>();
}

@ -0,0 +1,42 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.beans;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import jakarta.inject.Inject;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.ArrayList;
/**
*
* @author A. V. Markou
*/
@Named(value = "matrixOperations")
@ViewScoped
public class MatrixOperations implements Serializable
{
@Inject
MatrixBeanA matrixA;
@Inject
MatrixBeanB matrixB;
@Inject
MatrixBeanC matrixC;
public String add(){return "";}
public String multiply(){return "";}
public MatrixBeanC getMatrixC(){return this.matrixC;}
public MatrixBeanA getMatrixA(){return matrixA;}
public MatrixBeanB getMatrixB(){return matrixB;}
}

@ -0,0 +1,64 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/JSF/JSFManagedBean.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.beans;
import jakarta.faces.application.FacesMessage;
import jakarta.faces.application.FacesMessage.Severity;
import jakarta.faces.context.FacesContext;
import jakarta.inject.Named;
import jakarta.faces.view.ViewScoped;
import jakarta.inject.Inject;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.primefaces.PrimeFaces;
@Named(value = "menuBar")
@ViewScoped
public class MenuBar implements Serializable
{
@Inject
MatrixOperations matrixOperations;
private List<List<Object>> menus = new ArrayList<List<Object>>();
public void add()
{
System.out.println("Menu multiply was called");
matrixOperations.multiply();
List<String> idsC = new ArrayList<>();
idsC.add("formC");
idsC.add("formC:datatableC");
idsC.add("formC:datatableC:columnsC");
idsC.add("formC:datatableC:columnsC:inputTextC");
//idsC.add("form-menu");//:menuBar:submenu_matricies:menuitem_add");
PrimeFaces.current().ajax().update(idsC);
}
public void multiply()
{
message(
FacesMessage.SEVERITY_INFO,
"Not implemented.", "To be implemented."
);
}
public void subtract()
{
message(
FacesMessage.SEVERITY_INFO,
"Not implemented.", "To be implemented."
);
}
public void message(Severity severity, String msg, String msgDetails)
{
FacesMessage m = new FacesMessage(severity, msg, msgDetails);
FacesContext.getCurrentInstance().addMessage("msg", m);
}
}

@ -0,0 +1,261 @@
package edu.slcc.asdv.bl;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.RecursiveTask;
/**
*
* @author A. V. Markou
*/
public class Matrices implements Matrix
{
@Override
public ArrayList<ArrayList<BigInteger>> addParallel(ArrayList<ArrayList<BigInteger>> A, ArrayList<ArrayList<BigInteger>> B)
{
RecursiveTask<ArrayList<ArrayList<BigInteger>>> rt
= new Matrices.MatricesAddition(0, A.size() - 1, A, B);
ForkJoinPool pool = new ForkJoinPool();
ArrayList<ArrayList<BigInteger>> result = pool.invoke(rt);
return result;
}
@Override
public ArrayList<ArrayList<BigInteger>> multiplyParallel(ArrayList<ArrayList<BigInteger>> A, ArrayList<ArrayList<BigInteger>> B)
{
RecursiveTask<ArrayList<ArrayList<BigInteger>>> rt
= new Matrices.MatricesMultiplication(0, A.size() - 1, A, B);
ForkJoinPool pool = new ForkJoinPool();
ArrayList<ArrayList<BigInteger>> result = pool.invoke(rt);
return result;
}
static class MatricesAddition extends RecursiveTask<ArrayList<ArrayList<BigInteger>>>
{
ArrayList<ArrayList<BigInteger>> A;
ArrayList<ArrayList<BigInteger>> B;
ArrayList<ArrayList<BigInteger>> AplusB;
final int HOW_MANY_ROWS_IN_PARALLEL = 100;//threshold
int startIndex;
int endIndex;
public MatricesAddition(int startIndex, int endIndex,
ArrayList<ArrayList<BigInteger>> A,
ArrayList<ArrayList<BigInteger>> B)
{
this.startIndex = startIndex;//start at this row of the matrix
this.endIndex = endIndex;//end at this row of the matrix
this.A = A;
this.B = B;
AplusB = new ArrayList<ArrayList<BigInteger>>();
}
@Override
protected ArrayList<ArrayList<BigInteger>> compute()
{
//>>This is the addition of matrices in the IF.
//That is, HOW_MANY_ROWS_IN_PARALLEL from matrix A and HOW_MANY_ROWS_IN_PARALLEL from matrix B
if (this.endIndex - this.startIndex < HOW_MANY_ROWS_IN_PARALLEL)
{
ArrayList<ArrayList<BigInteger>> resultC = new ArrayList<ArrayList<BigInteger>>();
for (int i = this.startIndex; i <= this.endIndex; ++i)
{
//>create a new row to add it to the resulting matrix resultC
ArrayList<BigInteger> rowAplusB = new ArrayList<BigInteger>();
for (int j = 0; j < A.get(0).size(); j++)
//>get the Ith row from A and the Ith row from B and
//and add all the Jth entries from each row
{
BigInteger x = A.get(i).get(j);
BigInteger y = B.get(i).get(j);
BigInteger z = x.add(y);
rowAplusB.add(z);
}
resultC.add(rowAplusB);
}
return resultC;
}
else
{ //>> keep on FORKING the matrix until the
//side of the matric is equal or less to HOW_MANY_ROWS_IN_PARALLEL
int mid = (this.endIndex + this.startIndex) / 2;
RecursiveTask<ArrayList<ArrayList<BigInteger>>> firstHalf
= new MatricesAddition(this.startIndex, mid, A, B);
RecursiveTask<ArrayList<ArrayList<BigInteger>>> secondHalf
= new MatricesAddition(mid + 1, this.endIndex, A, B);
firstHalf.fork();//this line will invoke method compute
secondHalf.fork();///this line will invoke method compute
//>> join what the FORKs returned from the IFs
AplusB.addAll(firstHalf.join());
AplusB.addAll(secondHalf.join());
return AplusB;
}
}
}
/**
* Multiples two lists one 1-t01 correspondence, that is the 1st element of
* the first list is multiplied with 1st elements of the second list and so
* on
*
* @param list1
* @param list2
* @return the multiplied results
*/
public static ArrayList<BigInteger> multiplyLists(ArrayList<BigInteger> list1, ArrayList<BigInteger> list2)
{
ArrayList<BigInteger> resultsOfMultiplications = new ArrayList<BigInteger>();
for (int bi = 0; bi < list1.size();
++bi)
{
resultsOfMultiplications.add(list1.get(bi).multiply(list2.get(bi)));
}
return resultsOfMultiplications;
}
public static ArrayList<ArrayList<BigInteger>> columnMajorOrderReversal(ArrayList<ArrayList<BigInteger>> b)
{
ArrayList<ArrayList<BigInteger>> tranformed = new ArrayList<ArrayList<BigInteger>>();
for (int column = 0;
column < b.get(0).size();
++column)
{
ArrayList<BigInteger> rowTrandormedToColmn = new ArrayList<BigInteger>();
for (int row = 0;
row < b.size();
++row)
{
BigInteger bd = b.get(row).get(column);
rowTrandormedToColmn.add(bd);
}
tranformed.add(rowTrandormedToColmn);
}
return tranformed;
}
/**
* Adds a list of Big Decimals and returns the result of the addition.
*
* @param list - list of BigDecimal type
* @return the sum of the list
*/
public static BigInteger add(ArrayList<BigInteger> list)
{
BigInteger bd = BigInteger.ZERO;
for (int bi = 0; bi < list.size();
bi++)
{
bd = bd.add(list.get(bi));
}
return bd;
}
static class MatricesMultiplication extends RecursiveTask<ArrayList<ArrayList<BigInteger>>>
{
ArrayList<ArrayList<BigInteger>> A;
ArrayList<ArrayList<BigInteger>> B;
ArrayList<ArrayList<BigInteger>> AxB;
final int HOW_MANY_ROWS_IN_PARALLEL = 3;//threshold
int startIndex;
int endIndex;
public MatricesMultiplication(int startIndex, int endIndex,
ArrayList<ArrayList<BigInteger>> A,
ArrayList<ArrayList<BigInteger>> B)
{
this.startIndex = startIndex;//start at this row of the matrix
this.endIndex = endIndex;//end at this row of the matrix
this.A = A;
this.B = B;
AxB = new ArrayList<ArrayList<BigInteger>>();
}
/**
* matrix 1, 2, 3 4, 5, 6
*
* will be transformed to 1, 4 2, 5 3, 6
*
* @param list
* @return
*/
@Override
protected ArrayList<ArrayList<BigInteger>> compute()
{
//>>This is the addition of matrices in the IF.
//That is, HOW_MANY_ROWS_IN_PARALLEL from matrix A and HOW_MANY_ROWS_IN_PARALLEL from matrix B
if (this.endIndex - this.startIndex < HOW_MANY_ROWS_IN_PARALLEL)
{
ArrayList<ArrayList<BigInteger>> resultC = new ArrayList<ArrayList<BigInteger>>();
ArrayList<ArrayList<BigInteger>> bTransformed = columnMajorOrderReversal(B);
for (int biA = this.startIndex;
biA <= this.endIndex;
++biA)
{
ArrayList<BigInteger> rowA = A.get(biA);
ArrayList<BigInteger> rowAxB = new ArrayList<BigInteger>();
ArrayList<BigInteger> rowCalculation = new ArrayList<BigInteger>();
for (int biB = 0;
biB < bTransformed.size();
++biB)
{
ArrayList<BigInteger> rowB = bTransformed.get(biB);
ArrayList<BigInteger> productsOfRow = multiplyLists(rowA, rowB);
BigInteger sumOfRow = add(productsOfRow);
rowCalculation.add(sumOfRow);
}
resultC.add(rowCalculation);
}
return resultC;
}
else
{ //>> keep on FORKING the matrix until the
//side of the matric is equal or less to HOW_MANY_ROWS_IN_PARALLEL
int mid = (this.startIndex + this.endIndex) / 2;
RecursiveTask<ArrayList<ArrayList<BigInteger>>> firstHalf
= new MatricesMultiplication(this.startIndex, mid, A, B);
RecursiveTask<ArrayList<ArrayList<BigInteger>>> secondHalf
= new MatricesMultiplication(mid + 1, this.endIndex, A, B);
firstHalf.fork();//this line will invoke method compute
secondHalf.fork();///this line will invoke method compute
//>> join what the FORKs returned from the IFs
AxB.addAll(firstHalf.join());
AxB.addAll(secondHalf.join());
return AxB;
}
}
}
}

@ -0,0 +1,19 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java to edit this template
*/
package edu.slcc.asdv.bl;
import java.math.BigInteger;
import java.util.ArrayList;
/**
*
* @author ASDV1
*/
public interface Matrix
{
ArrayList<ArrayList<BigInteger>> addParallel(ArrayList<ArrayList<BigInteger>> A, ArrayList<ArrayList<BigInteger>> B);
ArrayList<ArrayList<BigInteger>> multiplyParallel(ArrayList<ArrayList<BigInteger>> A, ArrayList<ArrayList<BigInteger>> B);
}

@ -0,0 +1,20 @@
package edu.slcc.asdv.caleb.termproject1_calebfontenot.resources;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Response;
/**
*
* @author
*/
@Path("jakartaee10")
public class JakartaEE10Resource {
@GET
public Response ping(){
return Response
.ok("ping Jakarta EE")
.build();
}
}

@ -0,0 +1,123 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package edu.slcc.asdv.caleb.termproject1_calebfontenot.utilities;
import jakarta.el.ELContext;
import jakarta.el.ELResolver;
import jakarta.faces.application.Application;
import jakarta.faces.application.FacesMessage;
import jakarta.faces.component.UIComponent;
import jakarta.faces.context.FacesContext;
import java.math.BigInteger;
import java.util.ArrayList;
public class Utilities
{
public static UIComponent findComponent(String id)
{
UIComponent result = null;
UIComponent root = FacesContext.getCurrentInstance().getViewRoot();
if (root != null)
{
result = findComponent(root, id);
}
return result;
}
public static UIComponent findComponent(UIComponent root, String id)
{
UIComponent result = null;
if (root.getId().equals(id))
{
return root;
}
for (UIComponent child : root.getChildren())
{
if (child.getId().equals(id))
{
result = child;
break;
}
result = findComponent(child, id);
if (result != null)
{
break;
}
}
return result;
}
public static void printIDs(UIComponent component)
{
System.out.println("\n\nPARENT ID " + component.getId());
if (component.getChildren() == null)
{
return;
}
for (UIComponent child : component.getChildren())
{
System.out.println("\t\tCHILD ID " + child.getId());
printIDs(child);
}
}
public static boolean isNumberOrDecimal( String s )
{
System.out.println("isNumberOrDecimal called " + s);
//[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)
String regx = "^[+-]?(\\d*\\.)?\\d+$";
return s.matches(regx);
}
public static void message( FacesMessage.Severity severity, String msg, String msgDetails)
{
FacesMessage m = new FacesMessage(severity, msg, msgDetails);
FacesContext.getCurrentInstance().addMessage("msg", m);
}
public static <T> T getCDIBean(String nameOfTheBean)
{
ELContext elc = FacesContext.getCurrentInstance().getELContext();
FacesContext fc = FacesContext.getCurrentInstance();
Application ap = fc.getApplication();
ELResolver elr = ap.getELResolver();
return (T) elr.getValue(elc, null, nameOfTheBean);
}
public static ArrayList<ArrayList<String>> convertBigIntegerToString(ArrayList<ArrayList<BigInteger>> matrix)
{
ArrayList<ArrayList<String>> stringMatrix = new ArrayList<ArrayList<String>>();
for (ArrayList<BigInteger> row : matrix)
{
ArrayList<String> stringRow = new ArrayList<String>();
for (BigInteger bigInt : row)
{
stringRow.add(new String(bigInt.toString()));
}
stringMatrix.add(stringRow);
}
return stringMatrix;
}
}

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="3.0" xmlns="https://jakarta.ee/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd">
<!-- Define Persistence Unit -->
<persistence-unit name="my_persistence_unit">
</persistence-unit>
</persistence>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="all">
</beans>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="6.0" xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd">
<context-param>
<param-name>jakarta.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
</web-app>

@ -0,0 +1,56 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
<title></title>
</h:head>
<h:body>
<ui:composition
template="resources/templates/generic/generic-layout.xhtml">
<ui:param name="wrapperWidth" value="80%"/>
<ui:define name="title">
Application Software Development, SLCC
</ui:define>
<ui:define name="top">
Templates, and Menus Illustration
</ui:define>
<ui:param name="loginsearch" value="true"/>
<ui:define name="logo"> </ui:define>
<ui:define name="login">
<ui:include src="/login-n-search/login.xhtml"/>
</ui:define>
<ui:define name="search">
<ui:include src="/login-n-search/search.xhtml"/>
</ui:define>
<ui:define name="menu">
<ui:include src="/matrices/menuMatrices.xhtml">
<ui:param name = "isMenu" value="true" />
</ui:include>
</ui:define>
<ui:param name="left" value="false"/>
<!-- if we do NOT want right to appear, set right to false -->
<ui:param name="right" value="false"/>
<ui:param name="content" value="true"/>
<ui:define name="content">
<ui:include src="/matrices/compose.xhtml"/>
</ui:define>
<ui:define name="bottom">ASDV 2800 , Templates</ui:define>
</ui:composition>
<br />
</h:body>
</html>

@ -0,0 +1,25 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:f5="http://xmlns.jcp.org/jsf/passthrough">
<h:head>
<title>Login</title>
>
</h:head>
<h:body>
<ui:composition>
<h:form id="loginFormId">
<h:inputText styleClass="inputs" value="" f5:type="email" f5:placeholder="E-mail"/>
<h:inputSecret styleClass="inputs" value="" f5:placeholder="Password"/>
<h:commandButton styleClass="lbutton" value="Login"/>
</h:form>
</ui:composition>
</h:body>
</html>

@ -0,0 +1,21 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f5="http://xmlns.jcp.org/jsf/passthrough">
<h:head>
<title>Login</title>
>
</h:head>
<h:body>
<ui:composition>
<h:form id="searchFormId">
<h:inputText styleClass="inputs" value="" f5:type="email" f5:placeholder="Search"/>
<h:commandButton styleClass="lbutton" value="Search!"/>
</h:form>
</ui:composition>
</h:body>
</html>

@ -0,0 +1,26 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
<ui:fragment>
<p:panelGrid columns="3" >
<p:column >
<ui:include src="/matrices/matrixA.xhtml"/>
</p:column>
<p:column >
<ui:include src="/matrices/matrixB.xhtml"/>
</p:column>
<p:column >
<ui:include src="/matrices/matrixC.xhtml"/>
</p:column>
</p:panelGrid>
</ui:fragment>
</h:body>
</html>

@ -0,0 +1,24 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>MatriX A</title>
<h:outputStylesheet name="css/layout-css/dataTable.css" />
<h:outputScript library="js" name="do_validation.js"/>
</h:head>
<h:body>
<h:form id="form_matrix_A">
<p:tooltip globalSelector="true"/>
<p:growl id="id_messageA" showDetail="true"/>
<h3>Matrix A</h3>
<h4>DataTable of dynamically created of input-texts</h4>
</h:form>
</h:body>
</html>

@ -0,0 +1,18 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>MatriX A</title>
</h:head>
<h:body>
<h:form id="form_matrix_B">
<h3>Matrix B</h3>
<h4>DataTable of dynamically created of input-texts</h4>
</h:form>
</h:body>
</html>

@ -0,0 +1,18 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>MAtrix C</title>
</h:head>
<h:body>
<h:form id="formC" >
<h3> Matrix C = A menu-operation B </h3>
</h:form>
</h:body>
</html>

@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="jakarta.faces.html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Menu Matricies</title>
</h:head>
<h:body>
<ui:fragment rendered="#{isMenu eq 'true' ? true : false}">
<p:tooltip globalSelector="true"/>
<h:form id="form_menu">
<p:growl id="id_message" showDetail="true"/>
<p:menubar id="menuBar">
<p:submenu id="submenu_matricies" label="Matrix" icon="pi pi-table">
<p:menuitem title="Addition" id ="menuitem_add" value="Add" disabled="false"
action="#{menuBar.add()}" icon="pi pi-plus" update="id_message"/>
<p:menuitem title="Multiplication" id ="menuitem_multiply" value="Multiply" disabled="false"
action="#{menuBar.multiply()}" icon="pi pi-plus" update="id_message"/>
<p:menuitem title="Subtraction" id ="menuitem_subtract" value="Subtract" disabled="false"
action="#{menuBar.subtract()}" icon="pi pi-plus" update="id_message"/>
</p:submenu>
</p:menubar>
</h:form>
</ui:fragment>
</h:body>
</html>

@ -0,0 +1,39 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
<title>Menu</title>
</h:head>
<h:body>
<ui:fragment rendered="#{ isMenu eq 'true' ? true : false}">
<p:tooltip globalSelector="true"/>
<h:form id="form_menu">
<p:growl id="id_message" showDetail="true"/>
<p:menubar id="menuBar">
<p:submenu id ="submenu_matrices"
label="Matrix" icon="pi pi-table">
<p:menuitem title="This does addition"
id ="menuitem_add" value="Add" disabled="false"
action="#{menuBar.add()}"
icon="pi pi-plus" update="id_message "/>
<p:menuitem icon="pi pi-times" title="Multiplication"
id ="menuitem_multiply" value="Multiply"
disabled="false"
action="#{menuBar.multiply()}"
update="id_message"/>
<p:menuitem title="Subtraction" id ="menuitem_subtract" value="Subtract"
action="#{menuBar.subtract}" disabled="false"
icon="pi pi-minus" update="id_message"/>
</p:submenu>
</p:menubar>
</h:form>
</ui:fragment >
</h:body>
</html>

@ -0,0 +1,18 @@
#bottom {
margin: 0px 0px 0px 0px;
text-align:center;
color: #ffffff;
background-image: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, blue),
color-stop(1, blue)
);
background-image: -o-linear-gradient(bottom, blue 0%, #120205 100%);
background-image: -moz-linear-gradient(bottom, blue 0%, #120205 100%);
background-image: -webkit-linear-gradient(bottom, blue 0%, #120205 100%);
background-image: -ms-linear-gradient(bottom, blue 0%, #120205 100%);
background-image: linear-gradient(to bottom, blue 0%, #120205 100%);
}

@ -0,0 +1,50 @@
#wrapper {
margin-left:auto;
margin-right:auto;
}
#title {
position: relative;
margin: 1px 0px 0px 0px;
}
#login_and_search {
position: relative;
margin: 0px 0px 5px 0px;
}
#login {
float: left;
position: relative;
}
#search {
float: right;
position: relative;
}
#top {
position: relative;
overflow: hidden;
}
#bottom {
position: relative;
}
#left {
float: left;
}
#logo {
float: left;
}
#right {
float: right;
}
#content {
overflow: hidden;
}

@ -0,0 +1,237 @@
.rowNumber{
margin-right:20px;
width : 100px;
background: blue;
font-family: Impact;
font-size: 1.2em;
color: white;
}
body .ui-datatable .ui-paginator {
position: relative;
text-align: left;
bottom: 0px;
width: inherit;
padding: 2px;
z-index: 1;
}
.input {
font-size: 1em;
max-width: 35px;
min-width: 35px;
height : 35px;
font-size: 1em;
font-family: inherit;
background-color: #fff;
border: solid 1px;
border-color: blueviolet;
border-radius: 4px;
}
.dataTables {
overflow-y:scroll;
overflow-x:scroll;
height : 386px;
width: 300px;
display:block;
background-color: #fff;
zoom: 1;
}
.ui-datatable table{
border-collapse:collapse;
width:100%;
}
.ui-datatable.ui-datatable-header,.ui-datatable.ui-datatable-footer{
text-align:center;
padding:4px 10px;
}
.ui-datatable.ui-datatable-header{
border-bottom:0px none;
}
.ui-datatable.ui-datatable-footer{
border-top:0px none;
}
.ui-datatable thead th
{
font-family: Arial;
font-size: 1.2em;
color: blue;
background: white;
}
.ui-datatable thead td
{
font-family: Impact;
font-size:1.2em;
color: blue;
}
.ui-datatable tfoot td{
text-align:center;
}
ui-datatable thead th
{
overflow:hidden;
}
.ui-datatable tbody td , .ui-datatable tfoot td{
padding:4px 10px;
overflow:hidden;
white-space:nowrap;
border-width:1px;
border-style:solid;
}
.ui-datatable tbody tr
{
clear: both;
}
.ui-datatable .ui-sortable-column{
cursor:pointer;
}
.ui-datatable div.ui-dt-c{
position:relative;
}
.ui-datatable .ui-sortable-column-icon{
display:inline-block;
margin:-3px 0px -3px 2px;
}
.ui-datatable .ui-column-filter{
display:block;
width:100px;
margin:auto;
}
.ui-datatable .ui-expanded-row{
border-bottom:0px none;
}
.ui-datatable .ui-expanded-row-content{
border-top:0px none;
}
.ui-datatable .ui-row-toggler{
cursor:pointer;
}
.ui-datatable tr.ui-state-highlight{
cursor:pointer;
}
.ui-datatable .ui-selection-column .ui-chkbox-all{
display:block;
margin:0px auto;
width:16px;
height:16px;
}
.ui-datatable-scrollable table{
table-layout:auto;
}
.ui-datatable-scrollable-body{
overflow:auto;
}
.ui-datatable-scrollable-header,.ui-datatable-scrollable-footer{
overflow:hidden;
border:0px none;
}
.ui-datatable-scrollable .ui-datatable-scrollable-header,.ui-datatable-scrollable .ui-datatable-scrollable-footer{
position:relative;
}
.ui-datatable-scrollable .ui-datatable-scrollable-header td{
font-weight:normal;
}
.ui-datatable-scrollable-body::-webkit-scrollbar{
-webkit-appearance:none;
width:15px;
background-color:transparent;
}
.ui-datatable-scrollable-body::-webkit-scrollbar-thumb{
border-radius:8px;
border:1px solid white;
background-color:rgba(194,194,194,.5);
}
.ui-datatable .ui-datatable-data tr.ui-state-hover{
border-color:inherit;
font-weight:inherit;
cursor:pointer;
}
.ui-datatable .ui-paginator,.ui-datatable .ui-paginator{
padding:2px;
}
.ui-column-dnd-top, ui-column-dnd-bottom{
display:none;
position:absolute;
}
.ui-column-dnd-top .ui-icon, ui-column-dnd-bottom .ui-icon{
position:absolute;
top:-4px;
}
/* InCell Editing */.ui-datatable .ui-cell-editor-input{
display:none;
}
.ui-datatable .ui-row-editing .ui-cell-editor .ui-cell-editor-output{
display:none;
}
.ui-datatable .ui-row-editing .ui-cell-editor .ui-cell-editor-input{
display:block;
}
.ui-datatable .ui-row-editor span{
cursor:pointer;
display:inline-block;
}
.ui-datatable .ui-row-editor .ui-icon-pencil{
display:inline-block;
}
.ui-datatable .ui-row-editing .ui-row-editor .ui-icon-pencil{
display:none;
}
.ui-datatable .ui-row-editor .ui-icon-check,.ui-datatable .ui-row-editor .ui-icon-close{
display:none;
}
.ui-datatable .ui-row-editing .ui-row-editor .ui-icon-check,.ui-datatable .ui-row-editing .ui-row-editor .ui-icon-close{
display:inline-block;
}
.ui-datatable .ui-datatable-data tr.ui-row-editing td.ui-editable-column,.ui-datatable .ui-datatable-data td.ui-cell-editing{
padding:0;
margin:0;
}
/*resizer */.ui-datatable .ui-column-resizer{
width:8px;
height:20px;
padding:0px;
cursor:col-resize;
background-image:url("/ScraperOnWeb/javax.faces.resource/spacer/dot_clear.gif.jsf?ln=primefaces");
margin:-4px -10px -4px 0px;
float:right;
}
.ui-datatable .ui-filter-column .ui-column-resizer{
height:45px;
}
.ui-datatable .ui-column-resizer-helper{
width:1px;
position:absolute;
z-index:10;
display:none;
}
.ui-datatable-resizable{
padding-bottom:1px;/*fix for webkit overlow*/
overflow:auto;
}
.ui-datatable-resizable table{
table-layout:auto;
}
.ui-datatable-rtl{
direction:rtl;
}
.ui-datatable-rtl.ui-datatable thead th, .ui-datatable-rtl.ui-datatable tfoot td{
text-align:right;
}

@ -0,0 +1,8 @@
body {
background-color: #ffffff;
font-size: 12px;
font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif;
color: #000000;
margin: 2px;
}

@ -0,0 +1,34 @@
* {box-sizing: border-box;}
.img-zoom-container {
position: relative;
}
.img-zoom-lens {
position: absolute;
/*set the size of the lens:*/
width: 40px;
height: 40px;
}
.img-zoom-result {
/*border: 5px solid #000000;*/
/*set the size of the result div:*/
width: 300px;
height: 300px;
}
.myDiv
{
align: center;
padding: 30px;
margin: 10;
border-left: 10px solid navy;
}
.hpanel{
position: relative;
top: 0px; left: 0px;
}

@ -0,0 +1,22 @@
#left {
background-image: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, #2D4A37),
color-stop(1, #789480)
);
background-image: -o-linear-gradient(bottom, #2D4A37 0%, #789480 100%);
background-image: -moz-linear-gradient(bottom, #2D4A37 0%, #789480 100%);
background-image: -webkit-linear-gradient(bottom, #2D4A37 0%, #789480 100%);
background-image: -ms-linear-gradient(bottom, #2D4A37 0%, #789480 100%);
background-image: linear-gradient(to bottom, #2D4A37 0%, #789480 100%);
-moz-box-shadow: 0px 0px 15px 3px #333333;
-webkit-box-shadow: 0px 0px 15px 3px #333333;
box-shadow: 0px 0px 15px 3px #333333;
text-align:left;
padding-left:10px;
margin-right: 5px;
}

@ -0,0 +1,65 @@
.inputs {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
background-color: #00f;
background: -moz-linear-gradient(top, #FFF, #EAEAEA);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.0, #FFF), color-stop(1.0, #EAEAEA));
border: 1px solid #CACACA;
color: #444;
font-size: 1.1em;
margin: 0px 10px 0px 0px;
padding-left: 2px;
width:200px;
}
.inputs:focus {
color: #ffffff;
background: #0000cc;
-webkit-box-shadow: 0 0 25px #CCC;
-moz-box-shadow: 0 0 25px #cccc00;
box-shadow: 0 0 25px #CCCC00;
-webkit-transform: scale(1.05);
-moz-transform: scale(1.05);
transform: scale(1.05);
}
.lbutton {
-moz-box-shadow: 4px 7px 13px -7px #276873;
-webkit-box-shadow: 4px 7px 13px -7px #276873;
box-shadow: 4px 7px 13px -7px #276873;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #171717), color-stop(1, #d92323));
background:-moz-linear-gradient(top, #171717 5%, #222 100%);
background:-webkit-linear-gradient(top, #171717 5%, #222 100%);
background:-o-linear-gradient(top, #171717 5%, #222 100%);
background:-ms-linear-gradient(top, #171717 5%, #222 100%);
background:linear-gradient(to bottom, #171717 5%, #222 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#171717', endColorstr='#d92323',GradientType=0);
background-color:#222;
-moz-border-radius:17px;
-webkit-border-radius:17px;
border-radius:17px;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:arial;
font-size:12px;
font-weight:bold;
padding:2px 12px;
text-decoration:none;
text-shadow:0px 1px 0px #3d768a;
}
.lbutton:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #222), color-stop(1, #171717));
background:-moz-linear-gradient(top, #00f 5%, #222 100%);
background:-webkit-linear-gradient(top, 00f 5%, #222 100%);
background:-o-linear-gradient(top, #00f 5%, #222 100%);
background:-ms-linear-gradient(top, #00f 5%, #222 100%);
background:linear-gradient(to bottom, #00f 5%, #222 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d92323', endColorstr='#222',GradientType=0);
background-color:#00f;
}
.lbutton:active {
position:relative;
top:1px;
}

@ -0,0 +1,8 @@
#login_and_search {
width:100%;
height:90px;
background-color: white;
padding: 20px;
display: inline-block;
}

@ -0,0 +1,9 @@
#logo {
background-image : url("#{resource['images/owl.png']}") ;
background-repeat: no-repeat;
margin-right: 0px;
width:60px;
height:60px;
float: left;
}

@ -0,0 +1,37 @@
#menu {
white-space: nowrap;
height: 28px;
width:100%;
background: #fff url("#{resource['images/menu.png']}") bottom center ;
margin-bottom: 5px;
}
#menu ul {
margin: 0;
padding: 0;
list-style:none;
float:left;
}
#menu li {
float: left;
margin: 0 3px 0 3px;
padding: 0;
background: transparent;
}
#menu a {
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: normal;
float:left;
display:block;
height: 26px;
line-height: 24px;
padding: 2px 10px 0 10px;
color: #cccc00;
text-decoration: none;
background: transparent;
}

@ -0,0 +1,5 @@
#right {
background-color: #FA0519;
text-align:center;
margin-left: 5px;
}

@ -0,0 +1,67 @@
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: normal;
float:left;
display:block;
height: 26px;
line-height: 24px;
padding: 2px 10px 0 10px;
color: #cccc00;
text-decoration:#A3979A;
background-color: white;
border: white;
padding: 0px
}
a.hover {
float: left;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: normal;
float:left;
display:block;
height: 26px;
line-height: 24px;
color: #cccc00;
text-decoration: none;
background-color: white;
border: white;
padding: 0px
}
.menus
{
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
font-weight: normal;
float:right;
color: #cccc00;
text-decoration:#A3979A;
background-color: white;
border: white;
padding: 0px ;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
.affaires .ui-menuitem-text{color:#cccc00;
decoration: bold, italic;
}
.affaires .ui-menu-child{background: white; mouseover: #000;
background-color: #A80000;}
.affaires .ui-menubar{mouseover: #000;
background-color: #A80000;}
.affaires .ui-state-hover {}
a.active {
color: #D09d23;
font-weight: bold;
background-color : #c7c3c3;
}

@ -0,0 +1,9 @@
#title {
background: white;
color:blue;
text-align:center;
font-size: 24px;
font-weight: bold;
}

@ -0,0 +1,9 @@
#top {
color: blue;
font-family: cursive, sans-serif;
font-size: 22px;
font-style: italic;
text-align: center;
height:60px;
background: white;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

@ -0,0 +1,22 @@
function validateText(textInputID)
{
var htmlInputText = document.getElementById(textInputID);
var text = htmlInputText.value;
var regex = /[^A-Za-z0-9]/g;
if (text.search( regex) != -1)
{
newText = text.replace(regex, "");
htmlInputText.value = newText;
//alert("alphanumeric chars only please");
}
}

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition >
<h1>This is default footer</h1>
</ui:composition>
</h:body>
</html>

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
This is default content
</ui:composition>
</h:body>
</html>

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
This is default left side
</ui:composition>
</h:body>
</html>

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
Default Login Section
</ui:composition>
</h:body>
</html>

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
LOGO
</ui:composition>
</h:body>
</html>

@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
<h:body>
<ui:composition>
Menu default
</ui:composition>
</h:body>
</html>

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
This is default right side
</ui:composition>
</h:body>
</html>

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
Default Search Section
</ui:composition>
</h:body>
</html>

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
This is default title
</ui:composition>
</h:body>
</html>

@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:body>
<ui:composition>
<h1>This is default header</h1>
</ui:composition>
</h:body>
</html>

@ -0,0 +1,115 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<h:outputStylesheet name="#{title eq false ? 'css/layout-css/default.css' : 'css/layout-css/titleStyle.css'}"/>
<h:outputStylesheet name="#{loginsearch eq false ? 'css/layout-css/default.css' : 'css/layout-css/login_and_searchStyle.css'}"/>
<h:outputStylesheet name="#{top eq false ? 'css/layout-css/default.css' : 'css/layout-css/topStyle.css'}"/>
<h:outputStylesheet name="#{bottom eq true ? 'css/layout-css/default.css' : 'css/layout-css/bottomStyle.css'}"/>
<h:outputStylesheet name="#{left eq false ? 'css/layout-css/default.css' : 'css/layout-css/stylesLinks.css'}"/>
<h:outputStylesheet name="#{right eq false ? 'css/layout-css/default.css' : 'css/layout-css/rightStyle.css'}"/>
<h:outputStylesheet name="#{content eq false ? 'css/layout-css/default.css' : 'css/layout-css/dataTable.css'}"/>
<h:outputStylesheet name="#{login eq false ? 'css/layout-css/default.css' : 'css/layout-css/loginStyle.css'}"/>
<h:outputStylesheet name="#{login_and_search eq false ? 'css/layout-css/default.css' : 'css/layout-css/login_and_searchStyle.css'}"/>
<h:outputStylesheet name="#{search eq false ? 'css/layout-css/default.css' : 'css/layout-css/searchStyle.css'}"/>
<h:outputStylesheet name="#{menu eq false ? 'css/layout-css/default.css' : 'css/layout-css/menuStyle.css'}"/>
<h:outputStylesheet name="#{logo eq false ? 'css/layout-css/default.css' : 'css/layout-css/logoStyle.css'}"/>
<title>Generic Template</title>
</h:head>
<h:body>
<div id="wrapper"
style="margin:auto; width: #{empty wrapperWidth ? '100%' : wrapperWidth}">
<ui:fragment rendered="#{empty title ? true : title}">
<div id="title"> <!-- div is needed to associate this div with css for title -->
<ui:insert name="title">
<ui:include src="/resources/default/titleDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty top ? true : top}">
<div id="logo_and_top" style="overflow:auto;">
<ui:fragment rendered="#{empty logo ? true : logo}">
<div id="logo">
<ui:insert name="logo">
<ui:include src="/resources/templates/default/logoDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<div id="top">
<ui:insert name="top">
<ui:include src="/resources/templates/default/topDefault.xhtml" />
</ui:insert>
</div>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty loginsearch ? true : loginsearch}">
<div id="login_and_search"> <!-- div is needed for css -->
<ui:fragment rendered="#{empty login ? true : login}">
<div id="login">
<ui:insert name="login">
<ui:include src="/resources/templates/default/loginDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty search ? true : search}">
<div id="search">
<ui:insert name="search">
<ui:include src="/resources/templates/default/searchDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty menu ? true : menu}">
<div id="menu">
<ui:insert name="menu">
<ui:include src="/resources/templates/default/menuDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<div id="main" style="overflow:auto;">
<ui:fragment rendered="#{empty left ? true : left}">
<div id="left"
style="width: #{empty leftWidth ? '150px' : leftWidth}">
<ui:insert name="left">
<ui:include src="/resources/templates/default/leftDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty right ? true : right}">
<div id="right" style="width: #{empty rightWidth ? '150px' : rightWidth}">
<ui:insert name="right">
<ui:include src="/resources/templates/default/rightDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
<ui:fragment rendered="#{empty content ? true : content}">
<div id="content">
<ui:insert name="content">
<ui:include src="/resources/templates/default/contentDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
</div>
<ui:fragment rendered="#{empty bottom ? true : bottom}">
<div id="bottom">
<ui:insert name="bottom">
<ui:include src="/resources/templates/default/bottomDefault.xhtml" />
</ui:insert>
</div>
</ui:fragment>
</div>
</h:body>
</html>

@ -0,0 +1,5 @@
# This code depends on make tool being used
DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES}))
ifneq (${DEPFILES},)
include ${DEPFILES}
endif

@ -0,0 +1,128 @@
#
# There exist several targets which are by default empty and which can be
# used for execution of your targets. These targets are usually executed
# before and after some main targets. They are:
#
# .build-pre: called before 'build' target
# .build-post: called after 'build' target
# .clean-pre: called before 'clean' target
# .clean-post: called after 'clean' target
# .clobber-pre: called before 'clobber' target
# .clobber-post: called after 'clobber' target
# .all-pre: called before 'all' target
# .all-post: called after 'all' target
# .help-pre: called before 'help' target
# .help-post: called after 'help' target
#
# Targets beginning with '.' are not intended to be called on their own.
#
# Main targets can be executed directly, and they are:
#
# build build a specific configuration
# clean remove built files from a configuration
# clobber remove all built files
# all build all configurations
# help print help mesage
#
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
# .help-impl are implemented in nbproject/makefile-impl.mk.
#
# Available make variables:
#
# CND_BASEDIR base directory for relative paths
# CND_DISTDIR default top distribution directory (build artifacts)
# CND_BUILDDIR default top build directory (object files, ...)
# CONF name of current configuration
# CND_PLATFORM_${CONF} platform name (current configuration)
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
#
# NOCDDL
# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
# build
build: .build-post
.build-pre:
# Add your pre 'build' code here...
.build-post: .build-impl
# Add your post 'build' code here...
# clean
clean: .clean-post
.clean-pre:
# Add your pre 'clean' code here...
.clean-post: .clean-impl
# Add your post 'clean' code here...
# clobber
clobber: .clobber-post
.clobber-pre:
# Add your pre 'clobber' code here...
.clobber-post: .clobber-impl
# Add your post 'clobber' code here...
# all
all: .all-post
.all-pre:
# Add your pre 'all' code here...
.all-post: .all-impl
# Add your post 'all' code here...
# build tests
build-tests: .build-tests-post
.build-tests-pre:
# Add your pre 'build-tests' code here...
.build-tests-post: .build-tests-impl
# Add your post 'build-tests' code here...
# run tests
test: .test-post
.test-pre: build-tests
# Add your pre 'test' code here...
.test-post: .test-impl
# Add your post 'test' code here...
# help
help: .help-post
.help-pre:
# Add your pre 'help' code here...
.help-post: .help-impl
# Add your post 'help' code here...
# include project implementation makefile
include nbproject/Makefile-impl.mk
# include project make variables
include nbproject/Makefile-variables.mk

@ -0,0 +1,48 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/cppFiles/class.cc to edit this template
*/
/*
* File: arrays.cpp
* Author: caleb
*
* Created on March 1, 2024, 11:11AM
*/
#include <iostream>
using namespace std;
#include "arrays.h"
void initializeArray (int arr[], const int size) {
for (int i = 0; i < size; ++i) {
arr[i] = i+10;
}
}
void printArray(int arr[], const int size) {
for (int i = 0; i < size; ++i) {
cout << arr[i] << " ";
}
cout << endl;
}
int& returnAddressOfFirstElementOfArray (int arr[3]) {
return arr[0];
}
int findMaxAndMin(int arr[2][3], int & min) {
int max = arr[0][0];
min = arr[0][0];
for (int i = 0; i < 2; ++i) {
for (int j = 0; j < 3; ++j) {
if (min > arr[i][j]) {
min = arr[i][j];
}
if (max < arr[i][j]) {
max = arr[i][j];
}
}
}
return max;
}

@ -0,0 +1,21 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/cppFiles/class.h to edit this template
*/
/*
* File: arrays.h
* Author: caleb
*
* Created on March 1, 2024, 11:11AM
*/
#ifndef ARRAYS_H
#define ARRAYS_H
void initializeArray (int arr[], const int size);
void printArray(int arr[], const int size);
int& returnReference (int & x);
#endif /* ARRAYS_H */

@ -0,0 +1,46 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/cppFiles/main.cc to edit this template
*/
/*
* File: functions.cpp
* Author: caleb
*
* Created on March 1, 2024, 10:07AM
*/
#include <cstdlib>
#include <iostream>
using namespace std;
#include "functions.h"
int global = 0;
void f1() {
cout << "f1()" << endl;
global++;
f2();
}
void f2() {
cout << "f2()" << endl;
global++;
}
void passByReference(int& x) {
global++;
x = 100;
}
void staticVarFunction() {
static int staticInt = 10;
staticInt++;
cout << staticInt << endl;
}
int& returnReference (int & x) {
x++;
return x;
}

@ -0,0 +1,27 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/cppFiles/file.h to edit this template
*/
/*
* File: headers.h
* Author: caleb
*
* Created on March 1, 2024, 10:10AM
*/
#ifndef HEADERS_H
#define HEADERS_H
void f1();
void f2();
void passByReference(int& x);
void staticVarFunction();
int& returnReference (int & x);
int& returnAddressOfFirstElementOfArray (int arr[3]);
int findMaxAndMin(int arr[2][3], int & min) ;
#endif /* HEADERS_H */

@ -0,0 +1,52 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/cppFiles/main.cc to edit this template
*/
/*
* File: main.cpp
* Author: caleb
*
* Created on March 1, 2024, 10:06AM
*/
#include <cstdlib>
#include <iostream>
using namespace std;
#include "functions.h"
#include "arrays.h"
/*
*
*/
int main(int argc, char** argv) {
f1();
int y = 10;
passByReference(y);
cout << y << endl;
staticVarFunction();
staticVarFunction();
staticVarFunction();
cout << returnReference(y) << endl;
cout << y << endl;
int arr1[3] = {1, 2 ,3};
initializeArray (arr1, 3);
printArray(arr1, 3);
int& rAr = returnAddressOfFirstElementOfArray(arr1);
cout << endl;
cout << rAr << " " << &rAr << " " << endl;
int arr2[2][3] = {
{1, 2 ,3},
{-1, -9, -4}
};
int min = 0;
cout << "max: " << findMaxAndMin(arr2, min) << endl;
cout << "min: " << endl;
return 0;
}

@ -0,0 +1,95 @@
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a -pre and a -post target defined where you can add customized code.
#
# This makefile implements configuration specific macros and targets.
# Environment
MKDIR=mkdir
CP=cp
GREP=grep
NM=nm
CCADMIN=CCadmin
RANLIB=ranlib
CC=gcc
CCC=g++
CXX=g++
FC=gfortran
AS=as
# Macros
CND_PLATFORM=GNU-Linux
CND_DLIB_EXT=so
CND_CONF=Debug
CND_DISTDIR=dist
CND_BUILDDIR=build
# Include project Makefile
include Makefile
# Object Directory
OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/arrays.o \
${OBJECTDIR}/functions.o \
${OBJECTDIR}/main.o
# C Compiler Flags
CFLAGS=
# CC Compiler Flags
CCFLAGS=
CXXFLAGS=
# Fortran Compiler Flags
FFLAGS=
# Assembler Flags
ASFLAGS=
# Link Libraries and Options
LDLIBSOPTIONS=
# Build Targets
.build-conf: ${BUILD_SUBPROJECTS}
"${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/functions
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/functions: ${OBJECTFILES}
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/functions ${OBJECTFILES} ${LDLIBSOPTIONS}
${OBJECTDIR}/arrays.o: arrays.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.cc) -g -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/arrays.o arrays.cpp
${OBJECTDIR}/functions.o: functions.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.cc) -g -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/functions.o functions.cpp
${OBJECTDIR}/main.o: main.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.cc) -g -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
# Subprojects
.build-subprojects:
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r ${CND_BUILDDIR}/${CND_CONF}
# Subprojects
.clean-subprojects:
# Enable dependency checking
.dep.inc: .depcheck-impl
include .dep.inc

@ -0,0 +1,95 @@
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a -pre and a -post target defined where you can add customized code.
#
# This makefile implements configuration specific macros and targets.
# Environment
MKDIR=mkdir
CP=cp
GREP=grep
NM=nm
CCADMIN=CCadmin
RANLIB=ranlib
CC=gcc
CCC=g++
CXX=g++
FC=gfortran
AS=as
# Macros
CND_PLATFORM=GNU-Linux
CND_DLIB_EXT=so
CND_CONF=Release
CND_DISTDIR=dist
CND_BUILDDIR=build
# Include project Makefile
include Makefile
# Object Directory
OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/arrays.o \
${OBJECTDIR}/functions.o \
${OBJECTDIR}/main.o
# C Compiler Flags
CFLAGS=
# CC Compiler Flags
CCFLAGS=
CXXFLAGS=
# Fortran Compiler Flags
FFLAGS=
# Assembler Flags
ASFLAGS=
# Link Libraries and Options
LDLIBSOPTIONS=
# Build Targets
.build-conf: ${BUILD_SUBPROJECTS}
"${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/functions
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/functions: ${OBJECTFILES}
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/functions ${OBJECTFILES} ${LDLIBSOPTIONS}
${OBJECTDIR}/arrays.o: arrays.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/arrays.o arrays.cpp
${OBJECTDIR}/functions.o: functions.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/functions.o functions.cpp
${OBJECTDIR}/main.o: main.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} "$@.d"
$(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp
# Subprojects
.build-subprojects:
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r ${CND_BUILDDIR}/${CND_CONF}
# Subprojects
.clean-subprojects:
# Enable dependency checking
.dep.inc: .depcheck-impl
include .dep.inc

@ -0,0 +1,133 @@
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a pre- and a post- target defined where you can add customization code.
#
# This makefile implements macros and targets common to all configurations.
#
# NOCDDL
# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
# and .clean-reqprojects-conf unless SUB has the value 'no'
SUB_no=NO
SUBPROJECTS=${SUB_${SUB}}
BUILD_SUBPROJECTS_=.build-subprojects
BUILD_SUBPROJECTS_NO=
BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
CLEAN_SUBPROJECTS_=.clean-subprojects
CLEAN_SUBPROJECTS_NO=
CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
# Project Name
PROJECTNAME=functions
# Active Configuration
DEFAULTCONF=Debug
CONF=${DEFAULTCONF}
# All Configurations
ALLCONFS=Debug Release
# build
.build-impl: .build-pre .validate-impl .depcheck-impl
@#echo "=> Running $@... Configuration=$(CONF)"
"${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf
# clean
.clean-impl: .clean-pre .validate-impl .depcheck-impl
@#echo "=> Running $@... Configuration=$(CONF)"
"${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf
# clobber
.clobber-impl: .clobber-pre .depcheck-impl
@#echo "=> Running $@..."
for CONF in ${ALLCONFS}; \
do \
"${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \
done
# all
.all-impl: .all-pre .depcheck-impl
@#echo "=> Running $@..."
for CONF in ${ALLCONFS}; \
do \
"${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \
done
# build tests
.build-tests-impl: .build-impl .build-tests-pre
@#echo "=> Running $@... Configuration=$(CONF)"
"${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf
# run tests
.test-impl: .build-tests-impl .test-pre
@#echo "=> Running $@... Configuration=$(CONF)"
"${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf
# dependency checking support
.depcheck-impl:
@echo "# This code depends on make tool being used" >.dep.inc
@if [ -n "${MAKE_VERSION}" ]; then \
echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES} \$${TESTOBJECTFILES}))" >>.dep.inc; \
echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
echo "include \$${DEPFILES}" >>.dep.inc; \
echo "endif" >>.dep.inc; \
else \
echo ".KEEP_STATE:" >>.dep.inc; \
echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
fi
# configuration validation
.validate-impl:
@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
then \
echo ""; \
echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \
echo "See 'make help' for details."; \
echo "Current directory: " `pwd`; \
echo ""; \
fi
@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
then \
exit 1; \
fi
# help
.help-impl: .help-pre
@echo "This makefile supports the following configurations:"
@echo " ${ALLCONFS}"
@echo ""
@echo "and the following targets:"
@echo " build (default target)"
@echo " clean"
@echo " clobber"
@echo " all"
@echo " help"
@echo ""
@echo "Makefile Usage:"
@echo " make [CONF=<CONFIGURATION>] [SUB=no] build"
@echo " make [CONF=<CONFIGURATION>] [SUB=no] clean"
@echo " make [SUB=no] clobber"
@echo " make [SUB=no] all"
@echo " make help"
@echo ""
@echo "Target 'build' will build a specific configuration and, unless 'SUB=no',"
@echo " also build subprojects."
@echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no',"
@echo " also clean subprojects."
@echo "Target 'clobber' will remove all built files from all configurations and,"
@echo " unless 'SUB=no', also from subprojects."
@echo "Target 'all' will will build all configurations and, unless 'SUB=no',"
@echo " also build subprojects."
@echo "Target 'help' prints this message."
@echo ""

@ -0,0 +1,35 @@
#
# Generated - do not edit!
#
# NOCDDL
#
CND_BASEDIR=`pwd`
CND_BUILDDIR=build
CND_DISTDIR=dist
# Debug configuration
CND_PLATFORM_Debug=GNU-Linux
CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux
CND_ARTIFACT_NAME_Debug=functions
CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux/functions
CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux/package
CND_PACKAGE_NAME_Debug=functions.tar
CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux/package/functions.tar
# Release configuration
CND_PLATFORM_Release=GNU-Linux
CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux
CND_ARTIFACT_NAME_Release=functions
CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux/functions
CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux/package
CND_PACKAGE_NAME_Release=functions.tar
CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux/package/functions.tar
#
# include compiler specific variables
#
# dmake command
ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \
(mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)
#
# gmake command
.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk))
#
include nbproject/private/Makefile-variables.mk

@ -0,0 +1,76 @@
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_PLATFORM=GNU-Linux
CND_CONF=Debug
CND_DISTDIR=dist
CND_BUILDDIR=build
CND_DLIB_EXT=so
NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/functions
OUTPUT_BASENAME=functions
PACKAGE_TOP_DIR=functions/
# 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}/functions/bin"
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/functions.tar
cd ${NBTMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/functions.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${NBTMPDIR}

@ -0,0 +1,76 @@
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_PLATFORM=GNU-Linux
CND_CONF=Release
CND_DISTDIR=dist
CND_BUILDDIR=build
CND_DLIB_EXT=so
NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/functions
OUTPUT_BASENAME=functions
PACKAGE_TOP_DIR=functions/
# 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}/functions/bin"
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/functions.tar
cd ${NBTMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/functions.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${NBTMPDIR}

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="100">
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
<itemPath>arrays.h</itemPath>
<itemPath>functions.h</itemPath>
</logicalFolder>
<logicalFolder name="ResourceFiles"
displayName="Resource Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>arrays.cpp</itemPath>
<itemPath>functions.cpp</itemPath>
<itemPath>main.cpp</itemPath>
</logicalFolder>
<logicalFolder name="TestFiles"
displayName="Test Files"
projectFiles="false"
kind="TEST_LOGICAL_FOLDER">
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false"
kind="IMPORTANT_FILES_FOLDER">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="Debug" type="1">
<toolsSet>
<compilerSet>default</compilerSet>
<dependencyChecking>true</dependencyChecking>
<rebuildPropChanged>false</rebuildPropChanged>
</toolsSet>
<compileType>
</compileType>
<item path="arrays.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="arrays.h" ex="false" tool="3" flavor2="0">
</item>
<item path="functions.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="functions.h" ex="false" tool="3" flavor2="0">
</item>
<item path="main.cpp" ex="false" tool="1" flavor2="0">
</item>
</conf>
<conf name="Release" type="1">
<toolsSet>
<compilerSet>default</compilerSet>
<dependencyChecking>true</dependencyChecking>
<rebuildPropChanged>false</rebuildPropChanged>
</toolsSet>
<compileType>
<cTool>
<developmentMode>5</developmentMode>
</cTool>
<ccTool>
<developmentMode>5</developmentMode>
</ccTool>
<fortranCompilerTool>
<developmentMode>5</developmentMode>
</fortranCompilerTool>
<asmTool>
<developmentMode>5</developmentMode>
</asmTool>
</compileType>
<item path="arrays.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="arrays.h" ex="false" tool="3" flavor2="0">
</item>
<item path="functions.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="functions.h" ex="false" tool="3" flavor2="0">
</item>
<item path="main.cpp" ex="false" tool="1" flavor2="0">
</item>
</conf>
</confs>
</configurationDescriptor>

@ -0,0 +1,7 @@
#
# Generated - do not edit!
#
# NOCDDL
#
# Debug configuration
# Release configuration

@ -0,0 +1,75 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*
* Contributor(s):
*/
// List of standard headers was taken in http://en.cppreference.com/w/c/header
#include <assert.h> // Conditionally compiled macro that compares its argument to zero
#include <ctype.h> // Functions to determine the type contained in character data
#include <errno.h> // Macros reporting error conditions
#include <float.h> // Limits of float types
#include <limits.h> // Sizes of basic types
#include <locale.h> // Localization utilities
#include <math.h> // Common mathematics functions
#include <setjmp.h> // Nonlocal jumps
#include <signal.h> // Signal handling
#include <stdarg.h> // Variable arguments
#include <stddef.h> // Common macro definitions
#include <stdio.h> // Input/output
#include <string.h> // String handling
#include <stdlib.h> // General utilities: memory management, program utilities, string conversions, random numbers
#include <time.h> // Time/date utilities
#include <iso646.h> // (since C95) Alternative operator spellings
#include <wchar.h> // (since C95) Extended multibyte and wide character utilities
#include <wctype.h> // (since C95) Wide character classification and mapping utilities
#ifdef _STDC_C99
#include <complex.h> // (since C99) Complex number arithmetic
#include <fenv.h> // (since C99) Floating-point environment
#include <inttypes.h> // (since C99) Format conversion of integer types
#include <stdbool.h> // (since C99) Boolean type
#include <stdint.h> // (since C99) Fixed-width integer types
#include <tgmath.h> // (since C99) Type-generic math (macros wrapping math.h and complex.h)
#endif
#ifdef _STDC_C11
#include <stdalign.h> // (since C11) alignas and alignof convenience macros
#include <stdatomic.h> // (since C11) Atomic types
#include <stdnoreturn.h> // (since C11) noreturn convenience macros
#include <threads.h> // (since C11) Thread library
#include <uchar.h> // (since C11) UTF-16 and UTF-32 character utilities
#endif

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="100">
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="Debug" type="1">
<toolsSet>
<developmentServer>localhost</developmentServer>
<platform>2</platform>
</toolsSet>
<dbx_gdbdebugger version="1">
<gdb_pathmaps>
</gdb_pathmaps>
<gdb_interceptlist>
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
</gdb_interceptlist>
<gdb_options>
<DebugOptions>
</DebugOptions>
</gdb_options>
<gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
</dbx_gdbdebugger>
<nativedebugger version="1">
<engine>gdb</engine>
</nativedebugger>
<runprofile version="9">
<runcommandpicklist>
<runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
</runcommandpicklist>
<runcommand>"${OUTPUT_PATH}"</runcommand>
<rundir></rundir>
<buildfirst>true</buildfirst>
<terminal-type>0</terminal-type>
<remove-instrumentation>0</remove-instrumentation>
<environment>
</environment>
</runprofile>
</conf>
<conf name="Release" type="1">
<toolsSet>
<developmentServer>localhost</developmentServer>
<platform>2</platform>
</toolsSet>
<dbx_gdbdebugger version="1">
<gdb_pathmaps>
</gdb_pathmaps>
<gdb_interceptlist>
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
</gdb_interceptlist>
<gdb_options>
<DebugOptions>
</DebugOptions>
</gdb_options>
<gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
</dbx_gdbdebugger>
<nativedebugger version="1">
<engine>gdb</engine>
</nativedebugger>
<runprofile version="9">
<runcommandpicklist>
<runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
</runcommandpicklist>
<runcommand>"${OUTPUT_PATH}"</runcommand>
<rundir></rundir>
<buildfirst>true</buildfirst>
<terminal-type>0</terminal-type>
<remove-instrumentation>0</remove-instrumentation>
<environment>
</environment>
</runprofile>
</conf>
</confs>
</configurationDescriptor>

@ -0,0 +1,135 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*
* Contributor(s):
*/
// List of standard headers was taken in http://en.cppreference.com/w/cpp/header
#include <cstdlib> // General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search
#include <csignal> // Functions and macro constants for signal management
#include <csetjmp> // Macro (and function) that saves (and jumps) to an execution context
#include <cstdarg> // Handling of variable length argument lists
#include <typeinfo> // Runtime type information utilities
#include <bitset> // std::bitset class template
#include <functional> // Function objects, designed for use with the standard algorithms
#include <utility> // Various utility components
#include <ctime> // C-style time/date utilites
#include <cstddef> // typedefs for types such as size_t, NULL and others
#include <new> // Low-level memory management utilities
#include <memory> // Higher level memory management utilities
#include <climits> // limits of integral types
#include <cfloat> // limits of float types
#include <limits> // standardized way to query properties of arithmetic types
#include <exception> // Exception handling utilities
#include <stdexcept> // Standard exception objects
#include <cassert> // Conditionally compiled macro that compares its argument to zero
#include <cerrno> // Macro containing the last error number
#include <cctype> // functions to determine the type contained in character data
#include <cwctype> // functions for determining the type of wide character data
#include <cstring> // various narrow character string handling functions
#include <cwchar> // various wide and multibyte string handling functions
#include <string> // std::basic_string class template
#include <vector> // std::vector container
#include <deque> // std::deque container
#include <list> // std::list container
#include <set> // std::set and std::multiset associative containers
#include <map> // std::map and std::multimap associative containers
#include <stack> // std::stack container adaptor
#include <queue> // std::queue and std::priority_queue container adaptors
#include <algorithm> // Algorithms that operate on containers
#include <iterator> // Container iterators
#include <cmath> // Common mathematics functions
#include <complex> // Complex number type
#include <valarray> // Class for representing and manipulating arrays of values
#include <numeric> // Numeric operations on values in containers
#include <iosfwd> // forward declarations of all classes in the input/output library
#include <ios> // std::ios_base class, std::basic_ios class template and several typedefs
#include <istream> // std::basic_istream class template and several typedefs
#include <ostream> // std::basic_ostream, std::basic_iostream class templates and several typedefs
#include <iostream> // several standard stream objects
#include <fstream> // std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs
#include <sstream> // std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs
#include <strstream> // std::strstream, std::istrstream, std::ostrstream(deprecated)
#include <iomanip> // Helper functions to control the format or input and output
#include <streambuf> // std::basic_streambuf class template
#include <cstdio> // C-style input-output functions
#include <locale> // Localization utilities
#include <clocale> // C localization utilities
#include <ciso646> // empty header. The macros that appear in iso646.h in C are keywords in C++
#if __cplusplus >= 201103L
#include <typeindex> // (since C++11) std::type_index
#include <type_traits> // (since C++11) Compile-time type information
#include <chrono> // (since C++11) C++ time utilites
#include <initializer_list> // (since C++11) std::initializer_list class template
#include <tuple> // (since C++11) std::tuple class template
#include <scoped_allocator> // (since C++11) Nested allocator class
#include <cstdint> // (since C++11) fixed-size types and limits of other types
#include <cinttypes> // (since C++11) formatting macros , intmax_t and uintmax_t math and conversions
#include <system_error> // (since C++11) defines std::error_code, a platform-dependent error code
#include <cuchar> // (since C++11) C-style Unicode character conversion functions
#include <array> // (since C++11) std::array container
#include <forward_list> // (since C++11) std::forward_list container
#include <unordered_set> // (since C++11) std::unordered_set and std::unordered_multiset unordered associative containers
#include <unordered_map> // (since C++11) std::unordered_map and std::unordered_multimap unordered associative containers
#include <random> // (since C++11) Random number generators and distributions
#include <ratio> // (since C++11) Compile-time rational arithmetic
#include <cfenv> // (since C++11) Floating-point environment access functions
#include <codecvt> // (since C++11) Unicode conversion facilities
#include <regex> // (since C++11) Classes, algorithms and iterators to support regular expression processing
#include <atomic> // (since C++11) Atomic operations library
#include <ccomplex> // (since C++11)(deprecated in C++17) simply includes the header <complex>
#include <ctgmath> // (since C++11)(deprecated in C++17) simply includes the headers <ccomplex> (until C++17)<complex> (since C++17) and <cmath>: the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers
#include <cstdalign> // (since C++11)(deprecated in C++17) defines one compatibility macro constant
#include <cstdbool> // (since C++11)(deprecated in C++17) defines one compatibility macro constant
#include <thread> // (since C++11) std::thread class and supporting functions
#include <mutex> // (since C++11) mutual exclusion primitives
#include <future> // (since C++11) primitives for asynchronous computations
#include <condition_variable> // (since C++11) thread waiting conditions
#endif
#if __cplusplus >= 201300L
#include <shared_mutex> // (since C++14) shared mutual exclusion primitives
#endif
#if __cplusplus >= 201500L
#include <any> // (since C++17) std::any class template
#include <optional> // (since C++17) std::optional class template
#include <variant> // (since C++17) std::variant class template
#include <memory_resource> // (since C++17) Polymorphic allocators and memory resources
#include <string_view> // (since C++17) std::basic_string_view class template
#include <execution> // (since C++17) Predefined execution policies for parallel versions of the algorithms
#include <filesystem> // (since C++17) std::path class and supporting functions
#endif

@ -0,0 +1,42 @@
# Launchers File syntax:
#
# [Must-have property line]
# launcher1.runCommand=<Run Command>
# [Optional extra properties]
# launcher1.displayName=<Display Name, runCommand by default>
# launcher1.hide=<true if lancher is not visible in menu, false by default>
# launcher1.buildCommand=<Build Command, Build Command specified in project properties by default>
# launcher1.runDir=<Run Directory, ${PROJECT_DIR} by default>
# launcher1.runInOwnTab=<false if launcher reuse common "Run" output tab, true by default>
# launcher1.symbolFiles=<Symbol Files loaded by debugger, ${OUTPUT_PATH} by default>
# launcher1.env.<Environment variable KEY>=<Environment variable VALUE>
# (If this value is quoted with ` it is handled as a native command which execution result will become the value)
# [Common launcher properties]
# common.runDir=<Run Directory>
# (This value is overwritten by a launcher specific runDir value if the latter exists)
# common.env.<Environment variable KEY>=<Environment variable VALUE>
# (Environment variables from common launcher are merged with launcher specific variables)
# common.symbolFiles=<Symbol Files loaded by debugger>
# (This value is overwritten by a launcher specific symbolFiles value if the latter exists)
#
# In runDir, symbolFiles and env fields you can use these macroses:
# ${PROJECT_DIR} - project directory absolute path
# ${OUTPUT_PATH} - linker output path (relative to project directory path)
# ${OUTPUT_BASENAME}- linker output filename
# ${TESTDIR} - test files directory (relative to project directory path)
# ${OBJECTDIR} - object files directory (relative to project directory path)
# ${CND_DISTDIR} - distribution directory (relative to project directory path)
# ${CND_BUILDDIR} - build directory (relative to project directory path)
# ${CND_PLATFORM} - platform name
# ${CND_CONF} - configuration name
# ${CND_DLIB_EXT} - dynamic library extension
#
# All the project launchers must be listed in the file!
#
# launcher1.runCommand=...
# launcher2.runCommand=...
# ...
# common.runDir=...
# common.env.KEY=VALUE
# launcher1.runCommand=<type your run command here>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<data xmlns="http://www.netbeans.org/ns/make-project-private/1">
<activeConfTypeElem>1</activeConfTypeElem>
<activeConfIndexElem>0</activeConfIndexElem>
</data>
</project-private>

@ -0,0 +1,28 @@
<?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>functions</name>
<c-extensions/>
<cpp-extensions>cpp</cpp-extensions>
<header-extensions>h</header-extensions>
<sourceEncoding>UTF-8</sourceEncoding>
<make-dep-projects/>
<sourceRootList/>
<confList>
<confElem>
<name>Debug</name>
<type>1</type>
</confElem>
<confElem>
<name>Release</name>
<type>1</type>
</confElem>
</confList>
<formatting>
<project-formatting-style>false</project-formatting-style>
</formatting>
</data>
</configuration>
</project>

Some files were not shown because too many files have changed in this diff Show More