Skip to content

Commit

Permalink
post(new): addressed fat finger issues
Browse files Browse the repository at this point in the history
  • Loading branch information
YONGHUNI committed Oct 18, 2024
1 parent 0decda1 commit 4fc85d0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions posts/shinystandalone/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ filters:

# Quarto-Shinylive

Shinylive allows you to run Shiny applications entirely in a web browser, without the need for a separate server running Python.
`Shinylive` allows you to run Shiny applications entirely in a web browser, without the need for a separate server running Python.

The traditional way of deploying Shiny involves in a separate server and client: the server runs Python and Shiny, and clients connect via the web browser. Each client keeps an open websocket connection as long as they are using the application.
The traditional way of deploying `Shiny` involves in a separate server and client: the server runs `Python`/`R` and `Shiny`, and clients connect via the web browser. Each client keeps an open websocket connection as long as they are using the application.

![](https://shiny.posit.co/py/docs/shinylive-shiny-deployment-model.png){width=100%}


When an application is deployed with Shinylive, Python and Shiny run in the web browser: the browser is effectively both the client and server for the application. There is a web server that serves files, but it does not run Python or Shinyit can be a “dumb” static web server.
When an application is deployed with `Shinylive`, `Python`/`R` and `Shiny` run in the web browser: the browser is effectively both the client and server for the application. There is a web server that serves files, but it does not run `Python`/`R` or `Shiny`: it can be a “dumb” static web server.

![](https://shiny.posit.co/py/docs/shinylive-shinylive-deployment-model.png){width=100%}

Expand Down Expand Up @@ -168,7 +168,7 @@ You can play around with it. Plus, you can modify the code for a better understa
print("Hello quarto-live world!")
# set seed for reproducability
# set seed for reproducibility
set.seed(10)
givne_num <- sample(1:999, 20)
Expand All @@ -188,10 +188,10 @@ merge <- function(a, b) {
for(temp_i in 1 : length(temp)) {
# if
# the index of `a` does not exceedes the length of `a`(a present)
# the index of `a` does not exceeds the length of `a`(a present)
# a[a_i] < b[b_i] or,
# the index of `b` does exceedes the length of `b`(i.e., b does not presnt)
# the index of `b` does exceeds the length of `b`(i.e., b does not present)
if((a_i <= length(a) && a[a_i] < b[b_i]) || b_i > length(b)) {
# assign an element of `a[a_i]` into temp[a_i], then i++ the index of `a`
Expand Down Expand Up @@ -220,10 +220,10 @@ mergesort <- function(arr) {
if(length(arr) > 1) {
# midpoint for the split
# e.g., an array size of 5: celing(5/2) = 3
# e.g., an array size of 5: ceiling(5/2) = 3
half <- ceiling(length(arr)/2)
# calling recursive function: split untill the single element then sort
# calling recursive function: split until the single element then sort
# 1 to midpoint
a <- mergesort(arr[1:half])
Expand All @@ -246,7 +246,7 @@ minmax <- function(arr){
temp <- mergesort(arr)
# mimicing Python's dictionary... then return
# mimicking Python's dictionary... then return
return(list("max" = temp[length(temp)], "min" = temp[1]))
}
Expand Down

0 comments on commit 4fc85d0

Please sign in to comment.