Derivatives – solve differential equations in conjunction with the finite difference method

I have these three differential equations, in which I have to solve numerically:

$$
frac {dn_0} {dt} = -n_0 (t) W_ {01} (t) + n_1 (t) K_ {10}
$$

$$
frac {dn_1} {dt} = -n_1 (t) W_ {12} (t) – n_1 (t) K_ {10} + n_2 (t) K_ {21} + n_0 (t) W_ {01} (t )
$$

$$
frac {dn_2} {dt} = n_1 (t) W_ {12} (t) – n_2 (t) K_ {21}
$$

so that

$$ n_0 (0) = 1 $$
$$ n_0 (N) = 0 $$
$$ n_1 (0) = 0 $$
$$ n_1 (N) = 1 $$
$$ n_2 (0) = 0 $$
$$ n_2 (N) = 0 $$

Use of the central formula of the finite differences:

$$ frac {n_ {0} (t + Delta t) – n_ {0} (t – Delta t)} {2 Delta t} = – n_0 (t) W_ {01} (t) + n_1 (t) K_ {10} $$

$$ frac {n_ {1} (t + Delta t) – n_ {1} (t – Delta t)} {2 Delta t} = – n_1 (t) W_ {12} (t) – n_1 (t) K_ {10} + n_2 (t) K_ {21} + n_0 (t) W_ {01} (t) $$

$$ frac {n_ {2} (t + Delta t) – n_ {2} (t – Delta t)} {2 Delta t} = n_1 (t) W_ {12} (t) – n_2 ( t) K_ {21}
$$

How do I determine the functions n0, n1 and n2 in the knowledge that n1 + n2 + n3 = and that the three equations are coupled?

And I could not understand how to calculate the derivatives, how can I determine their value with the finite difference method without knowing the functions?

Can someone help me please?

Windows 10 – Problem with the C ++ library in conjunction with Clion and Cygwin

I have the following error when trying to compile a C ++ program while linking Libssh library on Windows (libssh-common and libssh-devel packages, both installed with cygwin). Clion does not give me an include error, and Cmake finds the library during Clone cmake reload. Compiling / linking, however, complains that the references are undefined.

Could someone point out my stupid mistake?
Thank you in advance!

Scan dependencies of the target main area
[ 50%] Create CXX object CMakeFiles / main.dir / main.cpp.o
[100%] Linking the executable file CXX main.exe
CMakeFiles / main.dir / main.cpp.o: main.cpp :(. Text + 0x30): undefined reference to `ssh_new & # 39;
CMakeFiles / main.dir / main.cpp.o: main.cpp :(. Text + 0x30): The move was truncated to fit: R_X86_64_PC32 against undefined icon `ssh_new & # 39;
collect2: error: ld returned 1 exit status

my CmakeLisst.txt

add_executable (main main.cpp)
find_package (LIBSSH)
IF (LIBSSH_FOUND)
Message ($ {LIBSSH_VERSION})
include_directories ($ {LIBSSH_INCLUDE_DIR})
link_directories ($ {LIBSSH_INCLUDE_DIR})
target_link_libraries (main $ {LIBSSH_LIBRARIE})
endif ()

Output Cmake reload

C:  Users  seven  .CLion2018.3  system  cygwin_cmake  bin  cmake.exe -DCMAKE_BUILD_TYPE = -DCMAKE_MAKE_PROGRAM = C: /cygwin64/bin/make.exe -DCMAKE_C_COMPILER = C: / cywin64 / bin / gb -DCMAKE_CXX_COMPILER = C: / cygwin64 / bin / g ++. Exe -G "CodeBlocks - Unix Makefiles" "/ cygdrive / c / Users / seven / Documents / github / Server Control"
0,7,5
- Configuration finished
- Generation takes place
- Build files were written to / cygdrive / c / Users / seven / Documents / github / servercontrol / cmake-build-default-cygwin

[Finished]

main.cpp

#include 
#include 
#define LIBSSH_STATIC 1
#include 

int main () {
std :: cout << "hello world" << std :: endl;
ssh_session my_ssh_session = ssh_new ();
Return 0;
}

Google Sheets – Using a FILTER feature in conjunction with other features

model Gazette

I'm looking for a function to display the title (from column B) that has the lowest numeric mean in column (found from column G). I already have that in the form of

= INDEX (B2: G, match (min (G2: G), G2: G, WRONG), 1)

but I want to further specify it so that it only picks the title with the lowest average, which also belongs to a certain category. Let's say I want a feature to search for the lowest-average title in Category A only. I want "B" to be displayed instead of "K", which outputs the above function.

Javascript – Why is it important never to use "eval" in conjunction with AJAX?

From the OWASP AJAX Safety Cheat Sheet:

Eval is evil, never use it. Using eval usually indicates a problem in your design.

I understand that evalCreating untrusted JS code can lead to a whole world of pain. Nevertheless, I do not understand the categoricity of the OWASP ban.

As I understand things, it is quite possible to use them eval sure, namely if the evalThe code is trusted.

I develop a hobby web app (game) in my free time (not yet published). In this app I use eval, Although this is a single page, sometimes I find it easier for the server to send HTML code blocks to the browser instead of having the browser create the page from scratch. So I do that:

  1. Let the browser launch an XMLHttpRequest for a page fragment to the server.
  2. Download the received HTML code (this implies) innerHTMLwhich, by the way, is another matter, warns OWASP again
  3. Since innerHTML The JS code in the assigned fragment will not be executed. Search for the loaded HTML code script Tags and eval You.

This clearly violates the OWASP guidelines. However, I do not see that this is less secure than loading an HTML / CSS / JS page normally from the server without AJAX by just typing the address of the page into the address bar of the browser. In both cases (loading the page from address bar vs innerHTML& Ing and – gasp! – eval(Answer from an AJAX call to the server) It is implicitly assumed that the website relies on this website. If the server is compromised and spends unwanted HTML / JS code, everyone is equally crazy, even if it's not an evil eval is used. Otherwise everyone is equally safe.

However, I know that I am not an expert. I probably have a very limited understanding. If OWASP categorically prohibits something, then they probably have good reasons for doing so. Let me then ask, what is the risk, what I have described?