我在Linux服务器上部署了一个闪亮的应用程序.如果一分钟没有活动,我希望应用程序超时.根据我读到的内容,我将行app_idle_timeout添加到shiny-server.conf文件中,但我注意到它不起作用.有人可以建议我如何确保会话在一分钟后超时?注意:我没有闪亮的服务器PRO.
下面是我的shiny-server.conf的样子.
Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location / {
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
app_idle_timeout 60;
# When a user visits the base URL rather than a particular application,
# an …
Run Code Online (Sandbox Code Playgroud) 我想使用shinyjs从我的Shiny应用程序中获取cookie数据.我创建了一个cookie,"samplecookie = testval"; 我希望能够检索samplecookie的值.我使用下面的javascript函数(我传递cookieName并返回相应的值).
function fetchCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(";");
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==" ") c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return "No such cookie";
Run Code Online (Sandbox Code Playgroud)
以下是闪亮应用中的javascript代码
jsCode<-'shinyjs.tstfunc=
function (name) {
var nameEQ = name + "=";
var ca = document.cookie.split(";");
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==" ") c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
return …
Run Code Online (Sandbox Code Playgroud) 这可能有一个简单的答案,但我无法弄清楚,因为我仍然掌握在 SQL Server 中使用 R 的窍门。我有一段代码从 SQL Server 表中读取数据,在 R 中执行并返回一个数据框。
execute sp_execute_external_script
@language=N'R',
@script=N'inp_dat=InputDataSet
inp_dat$NewCol=max(inp_dat$col1,inp_dat$col2)
new_dat=inp_dat
OutputDataSet=new_dat'
@input_data_1=N'select * from IM_COMP_TEST_SQL2016.dbo.temp_table';
Run Code Online (Sandbox Code Playgroud)
我想将 new_dat 插入 SQL Server 表 ( select * into new_table from new_dat
)。我该怎么做?