## php – Interconnected technique for web, mobile and desktop

I am planning to do the university project with the Desktop application + web application + mobile application, I have planned to use languages for these 3 as below:

• Desktop application: Java SE
• Web application: PHP
• Mobile application: flutter with Dart
• Database: Mysql

Now I have a problem with how to connect these 3 with the same database.

for example:
Desktop application can connect without any issue because both are in the same network. problem is how to connect mobile and web application with a local database.

Kindly advise me on how to manage that situation.

Thank you!!

## oracle – Delete data from interconnected tables using a query

I want to write the database query to remove data from multiple interconnected tables.
The structure of the database is shown below:

``````CREATE TABLE TABLE1 (
ID NUMBER(10),
TABLE2_ID NUMBER(10),
TABLE3_ID NUMBER(10),
DATA VARCHAR2(200)
);

INSERT INTO TABLE1
(ID, TABLE2_ID, TABLE3_ID, DATA)
VALUES
('1', '1', '1', 'TEST');

CREATE TABLE TABLE2 (
ID NUMBER(10),
DATA VARCHAR2(200)
);

INSERT INTO TABLE2
(ID, DATA)
VALUES
('1', 'TABLE 2 DATA');

CREATE TABLE TABLE3 (
ID NUMBER(10),
DATA VARCHAR2(200)
);

INSERT INTO TABLE3
(ID, DATA)
VALUES
('1', 'TABLE 3 DATA');

CREATE TABLE TABLE1_TABLE4_JOIN_TABLE (
TABLE1_ID NUMBER(10),
TABLE4_ID NUMBER(10)
);

INSERT INTO TABLE1_TABLE4_JOIN_TABLE
(TABLE1_ID, TABLE4_ID)
SELECT '1', '1' FROM dual UNION ALL
SELECT '1', '2' FROM dual UNION ALL
SELECT '1', '3' FROM dual;

CREATE TABLE TABLE4 (
ID NUMBER(10),
TABLE5_ID NUMBER(10),
DATA VARCHAR2(200)
);

INSERT INTO TABLE4
(ID, TABLE5_ID, DATA)
SELECT '1', '1', 'TABLE 4 DATA 1' FROM dual UNION ALL
SELECT '2', '2', 'TABLE 4 DATA 2' FROM dual UNION ALL
SELECT '3', '3', 'TABLE 4 DATA 3' FROM dual;

CREATE TABLE TABLE5 (
ID NUMBER(10),
DATA VARCHAR2(200)
);

INSERT INTO TABLE5
(ID, DATA)
SELECT '1', 'TABLE 5 DATA 1' FROM dual UNION ALL
SELECT '2', 'TABLE 5 DATA 2' FROM dual UNION ALL
SELECT '3', 'TABLE 5 DATA 3' FROM dual;

TABLE1:
+----+-----------+-----------+------+
| ID | TABLE2_ID | TABLE3_ID | DATA |
+----+-----------+-----------+------+
|  1 |         1 |         1 | TEST |
+----+-----------+-----------+------+

TABLE2:
+----+--------------+
| ID |     DATA     |
+----+--------------+
|  1 | TABLE 2 DATA |
+----+--------------+

TABLE3:
+----+--------------+
| ID |     DATA     |
+----+--------------+
|  1 | TABLE 3 DATA |
+----+--------------+

TABLE1_TABLE4_JOIN_TABLE:
+-----------+-----------+
| TABLE1_ID | TABLE4_ID |
+-----------+-----------+
|         1 |         1 |
|         1 |         2 |
|         1 |         3 |
+-----------+-----------+

TABLE4:
+----+-----------+----------------+
| ID | TABLE5_ID |      DATA      |
+----+-----------+----------------+
|  1 |         1 | TABLE 4 DATA 1 |
|  2 |         2 | TABLE 4 DATA 2 |
|  3 |         3 | TABLE 4 DATA 3 |
+----+-----------+----------------+

TABLE5:
+----+----------------+
| ID |      DATA      |
+----+----------------+
|  1 | TABLE 5 DATA 1 |
|  2 | TABLE 5 DATA 2 |
|  3 | TABLE 5 DATA 3 |
+----+----------------+
``````

I have not shown the foreign key constraints in the above schema, but all the foreign keys are configured in the database.

I want to remove everything that is bound to table1.id = (someid)

``````select TABLE1.*,TABLE2.*,TABLE3.*,TABLE4.*,TABLE5.*,TABLE1_TABLE4_JOIN_TABLE.* from TABLE1
inner join TABLE2 on TABLE1.TABLE2_ID = TABLE2.ID
inner join TABLE3 on TABLE1.TABLE3_ID = TABLE3.ID
inner join TABLE1_TABLE4_JOIN_TABLE on TABLE1.ID = TABLE1_TABLE4_JOIN_TABLE.TABLE1_ID
inner join TABLE4 on TABLE4.ID = TABLE1_TABLE4_JOIN_TABLE.TABLE4_ID
inner join TABLE5 on TABLE5.ID = TABLE4.TABLE5_ID
where TABLE1.ID =1;
``````

I tried the above select query with delete from but it is not deleting the data.

Suggest the best way to remove them.

## linear algebra: approach to managing a decreasing set of interconnected numbers

We have four variables:

• `a`, which represents numbers from 0-999
• `b`, represents `a`1000 (`b` = 3 represents `a` = 3000)
• `c`, represents `b`1000
• `d`, represents `c`100 (not 1000)

What is the easiest, most efficient or simply the standard way of treating subtraction/ Besides any of those numbers? Imagine that I decrease `a` with 500 while representing `0`, but since `b` could be `1` (Thus `a` can be `1000`) I can and I have to recalculate `a` Y `b` And that is not the worst case scenario.

## calculation and analysis: find vectors that describe two interconnected pyramids in the Euclidean space

I need the help of competent specialists in linear algebra in Mathematica.

In the Euclidean space, two pyramids rotate at different angles. Its vertices coincide with the beginning of the base coordinate system at the point (0,0,0). The coordinates of the remaining vertices are described by a triple of three-dimensional vectors corresponding to each pyramid:

$$W_ {11}, W_ {12}, W_ {13}$$ – for the first pyramid;

$$V_ {21}, V_ {22}, V_ {23}$$ – for the second pyramid, we need to find these vectors;

The coordinates of the vectors for the first pyramid are known. It is necessary to find the coordinates of the three remaining vectors for the second pyramid. In this case, two conditions must be met:

1. Scalar product $$W_ {1j} cdot W_ {1j}$$, $$W_ {2j} cdot W_ {2j}$$ Y $$W_ {3j} cdot W_ {3j}$$, where $$j = 1,2.3$$ of two corresponding vectors taken for the first and second matrix must be the alpha angle.

2. The scalar product of two adjacent vectors for the second pyramid must be the betta angle.

In the form of equations, these conditions can be written as:

$$begin {cases} W_ {11} cdot V_ {21} = cos ( alpha) \ W_ {12} cdot V_ {22} = cos ( alpha) \ W_ {13} cdot V_ {23 } = cos ( alpha) \ V_ {21} cdot V_ {22} = cos ( beta) \ V_ {22} cdot V_ {23} = cos ( beta) \ V_ {21} cdot V_ {23} = cos ( beta) end {cases}$$

I cannot solve this system of equations directly and find the vectors I need, and I am not sure if this is possible using the vector array apparatus.

Numerically, this problem was not resolved in Mathematica; apparently, too complex equations are obtained. For this, I added unit length conditions for the vectors of the second pyramid to the equations.

``````In(5):= pars = {Subscript((Alpha), 2) = 95*Pi/180,
Subscript((Alpha), 3) = 95*Pi/180,
Subscript(w, 1) = {0.2, 0.8, 0.3},
Subscript(w, 2) = {0.4, 0.9, 0.1},
Subscript(w, 3) = {0.2, 0.25, 0.38},
Subscript(v, 1) = {Subscript(v, 11), Subscript(v, 12),
Subscript(v, 13)},
Subscript(v, 2) = {Subscript(v, 21), Subscript(v, 22),
Subscript(v, 23)},
Subscript(v, 3) = {Subscript(v, 31), Subscript(v, 32),
Subscript(v, 33)}};
}

NSolve({Dot(Subscript(w, 1), Subscript(v, 1)) ==
Cos(Subscript((Alpha), 2)),
Dot(Subscript(w, 2), Subscript(v, 2)) ==
Cos(Subscript((Alpha), 2)),
Dot(Subscript(w, 3), Subscript(v, 3)) ==
Cos(Subscript((Alpha), 2)),
Dot(Subscript(v, 1), Subscript(v, 2)) ==
Cos(Subscript((Alpha), 3)),
Dot(Subscript(v, 2), Subscript(v, 3)) ==
Cos(Subscript((Alpha), 3)),
Dot(Subscript(v, 1), Subscript(v, 3)) ==
Cos(Subscript((Alpha), 3)), Norm({Subscript(v, 1)}, 2) == 1,
Norm({Subscript(v, 2)}, 2) == 1,
Norm({Subscript(v, 3)}, 2) == 1}, {Subscript(v, 11),
Subscript(v, 12), Subscript(v, 13), Subscript(v, 21),
Subscript(v, 22), Subscript(v, 23), Subscript(v, 31),
Subscript(v, 32), Subscript(v, 33)})
``````

## networks: NIC configuration for redundant and interconnected switching

I am trying to understand how to configure redundant switching to access a storage network. All devices are currently running on a single VLAN through 10G. Some are dual active-active (Xen hosts) while others have only one connection.

The change in question is over 7 years old, so I requested funds for a couple of replacements.

SANs are connected to the (current) switch through 2 lines: active and standby. I would like to put a line to each of the replacement switches and then duplicate all server network connections to each (new) switch.

What am I trying to plan for:
– switch failure (probable)
– SAN controller failure (also likely)
– server NIC failure (not as likely)

What I am not sure about is how to configure the server NICs. Does each one receive a separate IP or should I put them on LAG links (active-active or active on hold) with one of each pair on each switch?

It seems (to me) that this configuration will help if a switch fails, but not if a SAN storage controller fails.

Anyway, looking for a clue.

## How do I find relative errors of interconnected values ​​that incur rounding errors?

Good day to all!

I have a set of equations that involve rounding errors and I am trying to find the relative error that is incurred (Zi with respect to Zf) and (Xi with respect to Xf). Where i denotes the initial value and f denotes the final value. X, Y and Z are variables and C is a constant.
I'm not sure how to make this kind of problem.

Yi = 2 * Xi

Zi = Yi / C

if Zi <1 then Zf = 1

else Zf = floor (Zi)

Yf = Zf * C

Xf = floor (Yf / 2)

Thank you!

## embedding: a memory IC with 12 addresses and 8 data lines is interconnected with a processor. The address of your last location is FBFFh. Determine your start address

#### Battery exchange network

The Stack Exchange network consists of 174 question and answer communities that include Stack Overflow, the largest and most reliable online community for developers to learn, share their knowledge and develop their careers.

Visit Stack Exchange

## java – A good way to represent an object with multiple interconnected states?

I want to schedule a simple budget application. In my application, the budget is divided into budget periods (default months, but may be biweekly or weekly periods). In each period there is a list of spending categories. The user can perform different actions in a category, such as recording an expense, assigning a budget, creating a new category, closing an existing category, etc. Therefore, each category must have a different status for each period, but changes for a particular state of a specific period must influence the status of the category of the consecutive period (any change in spending / budget in January should change the status of a category in February). Therefore, each period must have a specific state of category that belongs to it and it can operate, but the category itself must be able to see the changes that are made and make changes in other states. Initially, I was thinking of implementing a category as a list of its states, but my instinct tells me it is not a good design. I would really like to know if there is a better design / design pattern that can be used here.