Back to home
Miqdude
Example
We recommend using Static Generation (with and without data) whenever possible because your page can be built once and served by CDN, which makes it much faster than having a server render the page on every request. You can use Static Generation for many types of pages, including: Marketing pages Blog posts E-commerce product listings Help and documentation You should ask yourself: "Can I pre-render this page ahead of a user's request?" If the answer is yes, then you should choose Static Generation. On the other hand, Static Generation is not a good idea if you cannot pre-render a page ahead of a user's request. Maybe your page shows frequently updated data, and the page content changes on every request. In that case, you can use Server-Side Rendering. It will be slower, but the pre-rendered page will always be up-to-date. Or you can skip pre-rendering and use client-side JavaScript to populate data.
Sun Sep 22 2024
Miqdude
Example1
this is heading 1 We recommend using Static Generation (with and without data) whenever possible because your page can be built once and served by CDN, which makes it much faster than having a server render the page on every request. You can use Static Generation for many types of pages, including: Marketing pages Blog posts E-commerce product listings Help and documentation You should ask yourself: "Can I pre-render this page ahead of a user's request?" If the answer is yes, then you should choose Static Generation. On the other hand, Static Generation is not a good idea if you cannot pre-render a page ahead of a user's request. Maybe your page shows frequently updated data, and the page content changes on every request. In that case, you can use Server-Side Rendering. It will be slower, but the pre-rendered page will always be up-to-date. Or you can skip pre-rendering and use client-side JavaScript to populate data.
Wed Aug 21 2024
Miqdude
Example2
We recommend using Static Generation (with and without data) whenever possible because your page can be built once and served by CDN, which makes it much faster than having a server render the page on every request. You can use Static Generation for many types of pages, including: Marketing pages Blog posts E-commerce product listings Help and documentation You should ask yourself: "Can I pre-render this page ahead of a user's request?" If the answer is yes, then you should choose Static Generation. On the other hand, Static Generation is not a good idea if you cannot pre-render a page ahead of a user's request. Maybe your page shows frequently updated data, and the page content changes on every request. In that case, you can use Server-Side Rendering. It will be slower, but the pre-rendered page will always be up-to-date. Or you can skip pre-rendering and use client-side JavaScript to populate data.
Thu Sep 19 2024
Miqdude
Example3
We recommend using Static Generation (with and without data) whenever possible because your page can be built once and served by CDN, which makes it much faster than having a server render the page on every request. You can use Static Generation for many types of pages, including: Marketing pages Blog posts E-commerce product listings Help and documentation You should ask yourself: "Can I pre-render this page ahead of a user's request?" If the answer is yes, then you should choose Static Generation. On the other hand, Static Generation is not a good idea if you cannot pre-render a page ahead of a user's request. Maybe your page shows frequently updated data, and the page content changes on every request. In that case, you can use Server-Side Rendering. It will be slower, but the pre-rendered page will always be up-to-date. Or you can skip pre-rendering and use client-side JavaScript to populate data.
Fri Sep 20 2024
Miqdad Abdurrahman
How To Programmatically Solve Linear Equation using Gaussian Elimination
Gaussian Elimination also known as row reduction process that uses these operations: Swapping two rows, Multiplying a row by a nonzero scalar, Adding a multiple of one row to another. Using these operations, the goal is to transformed the matrix into echelon form. Echelon form is more less an upper triangular matrix which has zeros below the main diagonal (from top left to botton right) and it is also unique. Here is an example. [21−1−3−12−212][8−113]⟶[21−10121200−1][811]\begin{bmatrix} 2 & 1 & -1\\ -3 & -1 & 2\\ -2 & 1 & 2\\ \end{bmatrix} \begin{bmatrix} 8\\ -11\\ 3\\ \end{bmatrix} \longrightarrow \begin{bmatrix} 2 & 1 & -1\\ 0 & \frac{1}{2} & \frac{1}{2}\\ 0 & 0 & -1\\ \end{bmatrix} \begin{bmatrix} 8\\ 1\\ 1\\ \end{bmatrix}​2−3−2​1−11​−122​​​8−113​​⟶​200​121​0​−121​−1​​​811​​ How to get the echelon form programatically? Remember we can do operation mentioned above, from that we can make a generic like: Li=Li−ϕLi+1L_i = L_i - \phi L_{i+1}Li​=Li​−ϕLi+1​ where LLL is the row and iii is the row index and ϕ\phiϕ is a scaling factor obtained from ϕ=e(j,i)e(i,i)\phi = \frac{e_{(j,i)}}{e_{(i,i)}} ϕ=e(i,i)​e(j,i)​​ where jjj is the column index. Step 1: for example reducing the L2L_2L2​ from the matrix above the ϕ\phiϕ will be the element at 0,0 and 1,0: ϕ=e0,0e1,0=−31\phi = \frac{e_{0,0}}{e_{1,0}} = \frac{-3}{1}ϕ=e1,0​e0,0​​=1−3​ then do operation L2=L2−−31L1L_2 = L_2 - \frac{-3}{1} L_1L2​=L2​−1−3​L1​ so the L2L_2L2​ becomes [21−101212−212][813]\begin{bmatrix} 2 & 1 & -1\\ 0 & \frac{1}{2} & \frac{1}{2}\\ -2 & 1 & 2\\ \end{bmatrix} \begin{bmatrix} 8\\ 1\\ 3\\ \end{bmatrix}​20−2​121​1​−121​2​​​813​​ After that do same operation for the L3L_3L3​, calculate the ϕ\phiϕ ϕ=e0,0e2,0=2−2\phi = \frac{e_{0,0}}{e_{2,0}} = \frac{2}{-2}ϕ=e2,0​e0,0​​=−22​ then L3L_3L3​ becomes, [21−101212021][815]\begin{bmatrix} 2 & 1 & -1\\ 0 & \frac{1}{2} & \frac{1}{2}\\ 0 & 2 & 1\\ \end{bmatrix} \begin{bmatrix} 8\\ 1\\ 5\\ \end{bmatrix}​200​121​2​−121​1​​​815​​ Why not do L3=L3+L1L_3=L_3+L_1L3​=L3​+L1​ directly? It's because we need to do the same operation for all rows, otherwise it will be hard to code Step 2 Now, it's done for the second column, move to the third columns. This time what is the ϕ\phiϕ will be ? ϕ=e1,1e2,1=212\phi = \frac{e_{1,1}}{e_{2,1}} = \frac{2}{\frac{1}{2}}ϕ=e2,1​e1,1​​=21​2​ Do we need to operate the first row? NO, because we only need to make zeros below the main diagonal. now the L3L_3L3​ will be [21−10121200−1][811]\begin{bmatrix} 2 & 1 & -1\\ 0 & \frac{1}{2} & \frac{1}{2}\\ 0 & 0 & -1\\ \end{bmatrix} \begin{bmatrix} 8\\ 1\\ 1\\ \end{bmatrix}​200​121​0​−121​−1​​​811​​ Is it finished? Yes, because it's all zeros below the main diagonal Step 3 Now, we can get the value of Z and from that we do back substitution for Y and X
Tue Sep 24 2024