Lagrangian question with confusing variables

Thank you for your reply to Mathematics Stack Exchange!

  • Please be sure answer the question, Provide details and share your research!

But avoid

  • Ask for help, clarify, or respond to other answers.
  • Make statements based on opinions; Support them with references or personal experiences.

Use MathJax to format equations. Mathjax reference.

For more information, see our tips on writing great answers.

Confusing problem with a customer's website

Hello, I'm new to the forum. I've been working on SEO and content creation in general for a few years now, but this is the first time I've come to a dead end.

I will try to explain everything as best I can.

This is the website: https://the5thdimensions.com

January 1st, 24th, customer contacted me about his website. Says he has a lot of things to do. His first concern is that the page is extremely slow (over 20 seconds to load and over 8MB slow for all pages). The second problem is the side ranking. He claims to have been on page 1 from March 2019 to at least September 2019. When I searched for the site, I saw it on page 3, which was really bad.

2. I'm working on it and find that the site used uncompressed images and bloated a lot of code. I ask him and say I know nothing about it. I fix the problem and it takes an average of 2 seconds to load the site.

It gets strange here.

The site has a lot of content, no external links, almost no internal links, which is really strange. I had to upload and replace all of the site's media again since there was no other way to compress them with a WordPress plugin (I'm talking about JPGS with over 4K resolution, which in some cases was 5MB in size. I tried to use some tools to prevent this from re-uploading, but none could compress them under 1MB).

The site also had a lot of SEO problems according to Nibbler, UberSuggest and many other tools that I don't remember at the moment.

After uploading the images again, fixing SEO problems, adding relevant attributes to relevant images and focusing on certain keywords for the other pages, I see that the website is now on page 6.

I've done multiple tests and multiple scans and fixed many issues. I haven't changed anything in the last 2 weeks and the page is always decreasing.

Also relevant: no search console or analysis was set up on the website, but I think the previous webmaster or SEO guy used Ubersuggest to review the website and that's the only evidence I have that the website once did was on page 1. The only thing I can imagine is that the website may have been hit by the June 2019 update as it shows the decline in page rank.

My questions to the community are:
What could I possibly miss here?
Am I paranoid because I don't have enough time to see improvements? I know that ranking takes time, but I've never seen a website drop so dramatically so quickly when it comes to correcting page rank.

Any help is appreciated.
SEMrush

Maven Spring Boot – Confusing "Package does not exist" error for multi-module provider package

I have been here in many circles to find out what seemed like a trivial case.

Simple Maven joint project with several modules (parentz has subordinate providerz and dependentz)

pom.xml (parentz)

...

    org.springframework.boot
    spring-boot-starter-parent
    2.2.1.RELEASE    
    
 
parentz
parentz
0.0.0
pom
...

pom.xml (providerz)

...

    parentz
    parentz
    0.0.0
  
providerz
providerz
1.0.0
jar    
...

pom.xml (depending on z)

...

    parentz
    parentz
    0.0.0
  
dependentz
dependentz
1.0.0
war 
...

    parentz
    providerz
    1.0.0
    jar
   
...

Code:

This public class is in the providerz module:

com.shapes.model.Rec

This public class is in the dependentz module:

com.shapesui.model.RecController

And it imports from the provider:

import com.shapes.model.Rec;    <-- FAILURE POINT

Execution and errors

Provider project (OKAY):

>mvn -am -pl providerz clean install

BUILD SUCCESS

Dependent project (ERROR):

>mvn -am -pl dependentz clean package

(ERROR) target could not be executed org.apache.maven.plugins: maven-compiler-plugin: 3.8.0: compile (default-compile)
on project-dependent: compilation error
(ERROR) ... ShapesParent / dependentz / src / main / java / com / shapesui / controller / RecController.java: (12,24)
Package com.shapes.model does not exist

The bottom line is that the addict apparently cannot reference packages in the provider:

Package com.shapes.model does not exist

Spell – locate object – confusing?

If you are looking for an object to find a particular kind of thing, such as Like a gold coin, can the spell ignore known gold coins that you or party members already have with them? If the spell finds the closest object of that type, would you find the nearest and the closest as long as it is within range and within the duration of the spell, as the spell does not immediately expire once it is found? I assume that you can not change object types over time, but you have to cast a new spell over each new type. Are you looking for a gold coin (in front of me, to the west of me or similar) or are you looking for a coin that is not being worn by someone?
And is it okay to locate lead foil, for example? Lead sheets? Refined lead or the like, as this would be a common way to hide something from this divination magic?

Confusing behavior of the LQR controller, which strongly depends on the system output

I implement an LQR control for a three-story structure.

Firstly, I achieved a reasonable result with my first code (Code 1 As shown below). In this code, the output mainly contains the shifts of three floors.

In my second code (Code 2 If I use a different output that contains mostly ground accelerations, Mathematica returns the error "General" :: "munfl". Thanks to the help of Suba Thomas, I've found that state variables can change if I want an output acceleration. I think I used a proper state variable in my second code.

Another confusing thing is that my second code returns a different result (see screenshot below), even though I used the same output as in the first code.

My questions are:

  1. Why my second code gives completely different results, though
    Was the same output used?
  2. How can I successfully solve Mathematica in my second code by using an output that differs from the output in Code 1?

The data file "elcentro_NS.dat" used in my codes can be downloaded from http://www.vibrationdata.com/elcentro.htm.

Suggestions are welcome.

Thank you very much 🙂

Code 1: (gives reasonable results)

Remove("Global`*") // Quiet;
SetDirectory(NotebookDirectory());
SetOptions(Plot, PlotRange -> All, ImageSize -> Large, 
  Evaluated -> True, Frame -> True );

txgDat = Cases( 
   Import("elcentro_NS.dat", "Data"), {x1_, x2_} :> {x1, 9.8 x2});
tDat = txgDat((All, 1));
tend = Max(tDat);
xg = Interpolation(txgDat)(t);
xgMax = Max(Abs@txgDat((All, 2)));
pNmax = xgMax/1000;
mNmax = xgMax/1000;

w = 0.1;
v = 0.01;
pDat = {tDat, 
    pNmax RandomVariate(NormalDistribution(0, Sqrt(w)), 
      Length(tDat))}(Transpose);
mDat = {tDat, 
    mNmax RandomVariate(NormalDistribution(0, Sqrt(v)), 
      Length(tDat))}(Transpose);
pNoise = Interpolation(pDat)(t);
mNoise = Interpolation(mDat)(t);
(* -- m, k symbolic matrix for finding correct state ------ *)

(*m={{Subscript((ScriptM), 1),0,0},{0,Subscript((ScriptM), 
2),0},{0,0,Subscript((ScriptM), 3)}};
k=Array(Subscript((ScriptK), #1,#2)&,{3,3});
c=Array(Subscript((ScriptC), #1,#2)&,{3,3});*)
(* 
----------------------------------------------------- *)

(* -------------- m, k numerical matrix ----------------- *)

m = {{m1, 0, 0}, {0, m2, 0}, {0, 0, m3}};
k = {{k1 + k2, -k2, 0}, {-k2, k2 + k3, -k3}, {0, -k3, k3}};
m1 = m2 = m3 = 4 10^5;
k1 = k2 = k3 = 2 10^8;
(Zeta)1 = (Zeta)2 = 5/100;
(Omega)sol = (Omega) /. 
   NSolve({Det(k - (Omega)^2 m) == 0, (Omega) > 0}, (Omega));
{(Omega)1, (Omega)2} = (Omega)sol((1 ;; 2));
(Alpha)c = (
  2 (Omega)1 (Omega)2 ((Zeta)1 (Omega)2 - (Zeta)2 (Omega)1))/(
(Omega)2^2 - (Omega)1^2);
(Beta)c = (
  2 ((Zeta)2 (Omega)2 - (Zeta)1 (Omega)1))/((Omega)2^2 - 
(Omega)1^2);
c = (Alpha)c m + (Beta)c k; c/10^6;
(* ---------------------------------------------------- *)

bs = {{1, -1, 0}, {0, 1, -1}, {0, 0, 1}};
(CapitalLambda) = {{1, 1, 1}}(Transpose);

uf = {uf1(t), uf2(t), uf3(t)};(*反馈输入*)

ue = {ue1(t), ue2(t), ue3(t)};

pN = {pN1(t), pN2(t), pN3(t)};

mN = {mN1(t), mN2(t), mN3(t)};

u = Flatten@{uf, ue, pN, mN};

eq = Flatten(
     m.{x1''(t), x2''(t), x3''(t)} + c.{x1'(t), x2'(t), x3'(t)} + 
      k.{x1(t), x2(t), x3(t)}) == 
    Flatten(-m.ue + bs.uf - m.(CapitalLambda) pN) // Thread;

(DoubleStruckY) = {x1(t), x2(t), x3(t)} + ue + mN;
(DoubleStruckZ) = {x1(t), x2(t), x3(t), x1'(t), x2'(t), x3'(t)};

ss = StateSpaceModel(eq, (DoubleStruckZ), u, (DoubleStruckY), t, 
   SystemsModelLabels -> {ToString /@ u, ToString /@ y, 
     ToString /@ z});

zUncontrol = 
  StateResponse(
    ss, {0, 0, 0, xg, xg, xg, pNoise, pNoise, pNoise, mNoise, mNoise, 
     mNoise}, {t, 0, tend})((1 ;; 3));
(*Grid@{Table(Plot(zUncontrol(LeftDoubleBracket)i
(RightDoubleBracket),{t,0,tend},PlotTheme(Rule)"Web"),{i,3})}*)

(Alpha) = 50; (Beta) = 5 10^-6;
qMatrix = (Alpha) ArrayFlatten({{k, 0}, {0, 
      m}})(*IdentityMatrix(6)*);
rMatrix = (Beta) IdentityMatrix(3);
kLQR = LQRegulatorGains({ss, {1, 2, 3}}, {qMatrix, rMatrix});
Flqr = -kLQR.(DoubleStruckZ);
zLQRode = NDSolveValue(
   {eq /.
      {uf1(t) -> Flqr((1)), uf2(t) -> Flqr((2)), 
       uf3(t) -> Flqr((3)),
       ue1(t) -> xg, ue2(t) -> xg, ue3(t) -> xg,
       pN1(t) -> pNoise, pN2(t) -> pNoise, pN3(t) -> pNoise,
       mN1(t) -> mNoise, mN2(t) -> mNoise, mN3(t) -> mNoise} // 
     Simplify, 
    x1(0) == x2(0) == x3(0) == x1'(0) == x2'(0) == x3'(0) == 0}, {x1(
     t), x2(t), x3(t)}, {t, 0, tend});
(*Grid@{Table(Plot(zLQRode(LeftDoubleBracket)i(RightDoubleBracket),{
t,0,30},PlotTheme(Rule)"Web"),{i,3})}*)

Table(Plot({zUncontrol((i)), zLQRode((i)), PlotTheme -> "Web"}, {t, 0,
    tend}), {i, 3})

Code 2: (returns no or false result if the same result as in code 1 is used)

Remove("Global`*") // Quiet;
SetDirectory(NotebookDirectory());
SetOptions(Plot, PlotRange -> All, ImageSize -> Large, 
  Evaluated -> True, Frame -> True );

txgDat = Cases( 
   Import("elcentro_NS.dat", "Data"), {x1_, x2_} :> {x1, 9.8 x2});
tDat = txgDat((All, 1));
tend = Max(tDat);
xg = Interpolation(txgDat)(t);
xgMax = Max(Abs@txgDat((All, 2)));
pNmax = xgMax/1000;
mNmax = xgMax/1000;

w = 0.1;
v = 0.01;
pDat = {tDat, 
    pNmax RandomVariate(NormalDistribution(0, Sqrt(w)), 
      Length(tDat))}(Transpose);
mDat = {tDat, 
    mNmax RandomVariate(NormalDistribution(0, Sqrt(v)), 
      Length(tDat))}(Transpose);
pNoise = Interpolation(pDat)(t);
mNoise = Interpolation(mDat)(t);
Plot({pNoise, mNoise}, {t, 0, tend}, PlotRange -> All, 
  Evaluated -> True);
(* -- m, k symbolic matrix for finding correct state ------ *)

(*m={{Subscript((ScriptM), 1),0,0},{0,Subscript((ScriptM), 
2),0},{0,0,Subscript((ScriptM), 3)}};
k=Array(Subscript((ScriptK), #1,#2)&,{3,3});
c=Array(Subscript((ScriptC), #1,#2)&,{3,3});*)
(* 
----------------------------------------------------- *)

(* -------------- m, k numerical matrix ----------------- *)

m = {{m1, 0, 0}, {0, m2, 0}, {0, 0, m3}};
k = {{k1 + k2, -k2, 0}, {-k2, k2 + k3, -k3}, {0, -k3, k3}};
m1 = m2 = m3 = 4 10^5;
k1 = k2 = k3 = 2 10^8;
(Zeta)1 = (Zeta)2 = 5/100;
(Omega)sol = (Omega) /. 
   NSolve({Det(k - (Omega)^2 m) == 0, (Omega) > 0}, (Omega));
{(Omega)1, (Omega)2} = (Omega)sol((1 ;; 2));
(Alpha)c = (
  2 (Omega)1 (Omega)2 ((Zeta)1 (Omega)2 - (Zeta)2 (Omega)1))/(
(Omega)2^2 - (Omega)1^2);
(Beta)c = (
  2 ((Zeta)2 (Omega)2 - (Zeta)1 (Omega)1))/((Omega)2^2 - 
(Omega)1^2);
c = (Alpha)c m + (Beta)c k; c/10^6;
(* ---------------------------------------------------- *)

bs = {{1, -1, 0}, {0, 1, -1}, {0, 0, 1}};
(CapitalLambda) = {{1, 1, 1}}(Transpose);


uf = {uf1(t), uf2(t), uf3(t)};

ue = {ue1(t), ue2(t), ue3(t)};

pN = {pN1(t), pN2(t), pN3(t)};

mN = {mN1(t), mN2(t), mN3(t)};

u = Flatten@{uf, ue, pN, mN};

eq = Flatten(
     m.{x1''(t), x2''(t), x3''(t)} + c.{x1'(t), x2'(t), x3'(t)} + 
      k.{x1(t), x2(t), x3(t)}) == 
    Flatten(-m.ue + bs.uf - m.(CapitalLambda) pN) // Thread;

y = {x1''(t), x2''(t), x3''(t)} + ue + 
   mN;(* with this y, error of "General::munfl" generates *)

(*y={x1(t),x2(t),x3(t)}+ue+mN;*)               (* with this y, wrong 
result generates *)

z = {x3'(t), x3(t), x2'(t), x2(t), x1'(t), x1(t)};
(* state changed from descriptor ssm to a standard ssm *)

ss = StateSpaceModel(eq, z, u, y, t, 
   SystemsModelLabels -> {ToString /@ u, ToString /@ y, 
     ToString /@ z});

zUncontrol = 
  StateResponse(
    ss, {0, 0, 0, xg, xg, xg, pNoise, pNoise, pNoise, mNoise, mNoise, 
     mNoise}, {t, 0, tend})(({6, 4, 2}));
(*Grid@{Table(Plot(zUncontrol(LeftDoubleBracket)i
(RightDoubleBracket),{t,0,tend},PlotTheme(Rule)"Web"),{i,3})}*)


(Alpha) = 50; (Beta) = 5 10^-6;
qMatrix = (Alpha) ArrayFlatten({{k, 0}, {0, 
      m}})(*IdentityMatrix(6)*);
rMatrix = (Beta) IdentityMatrix(3);
kLQR = LQRegulatorGains({ss, {1, 2, 3}}, {qMatrix, rMatrix});
Flqr = -kLQR.z;
zLQRode = NDSolveValue(
   {eq /.
      {uf1(t) -> Flqr((1)), uf2(t) -> Flqr((2)), 
       uf3(t) -> Flqr((3)),
       ue1(t) -> xg, ue2(t) -> xg, ue3(t) -> xg,
       pN1(t) -> pNoise, pN2(t) -> pNoise, pN3(t) -> pNoise,
       mN1(t) -> mNoise, mN2(t) -> mNoise, mN3(t) -> mNoise} // 
     Simplify, 
    x1(0) == x2(0) == x3(0) == x1'(0) == x2'(0) == x3'(0) == 0}, {x1(
     t), x2(t), x3(t)}, {t, 0, tend});
(*Grid@{Table(Plot(zLQRode(LeftDoubleBracket)i(RightDoubleBracket),{
t,0,30},PlotTheme(Rule)"Web"),{i,3})}*)

Table(Plot({zUncontrol((i)), zLQRode((i))}, {t, 0, tend}), {i, 3})

Result of code 1

unresolved result of code 2

Code 2 generates an error

redhat – The time spent reading the disk is confusing

As stated in the documentation, the fourth field is in /proc/diskstats is:

Field  4 -- # of milliseconds spent reading
    This is the total number of milliseconds spent by all reads (as
    measured from __make_request() to end_that_request_last()).

I read it for a few seconds every second on the server with two CPUs and noticed that sdb Spend up to 8-9 seconds every 1 second reading:

# while true; do echo -n $(date); echo -n ' | '; grep -P 'sdb(D)' /proc/diskstats | tr -s ' ' | cut -d ' ' -f 8; sleep 1; done
Tue Oct 22 11:13:30 MSK 2019 | 1452477598
Tue Oct 22 11:13:31 MSK 2019 | 1452484545
Tue Oct 22 11:13:32 MSK 2019 | 1452492557
Tue Oct 22 11:13:33 MSK 2019 | 1452499787
Tue Oct 22 11:13:34 MSK 2019 | 1452507514
Tue Oct 22 11:13:35 MSK 2019 | 1452515549
Tue Oct 22 11:13:36 MSK 2019 | 1452523572
Tue Oct 22 11:13:37 MSK 2019 | 1452531846
Tue Oct 22 11:13:38 MSK 2019 | 1452540012
Tue Oct 22 11:13:39 MSK 2019 | 1452548519
^C

As mentioned in some answers here, the time lapses of parallel operations are summed, but there are only 2 CPUs in the system, not 8-9.

I'm trying to implement storage system monitoring, but I'm confused with the results.

System information:

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.6 (Maipo)

# grep 'model name' /proc/cpuinfo 
model name      : Intel(R) Xeon(R) Platinum 8160 CPU @ 2.10GHz
model name      : Intel(R) Xeon(R) Platinum 8160 CPU @ 2.10GHz

# uname -r
3.10.0-957.5.1.el7.x86_64

# lsblk
NAME                MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                   8:0    0   50G  0 disk 
├─sda1                8:1    0  953M  0 part /boot
├─sda2                8:2    0 24.1G  0 part 
│ ├─rhel-root       253:0    0 45.3G  0 lvm  /
│ └─rhel-swap       253:1    0  3.7G  0 lvm  (SWAP)
└─sda3                8:3    0   25G  0 part 
  └─rhel-root       253:0    0 45.3G  0 lvm  /
sdb                   8:16   0  100G  0 disk 
└─sdb1                8:17   0  100G  0 part 
  └─vg_data-lv_data 253:2    0  100G  0 lvm  /data
sr0                  11:0    1 1024M  0 rom

User Behavior – Is it confusing to link to another section of a website for more information?

I want to create a portfolio site for my team. I have two goals: 1. Create an area where our projects are presented. 2. Create a blog where we can post updates and talk about the background of our projects.

Here is my question:
If someone lands in the project section and sees a project, would it be confusing to have articles in the blog talking about the same project? Is that superfluous? Would a user expect to see ALL the information for a project in one place?

Or … am I doing too much with the blog? Should blogs on such websites be reserved for updates only?

java – Random password generator that ensures the variety of character types and the absence of confusing characters

I've written the following password generator to generate a password in which each character group appears at least once.

import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class PWGen {
    public static final ArrayList> groups = new ArrayList>();
    static {
        ArrayList g1 = new ArrayList();
        for (int i = 'a'; i <= 'z'; i++) {
            g1.add((char) i);
        }
        // Remove similar characters
        for (Iterator iterator = g1.iterator(); iterator.hasNext();) {
            Character character = (Character) iterator.next();
            if (character == 'l')
                iterator.remove();
        }
        ArrayList g2 = new ArrayList();
        for (int i = 'A'; i <= 'Z'; i++) {
            g2.add((char) i);
        }
        // Remove similar characters
        for (Iterator iterator = g2.iterator(); iterator.hasNext();) {
            Character character = (Character) iterator.next();
            if ("IO".contains(String.valueOf(character)))
                iterator.remove();
        }
        ArrayList g3 = new ArrayList();
        for (int i = '0'; i <= '9'; i++) {
            g3.add((char) i);
        }
        ArrayList g4 = new ArrayList();
        g4.add('-');
        ArrayList g5 = new ArrayList();
        g5.add('_');
        ArrayList g6 = new ArrayList();
        g6.add(' ');
        ArrayList g7 = new ArrayList();
        g7.add('!');
        g7.add('$');
        g7.add('%');
        g7.add('&');
        groups.addAll(List.of(g1, g2, g3, g4, g5, g6, g7));
    }

    public static final String getPassword(final int len, final int gs, final boolean any) {
        SecureRandom sr = new SecureRandom();
        while (true) {
            StringBuilder b = new StringBuilder();
            int mask = 0;
            while (b.length() < len) {
                int i1 = sr.nextInt(7);
                if (((1 << i1) & (gs)) != 0) {
                    int i2 = sr.nextInt(groups.get(i1).size());
                    b.append(groups.get(i1).get(i2));
                    mask |= (1 << i1);
                }
            }
            if (!any || mask == gs) {
                return b.toString();
            }
        }
    }

    public static void main(String() args) {
        System.out.println(getPassword(10, 0b1011111, false));
        System.out.println(getPassword(10, 0b1011111, true));
    }
}

angle – Is the name of a module generally confusing because I already have a shared and a core module?

According to the Angular Style Guide I have a shared module and a core module in my application. I also have 2 functional modules for 2 separate parts of my application. Let's say it's an order module and a forum module. Now I'm wondering where general components should go, things that are common to the application, like account settings, headers and footers (which are not reusable components).

I do not think it should work in Core, because components are not recommended in Core and it is not used in Shared because it does not contain elements that are reused in other modules. So I have two options: Use the AppModule, which I do not recommend, or create a new module. What I do not like about a general module is that it can be confusing because there is also a shared module and a core module and it's not necessarily clear where to go. Is there a better name for a universal module?