Skip to content

Commit 4f7e693

Browse files
committed
updated readme
1 parent f5cfc85 commit 4f7e693

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

Digital-Assignment/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ The Apache Commons Mathematics Library. Jar files here - [`.jar` files](https://
2828
* Root Finding:
2929
* A root is a value where a function has the value of 0. Commons-Math includes implementation of several root-finding algorithms.
3030
* Here, we try to find the root of *v -> (v * v) – 2* :
31-
```{Java}
31+
32+
``` java
3233
UnivariateFunction function = v -> Math.pow(v, 2) - 2;
3334
UnivariateSolver solver = new BracketingNthOrderBrentSolver(1.0e-12, 1.0e-8, 5);
3435
double c = solver.solve(100, function, -10.0, 10.0, 0);
3536
```
37+
3638
* First, we start by defining the function, then we define the solver, and we set the desired accuracy. Finally, we call the solve() API.
3739
* The root-finding operation will be performed using several iterations, so it’s a matter of finding a compromise between execution time and accuracy.
3840
* Calculating integrals:
@@ -45,25 +47,30 @@ The Apache Commons Mathematics Library. Jar files here - [`.jar` files](https://
4547
* We start by defining a function, we choose an integrator among the available integration solutions existing, we set the desired accuracy, and finally, we integrate.
4648
* Linear Algebra:
4749
* If we have a linear system of equations under the form AX = B where A is a matrix of real numbers, and B a vector of real numbers – Commons Math provides structures to represent both the matrix and the vector, and also provide solvers to find the value of X:
48-
```{Java}
50+
51+
``` java
4952
RealMatrix a = new Array2DRowRealMatrix(new double[][] { { 2, 3, -2 }, { -1, 7, 6 }, { 4, -3, -5 } },false);
5053
RealVector b = new ArrayRealVector(new double[] { 1, -2, 1 }, false);
5154
DecompositionSolver solver = new LUDecomposition(a).getSolver();
5255
RealVector solution = solver.solve(b);
5356
```
57+
5458
* The case is pretty straightforward: we define a matrix a from an array of array of doubles, and a vector b from an array of a vector.
5559
* Then, we create an LUDecomposition which provides a solver for equations under the form AX = B. As its name states it, LUDecomposition relies on the LU decomposition, and thus works only with square matrices.
5660
* For other matrices, different solvers exist, usually solving the equation using the least square method.
61+
5762
### Statistics and Probrabilities
5863
* [Code](https://github.com/jacobjohn2016/Java-Programming/blob/master/Digital-Assignment/src/AdvancedMath/Stats.java)
5964
* The package `org.apache.commons.math3.stat` provides several tools for statistical computations.
6065
* In core Java, `Math.random()` can be used for generating random values, but these values are uniformly distributed between 0 and 1.
6166
* Sometimes, we want to produce a random value using a more complex distribution. For this, we can use the framework provided by `org.apache.commons.math3.distribution.`
6267
* Here is how to generate random values according to the normal distribution with the mean of 10 and the standard deviation of 3:
63-
```{Java}
68+
*
69+
``` java
6470
NormalDistribution normalDistribution = new NormalDistribution(10, 3);
6571
double randomValue = normalDistribution.sample();
6672
```
73+
6774
* Or we can obtain the probability *P(X = x)* of getting a value for discrete distributions, or the cumulative probability *P(X <= x)* for continuous distributions.
6875

6976
## Tokenization using Apache OpenNLP

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ This repository contains all the java programming assignments for the CSE1007 la
146146
2. [HelloFormPost.java](https://github.com/jacobjohn2016/Java-Programming/blob/master/BeginnersBookDemo/src/HelloFormPost.java): Servlet for getting form data and displaying.
147147
3. [web.xml](https://github.com/jacobjohn2016/Java-Programming/blob/master/BeginnersBookDemo/WebContent/WEB-INF/web.xml): For mapping servlet URL.
148148
149-
## [Digital Assignment](https://github.com/jacobjohn2016/Java-Programming/tree/master/Digital-Assignment)
149+
## [Digital Assignment](https://jacobjohn2016.github.io/Java-Programming/Digital-Assignment/)
150150
* [File Upload](https://github.com/jacobjohn2016/Java-Programming/blob/master/Digital-Assignment/16BCE2205_Digital_assignment.pdf)
151151
152152
## Extra Questions (Practice)
Binary file not shown.

registeruser/nbproject/private/private.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
33
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
44
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
5-
<group/>
5+
<group>
6+
<file>file:/Users/jacobjohn/Codes/Java-Programming/registeruser/src/java/Register.java</file>
7+
</group>
68
</open-files>
79
</project-private>

registeruser/src/java/Register.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public void doPost(HttpServletRequest request, HttpServletResponse response)
1818
try{
1919
Class.forName("com.mysql.jdbc.Driver");
2020
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/JavaJDBC?autoReconnect=true&useSSL=false","root","MyNewPass");
21-
out.print("Connected successfully!");
21+
out.print("Connected successfully!</br>");
2222
PreparedStatement ps=con.prepareStatement("insert into registeruser values(?,?,?,?)");
2323
ps.setString(1,n);
2424
ps.setString(2,p);

0 commit comments

Comments
 (0)