size

R Shiny: plot with dynamical size

送分小仙女□ 提交于 2019-11-27 06:51:54
问题 I wanna have a plot with dynamic size and all should happen in the shinyUI. Here is my code: shinyUI{ sidebarPanel( sliderInput("width", "Plot Width", min = 10, max = 20, value = 15), sliderInput("height", "Plot Height", min = 10, max = 20, value = 15) ) mainPanel( plotOutput("plot", width="15cm", height="15cm") ) } I set "15cm" only to see the plot. I tried different methods to take the data from the sliderInputs and bring it to the plotOutput. I tried "input.height", "input$heigt" but

How to find out size of session in ASP.NET from web application?

末鹿安然 提交于 2019-11-27 06:50:44
How to find out size of session in ASP.NET from web application? ddc0660 If you're trying to get the size of Session during runtime rather than in debug tracing, you might want to try something like this: long totalSessionBytes = 0; BinaryFormatter b = new BinaryFormatter(); MemoryStream m; foreach(var obj in Session) { m = new MemoryStream(); b.Serialize(m, obj); totalSessionBytes += m.Length; } (Inspired by http://www.codeproject.com/KB/session/exploresessionandcache.aspx ) The code in the answer above kept giving me the same number. Here is the code that finally worked for me: private void

Maximum http request size for asp web.api with json

夙愿已清 提交于 2019-11-27 06:44:33
问题 I have web api project. I need to post there json data with file as encoded base64 string (up to 200 mb). If i send data up to about 10 mb, then next method normally get properly filled model ImportMultipleFileModel. [HttpPost] public async Task<HttpResponseMessage> ImportMultipleFiles(ImportMultipleFileModel importMultipleFileModel) { var response = ImportFiles(importFileModel); return response; } If i send more, then model is null. Why? So i change method signature to: [HttpPost] public

PHP json_encode size limit?

谁说胖子不能爱 提交于 2019-11-27 06:44:14
问题 I'm using a PHP proxy to get the contents of a file. I want to search through that file using the powerfull jQuery options, without having to write all kinds of queries in PHP. Here is my PHP code: $page = file_get_contents( filter_var( $_POST[url], FILTER_SANITIZE_URL ) ); die( json_encode( $page ) ); If the page loaded gets too big PHP will read the entire document, but json_encoding it will only give the first part of the file, not the entire file. I can't find anything about a size limit

Get the size of an Android file resource?

折月煮酒 提交于 2019-11-27 06:43:58
问题 I have a video file in the raw folder in my resources. I want to find the size of the file. I have this piece of code: Uri filePath = Uri.parse("android.resource://com.android.FileTransfer/" + R.raw.video); File videoFile = new File(filePath.getPath()); Log.v("LOG", "FILE SIZE "+videoFile.length()); But it always gives me that the size is 0. What am I doing wrong? 回答1: You can't use File for resources. Use Resources or AssetManager to get an InputStream to the resource, then call the

Get File Size On An FTP in C#

人走茶凉 提交于 2019-11-27 06:43:27
问题 I want to get the size of a file on an FTP. //Get File Size reqSize = (FtpWebRequest)FtpWebRequest.Create(new Uri(FtpPath + filePath)); reqSize.Credentials = new NetworkCredential(Username, Password); reqSize.Method = WebRequestMethods.Ftp.GetFileSize; reqSize.UseBinary = true; FtpWebResponse respSize = (FtpWebResponse)reqSize.GetResponse(); long size = respSize.ContentLength; respSize.Close(); I have tried the following but get a 550 error. File not found / no access. However, the following

Which icon sizes to use with a JFrame's setIconImages() method?

旧城冷巷雨未停 提交于 2019-11-27 06:37:55
问题 Does anyone know which icon sizes to use with the setIconImages() (PLURAL) method for a jFrame so that my app icons display well on all platforms and in all contexts (e.g., window icon, taskbar icon, alt-tab icon, etc.)? I've found an example that uses a 16px-by-16px and a 32px-by-32px image, but do I need to go any bigger? To test, I have also tried adding 64px and 128px versions to the List passed to setIconImages(), but these do not seem to be used on my Windows 7 machine. However, I

PHPExcel auto size column width

萝らか妹 提交于 2019-11-27 06:26:16
I'm trying to auto size the columns of my sheet. I'm writing the file and in the end I try to resize all of my columns. // Add some data $objPHPExcel->setActiveSheetIndex(0) ->setCellValue('B1', 'test1111111111111111111111') ->setCellValue('C1', 'test1111111111111') ->setCellValue('D1', 'test1111111') ->setCellValue('E1', 'test11111') ->setCellValue('F1', 'test1') ->setCellValue('G1', 'test1'); foreach($objPHPExcel->getActiveSheet()->getColumnDimension() as $col) { $col->setAutoSize(true); } $objPHPExcel->getActiveSheet()->calculateColumnWidths(); The above code doesn't work. Doesn't change

ajax response byte size

安稳与你 提交于 2019-11-27 06:25:00
问题 I'm using jQuery's getJSONP and I want to log the duration of the call and the size of the response to be able to have some statistics about the usage of my application. This is a cross domain ajax call, so I need to use JSONP, but as the JSONP call is not done with an XMLHttpRequest object, the complete callback from jquery's ajax doesn`t pass the response content. So my question is how to get the response size (content lenght) from a JSONP call. $.ajaxSetup( { complete:function(x,e) { log(x

大话数据结构读后感(二)串

我的梦境 提交于 2019-11-27 06:22:26
5.2 串的定义 5.3 串的比较 strcmp(); 5.6 朴素的模式匹配算法 //KMP模式匹配算法   int Index(String S , Sring T , int pos)   {     int i=pos;     int j=0;     //int next[255];     //get_next(T,next);//KMP算法得到next数组;     while(i<S.size()&&j<=T.size())     {       if(S[i]==T[j]) // || j==0;       {          ++i;        ++j;       }       else       {         i=i-j+1; //i退回到上次匹配的首位的下一位;         j=0; //子串退回到T的首位;         //j=next[j]; //j退回合适的位置,i不变; KMP算法;       }     }     if(j>T.size())     {       return i-T.size();     }     else       return 0;   } next数组的推演;   void get_next(Sting T,int *next)   {     int i,j;     i=1;