Search Results

Search found 565 results on 23 pages for 'xls'.

Page 17/23 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Why is Varnish not caching?

    - by Justin
    I am troubleshooting the setup of Varnish 3.x on my Ubuntu server. I'm running Drupal 7 on two sites set up on the box, via named-based vhosts. Before trying to get Varnish to play nice with Drupal I'm trying to just get Varnish to a PNG from cache. Here are the headers I get from a curl -I request of the PNG file: HTTP/1.1 200 OK Server: Apache/2.2.22 (Ubuntu) Last-Modified: Sun, 07 Oct 2012 21:18:59 GMT ETag: "a57c2-3850-4cb7ea73db6c0" Accept-Ranges: bytes Content-Length: 14416 Cache-Control: max-age=1209600 Expires: Thu, 25 Oct 2012 22:55:14 GMT Content-Type: image/png Accept-Ranges: bytes Date: Thu, 11 Oct 2012 22:55:14 GMT X-Varnish: 1766703058 Age: 0 Via: 1.1 varnish Connection: keep-alive X-Varnish-Cache: MISS Here is the Varnish VCL file I'm using (It's a default VCL configuration designed for Drupal): # Default backend definition. Set this to point to your content # server. # backend default { .host = "127.0.0.1"; .port = "8080"; } # Respond to incoming requests. sub vcl_recv { # Use anonymous, cached pages if all backends are down. if (!req.backend.healthy) { unset req.http.Cookie; } # Allow the backend to serve up stale content if it is responding slowly. set req.grace = 6h; # Pipe these paths directly to Apache for streaming. #if (req.url ~ "^/admin/content/backup_migrate/export") { # return (pipe); #} # Do not cache these paths. if (req.url ~ "^/status\.php$" || req.url ~ "^/update\.php$" || req.url ~ "^/admin$" || req.url ~ "^/admin/.*$" || req.url ~ "^/flag/.*$" || req.url ~ "^.*/ajax/.*$" || req.url ~ "^.*/ahah/.*$") { return (pass); } # Do not allow outside access to cron.php or install.php. #if (req.url ~ "^/(cron|install)\.php$" && !client.ip ~ internal) { # Have Varnish throw the error directly. # error 404 "Page not found."; # Use a custom error page that you've defined in Drupal at the path "404". # set req.url = "/404"; #} # Always cache the following file types for all users. This list of extensions # appears twice, once here and again in vcl_fetch so make sure you edit both # and keep them equal. if (req.url ~ "(?i)\.(pdf|asc|dat|txt|doc|xls|ppt|tgz|csv|png|gif|jpeg|jpg|ico|swf|css|js)(\?.*)?$") { unset req.http.Cookie; } # Remove all cookies that Drupal doesn't need to know about. We explicitly # list the ones that Drupal does need, the SESS and NO_CACHE. If, after # running this code we find that either of these two cookies remains, we # will pass as the page cannot be cached. if (req.http.Cookie) { # 1. Append a semi-colon to the front of the cookie string. # 2. Remove all spaces that appear after semi-colons. # 3. Match the cookies we want to keep, adding the space we removed # previously back. (\1) is first matching group in the regsuball. # 4. Remove all other cookies, identifying them by the fact that they have # no space after the preceding semi-colon. # 5. Remove all spaces and semi-colons from the beginning and end of the # cookie string. set req.http.Cookie = ";" + req.http.Cookie; set req.http.Cookie = regsuball(req.http.Cookie, "; +", ";"); set req.http.Cookie = regsuball(req.http.Cookie, ";(SESS[a-z0-9]+|SSESS[a-z0-9]+|NO_CACHE)=", "; \1="); set req.http.Cookie = regsuball(req.http.Cookie, ";[^ ][^;]*", ""); set req.http.Cookie = regsuball(req.http.Cookie, "^[; ]+|[; ]+$", ""); if (req.http.Cookie == "") { # If there are no remaining cookies, remove the cookie header. If there # aren't any cookie headers, Varnish's default behavior will be to cache # the page. unset req.http.Cookie; } else { # If there is any cookies left (a session or NO_CACHE cookie), do not # cache the page. Pass it on to Apache directly. return (pass); } } } # Set a header to track a cache HIT/MISS. sub vcl_deliver { if (obj.hits > 0) { set resp.http.X-Varnish-Cache = "HIT"; } else { set resp.http.X-Varnish-Cache = "MISS"; } } # Code determining what to do when serving items from the Apache servers. # beresp == Back-end response from the web server. sub vcl_fetch { # We need this to cache 404s, 301s, 500s. Otherwise, depending on backend but # definitely in Drupal's case these responses are not cacheable by default. if (beresp.status == 404 || beresp.status == 301 || beresp.status == 500) { set beresp.ttl = 10m; } # Don't allow static files to set cookies. # (?i) denotes case insensitive in PCRE (perl compatible regular expressions). # This list of extensions appears twice, once here and again in vcl_recv so # make sure you edit both and keep them equal. if (req.url ~ "(?i)\.(pdf|asc|dat|txt|doc|xls|ppt|tgz|csv|png|gif|jpeg|jpg|ico|swf|css|js)(\?.*)?$") { unset beresp.http.set-cookie; } # Allow items to be stale if needed. set beresp.grace = 6h; } # In the event of an error, show friendlier messages. sub vcl_error { # Redirect to some other URL in the case of a homepage failure. #if (req.url ~ "^/?$") { # set obj.status = 302; # set obj.http.Location = "http://backup.example.com/"; #} # Otherwise redirect to the homepage, which will likely be in the cache. set obj.http.Content-Type = "text/html; charset=utf-8"; synthetic {" <html> <head> <title>Page Unavailable</title> <style> body { background: #303030; text-align: center; color: white; } #page { border: 1px solid #CCC; width: 500px; margin: 100px auto 0; padding: 30px; background: #323232; } a, a:link, a:visited { color: #CCC; } .error { color: #222; } </style> </head> <body onload="setTimeout(function() { window.location = '/' }, 5000)"> <div id="page"> <h1 class="title">Page Unavailable</h1> <p>The page you requested is temporarily unavailable.</p> <p>We're redirecting you to the <a href="/">homepage</a> in 5 seconds.</p> <div class="error">(Error "} + obj.status + " " + obj.response + {")</div> </div> </body> </html> "}; return (deliver); } I'm getting a MISS and age 0 every time. If I'm understanding correctly, this means the file isn't being returned from Varnish's cache. Is there a problem with my Varnish config?

    Read the article

  • Reading Excel Files In C# Always Results In System.__ComObject?

    - by Soo
    This is the code I'm using to read an xls file: Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(filePath, 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0); Microsoft.Office.Interop.Excel.Sheets excelSheets = excelWorkbook.Worksheets; Microsoft.Office.Interop.Excel.Worksheet excelSheet = (Microsoft.Office.Interop.Excel.Worksheet)excelSheets.get_Item(1); MessageBox.Show(excelSheet.Cells[1,1].ToString()); Which results in a message box with: System.__ComObject Not sure what's going on, I'd really appreciate any help, thanks!

    Read the article

  • How to Create VBA Add-In with Shared Codes for All Excels?

    - by StanFish
    I'm writing VBA codes for multiple Excel spreadsheets, which will be shared with others from time to time. At some point I find there are lots of duplications in my works. So I want to find a way to share codes in a sort of Excel add-in, like the .xla file. But when I tried to save the Excel file containing shared codes as .xla file, I got some problems: The file cannot be edit anymore after I save it in the default add-in folder If I move the .xls file to a folder other than the add-in folder, and open it directly - I cannot use its classes - which creates problems for sharing the codes Any ideas to create add-ins in a flexible and powerful way please? Thanks a lot for the help

    Read the article

  • How does Windows' 'Open with' work?

    - by Frederick
    I was under the impression that when you double click a file (or choose 'Open With' from the right click menu), Windows simply calls the application with the filename as the parameter. Something like this: C: App.exe file.abc However, I just double clicked an .xls file and then checked the PEB of the Excel instance that sprang up. To my surprise the commandline did not contain the filename as a parameter. So that set me wondering. What exactly is mechanism Windows uses to have a file opened by a relevant application? Is there a special API that each application that supports such facility must expose?

    Read the article

  • Excel file reading with 2007 office connection string.

    - by p-vasuu
    Actually in my system having 2007 office then i am reading the 2003 .xls file with using the 2007 connection string string ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Filename + ";Extended Properties=\"Excel 8.0;HDR=YES;\""; data is not reading. But if the first row first column data length is lessthen 255 then the following first columns data is cutting up to 255 character. If the First row first column is morethan the 255 character then the following first columns data is reading fine. Is there any back word computability is there?

    Read the article

  • .NET component for conversion to PDF

    - by Anvar
    Hi, I am looking for .NET component to convert different files into PDF format. Right now I need to be able to convert programmatically doc, xls and TIFF files to PDF. But I may need to deal with more file types in near future. I looked at Aspose.Words, it works good but for doc only. Is there any component on the market that would allow me to convert in my code all three file types? I would appreciate your suggestions. Thanks, Anvar

    Read the article

  • Does any Version Control System like SVN, Git, or Mercurial let you "keep latest version" but not th

    - by Jian Lin
    In our project files, if there are binary files, such as .doc, .xls, .jpg, and we choose to not keep their past revisions (just keeping a latest version is ok), is there a way to tell SVN, Git, or Mercurial or some other tool to skip the revisions for these files or for a particular folder? Say, there is a 4MB .doc file that I need to check in hundred of times, but I don't really care so much about its past versions. So if the system keeps 100 revisions of it, that's already 400MB... checking in 300 times means 1.2GB for 1 file and that's not good. Only the latest version is good so that everybody can sync to it.

    Read the article

  • CREATE Excel File with hyperlinks in PHP

    - by Brian
    I have the following method to create an Excel file from in PHP starting with a two-dimensional array: header("Content-Disposition: attachment; filename=ExcelFile.xls"); header("Content-Type: application/vnd.ms-excel"); $Data[] = array('field1', 'field2', 'field3'); $Data[] = array('field1', 'field2', 'field3'); $Data[] = array('field1', 'field2', 'field3'); foreach($Data as $key => $val) { echo implode("\t", array_values($val)) . "\n"; } Would it be possible to include a hyperlink to a webpage in this file?

    Read the article

  • Attach 1 or more (non image) files to rails application, with having to install an image-processing

    - by Hinchy
    Hi all, I'm currently learning rails by creating a simple project management app. I've gotten to the point where I would like to be allow a user upload multiple files - pdfs, docs, xls etc. The user only needs to be able to attach one file at a time, but the possibilty to have multiple documents associated with a project is a must. I've spent quite a lot of time researching my options, and it appears the two main plugins are attachment_fu and paperclip. From what I've read though, these appear to concentrate specifically on the upload and subsequent resizing of images, something I couldn't care less about. Is there a simpler way to achieve what I'm trying? Thank you all in advance.

    Read the article

  • Export Multiple Sheets to Excel Through Browser

    - by ProfK
    I need to export multiple data tables to Excel on the clients machine, each to their own sheet. If it was just one sheet, I'd use the Excel/csv content type, but I've heard something about an XML format that can represent an entire workbook. I don't want to go down the Packaging and .xlsx route, so I need standard .xls. Our bug tracker, Gemini, used to have an export function that produced an XML file that Excel automatically opened as a multi-sheet workbook, but I can't find it. Is there still such a mechanism, and where can I find that schema?

    Read the article

  • VBScript Permission Denied on CopyFile

    - by Chris
    I'm running a VBScript in SQL Agent but I get a 'Permission Denied' on line 34 (the first copy attempt). I've run this script outside SQL Agent with no problems Function Main() Const SourceDrive As String = "X:\" Dim fso Dim Today Dim FileName Dim FromFile Dim FromDrive Dim ArchivePath Set fso = CreateObject("Scripting.FileSystemObject") Today = Format(Now, "yyyyMMdd") 'To add more sources just add them to the array list Dim Sources() As Variant Sources() = Array("Item1", _ "Item2") 'To add more targets just add them to the array list Dim Targets() As Variant Targets() = Array("C:\Users\myalias\Desktop\MyToFolder", _ "C:\Users\myalias\Desktop\MyToFolder2") For i = 0 To UBound(Sources) FileName = "WebSurveyAlertCallbacks_" & Sources(i) & "_" & Today & ".xls" FromDrive = fso.BuildPath(SourceDrive, Sources(i)) FromFile = fso.BuildPath(FromDrive, FileName) ArchivePath = fso.BuildPath(FromDrive, "Archive") If fso.FileExists(FromFile) Then For t = 0 To UBound(Targets) fso.CopyFile FromFile, fso.BuildPath(Targets(t), FileName), True Next fso.CopyFile FromFile, fso.BuildPath(ArchivePath, FileName), True fso.DeleteFile FromFile End If Next Set fso = Nothing Main = DTSTaskExecResult_Success End Function

    Read the article

  • Data table to Excel conversion leaves my server side button non responsive

    - by Nikhil Vaghela
    We have a web part on which we display some data in a grid. We are exporting grid's underlying datatable to Excel and displaying Open - Save - Cancel dialouge box on click of a server side button. Following is the code we are executing on click of server side button. this.Page.Response.Clear(); this.Page.Response.AppendHeader("Content-Disposition", "attachment; filename=MyTasks.xls"); this.Page.Response.ContentType = "application/ms-excel"; this.Page.Response.Write("...here goes my well formated html...."); this.Page.Response.End(); Problem is that when i click on Cancel in the diaglouge box then dialogue box to Open/Save excel disappears but all the server side buttons placed on my web part becomes non responsive, on click of any of those buttons their server side click event does not get fired !!! Any idea ? Thanks.

    Read the article

  • Produce high-quality, custom-size thumbnails from Office documents on Windows?

    - by Edwin
    Hi, What do you think would be the best way to produce custom size image thumbnail from MS Office documents (doc, xls and ppt) on Windows with native code (means all means besides .NET/JAVA)? My current research result: IExtractImage COM. Problem: The size of the generated result is fixed and low quality, and you can't be sure all the source documents contain the thumbnails. Use a programmable virtual printer to print the specified page, and the printer must support image output, any good suggestion for this? What else would you suggest? thanks!

    Read the article

  • Matlab time stamps reading

    - by Paul
    Any easy way to read all the columns in Matlab? my format is date time y1 y2 y3 y4 ......................... 4/27/2010 00:3:09 34 45 45 56 ................ so on currently i am reading these with the code [c,pathc]=uigetfile({'*.txt'},'Select the data','C:\Data'); file=[pathc c]; data= dlmread(file, ',', 1,3); so needless to say i am skipping the time stamps. Was wondering if there is aeasy way to read the time stamps and plot my other colums agianst the time in hours. my files are 43200 X 30 and some are 86400 X 90 Related question : is the format same for .csv and .xls files , i mean except ofcourse xlsread

    Read the article

  • Extract dates from filename

    - by Newbie
    I have a situation where I need to extract dates from the file names whose general pattern is [filename_]YYYYMMDD[.fileExtension] e.g. "xxx_20100326.xls" or x2v_20100326.csv The below program does the work //Number of charecter in the substring is set to 8 //since the length of YYYYMMDD is 8 public static string ExtractDatesFromFileNames(string fileName) { return fileName.Substring(fileName.IndexOf("_") + 1, 8); } Is there any better option of achieving the same? I am basically looking for standard practice. I am using C#3.0 and dotnet framework 3.5 Edit: I have like the solution and the way of answerig of LC. I have used his program like string regExPattern = "^(?:.*_)?([0-9]{4})([0-9]{2})([0-9]{2})(?:\\..*)?$"; string result = Regex.Match(fileName, @regExPattern).Groups[1].Value; The input to the function is : "x2v_20100326.csv" But the output is: 2010 instead of 20100326(which is the expected one). Can anyone please help.

    Read the article

  • How to get file path using FileUpload to be read by FileStream?

    - by john ryan
    I have a Method that open excel file and read it through exceldatareaderClass that i have downloaded in codeplex by using filestream. Currently I just declared the exact directory where the filestream open an excel file.And it works fine. Stream stream = new FileStream("C:\\" + FileUpload.PostedFile.FileName, FileMode.Open, FileAccess.Read, FileShare.Read); Now i need to read the excel file wherever location the user place it like on windows forms fileupload.FileStream needs the exact location where the file is located. How to do this.? Example: Sample.xls is located on My Documents the file path should be like : C:\Documents and Settings\user\My Documents\ string openpath ="" ;//filepath Stream stream = new FileStream(openpath+ FileUpload.PostedFile.FileName, FileMode.Open, FileAccess.Read, FileShare.Read); Thanks in Regards

    Read the article

  • How to check whether a excel file is write protected or not in C#?

    - by Pavan Navali
    Hi, I'm developing a sample application in which I have to open an excel file and check whether the file is write protercteed or not. The code is using System.Windows.Forms; using Microsoft.Office.Core; private void button1_Click(object sender, EventArgs e) { string fileNameAndPath = @"D:\Sample\Sample1.xls"; // the above excel file is a write protected. Microsoft.Office.Interop.Excel.Application a = new Microsoft.Office.Interop.Excel.Application(); if (System.IO.File.Exists(fileNameAndPath)) { Microsoft.Office.Interop.Excel.ApplicationClass app = new Microsoft.Office.Interop.Excel.ApplicationClass(); // create the workbook object by opening the excel file. app.Workbooks.Open(fileNameAndPath,0,false,5,"","",true,Microsoft.Office.Interop.Excel.XlPlatform.xlWindows,"\t",false, true, 0,false,true,0); Microsoft.Office.Interop.Excel._Workbook w = app.Workbooks.Application.ActiveWorkbook; if (w.ReadOnly) MessageBox.Show("HI"); // the above condition is true. } } I would like know whether the file is write protected or not.

    Read the article

  • php database excel export

    - by user434885
    i am using a php script to export datd from mysql into excel. the first row of the excel sheet is a column headings i want them to appear in bold how do i do this ? i am using hte following code: $con = mysql_connect("localhost","admin","password"); if (!$con) { die('Could not connect to DB: \n' . mysql_error()); } mysql_select_db("ALNMSI", $con); $result = mysql_query("SELECT * FROM survey1"); $filename = "alnmsi_" . date('d-m-Y') . ".xls"; header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-Type: application/vnd.ms-excel"); $flag = false; $flag = false; while($row = mysql_fetch_array($result)) { if(!$flag) { data_keys(); $flag = true; } array_walk($row, 'cleanData'); data_array($row);

    Read the article

  • FFT in MATLAB: wrong 0Hz frequency

    - by roujhan
    Hello I want to use fft in MATLAB to analize some exprimental data saved as an excell file. my code: A=xlsread('Book.xls'); G=A'; x=G(2, : ); N=length(x); F=[-N/2:N/2-1]/N; X = abs(fft(x-mean(x),N)) X = fftshift(X); plot(F,X) But it plots a graph with a large 0Hz wrong component, my true frequency is about 395Hz and it is not shown in the plotted graph. Please tell me what is wrong. Any help would be appreciated.

    Read the article

  • Excel worksheet error

    - by developer
    Hi, I am trying to create dynamic excel sheet, with the help of php using XML Spreadsheet. But when I try to open the dynamically created excel sheet I keep on getting error that says 'Unable to load worksheet, problem with worksheet settings'. When I try to look at the log file it had created it shows the below text, XML ERROR in Worksheet Setting REASON: Bad Value FILE: C:\Documents and Settings\UserName\Local Settings\Temporary Internet Files\Content.IE5\5XZ039FS\output[3].xls GROUP: Worksheet TAG: Table ATTRIB: ExpandedRowCount VALUE: 4 Can anybody tell what does the above error mean and how do I remove it?

    Read the article

  • MS Excel 03 - Deleting rows that have live string identifiers in column A, while concatenating other

    - by Justin
    I have this xml document that is provided as a data feed (right off the bat I can not modify the source of the data feed) and i import it into excel with the xml import. there is no schema that comes with this xml so i get a table that ends up having a whole bunch of duplicates for an identifier, because of the unique values spread throughout the spreadsheet. XML in XLS Col1(IDnum) Col2(name) Col3(Type) Col4(Category) Col(etc) ================================================================= 0011 Item 01 6B 0011 Item xxj9 7B 0011 Item xxj9 0011 Item 02 0011 Item 01 xxj9 6B 0012 etc I need to delete all rows where columnA string/number matches while concatenating all potential values from Col3, Col4 & Col5 together so it looks like this Col1(IDnum) Col2(name) Col3(Type) Col4(Category) Col(etc) ================================================================= 0011 Item 01, 02 xxj9 6B, 7B what visual basic method would allow me to accomplish this? thanks

    Read the article

  • OpenOffice/Libre office xml filter import

    - by marechs
    I'm using OpenOffice to convert documents to pdf/xls; Main system where usually is running Openoffice is Linux; There(in openoffice) is such thing as XML filters; A have package of those filters and usually to import this package I using(from launched openoffice): Tools-XML Filter settings -open package; It's like little converting server, but there is one problem - system needs X server to be running; So is there a way to import this XML filter package to Openoffice(or Libre office) from command line?

    Read the article

  • File download using Java, Struts 2 and AJAX

    - by amar4kintu
    Hello Friends, I want to give file download using java,struts2 and ajax. On my html page there is a button called "export" clicking on which ajax call will be made which will execute a query and will create .xls file using code and I want to give that file for download to user without storing it on hard drive. Does any one know how to do that using struts2 and ajax in java? Is there any example available? Let me know if you need more details from me... Thanks. amar4kintu

    Read the article

  • JQuery pass model to controller

    - by slandau
    I want to pass the mvc page model back to my controller within a Javascript Object. How would I do that? var urlString = "<%= System.Web.VirtualPathUtility.ToAbsolute("~/mvc/Indications.cfc/ExportToExcel")%>"; var jsonNickname = { model: Model, viewName: "<%= VirtualPathUtility.ToAbsolute("~/Views/Indications/TermSheetViews/Swap/CashFlows.aspx")%>", fileName: 'Cashflows.xls' } $.ajax({ type: "POST", url: urlString, data: jsonNickname, async: false, success: function (data) { $('#termSheetPrinted').append(data); } }); So where it says model: Model, I want the Model to be the actual page model that I declare at the top of the page: Inherits="System.Web.Mvc.ViewPage<Chatham.Web.Models.Indications.SwapModel>" How can I do that?

    Read the article

  • excel 2003 can`t edit comments (user)

    - by Dezigo
    I have a .xls file of excel 2003. There are a lot of comments. I can`t edit it. right click -edit comments for example: I have comment: Ludmila: comment goes here Then Ludmila: comment goes here Dezigo:new comment..! I tryed to do: Tools-options-general (change my name to Ludmila),but it`s not work.. Like it Ludmila: comment goes here Ludmila:new comment.. and comment goes here -can`t edit it. file is not protected.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23  | Next Page >