Search Results

Search found 69973 results on 2799 pages for 'file comparison'.

Page 10/2799 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Whats a good structure to save and retrieve locations of images?

    - by Goot
    I got a java-ee application, where I collect informations about movies. Im my backend I provide data like the name, description, genre and a random uuid. I also got lots of related files, which are stored on a file server. Including some screenshots, the dvd or bluRay cover and video trailers. My current approach is: When saving the files to the fileserver, I retrieve the movies random uuid (which is the primary key btw.). I then rename the files screenshot_[UUID]_1, screenshot_[UUID]_2 ... etc. Now, there are lots of other ways to handle this, like saving all filenames in a database or creating a dir structure on the fileserver for every uuid and, e.g., return all images in the "[uuid]/screenshots" folder via REST. I expect about 30k requests a day, so the service has to be pretty performant. Whats the best way to solve this?

    Read the article

  • Very weird C file-handling anomaly

    - by KáGé
    Hello, I got a very weird issue that I cant figure out in my school project, which is the simulation of a simple filesystem in a human-readable textfile. Unfortunately I don't yet have enough time to translate the comments in my code or make it less gibberish, so if you are bothered by that, you don't have to help, I understand. See the code HERE. Now in drive.h, at line 574 is this part: i = getline(); #ifdef DEBUG printf("Free space in all found at %d.\n\n", i); if(drive.disk != NULL){ printf("Disk OK\n\n"); } #endif //write in data state = seekline(i); Before this it finds place for the allocation database entry in the ALL sector (see the "image files" in the mounts folder, this issue was tested on mount_30.efs-dbf), then gets the line with i = getline() fine (getline is in lglobal.h, line 39), but after that any file manipulation (in this case seekline's fseek, but if I comment that out, then the first fprintf after that) crashes the program straight away. I think the file gets somehow corrupted (though the Disk OK message appears) but can't figure out how. I've tried putting i = getline(); into comment, but it didn't make any difference. I've also tried asking at local programming forums but they didn't really help either. The last few lines of the output before it crashes: Dir written. (drive.h line 562) Seekline entered: 268 (called at drive.h line 564) Getline entered. (called at drive.h line 574) Line got: 268. Free space in all found at 268. (drive.h line 576) Seekline entered: 268 (called at drive.h line 582, note that this exact call was run successfully less than 20 lines back. This one should set the pointer to the beginning of the line it is currently in) After this it crashes. Does anyone has any idea of what causes this and how could I fix it? Thank you.

    Read the article

  • Generate and download a text file in javascript

    - by Mark B
    All my research so far suggests this can't be done, but I'm hoping someone here has some cunning ideas. I have a form on a website which allows users to bulk upload lots of URLs to add to a list on the server. There's quite a lot of server-side processing to do on each URL, so to avoid timeouts and to display progress, I've implemented the upload using jQuery to submit the URLs one at a time using ajax. This is all working nicely. However, part of the processing on each URL is deduplicating it against the complete list. The ajax call returns a status indicating either a successful upload or a rejection due to duplication. As the upload progresses, I tell the user how many URLs have been rejected as duplicates (along with overall progress and ETA). The problem now is how to give the user a complete list of the failed duplicate URLs. I've kept them in an array in my jQuery, and would like the user to be able to click on a link on the form to download a text file containing those URLs. Is this possible just using client-side processing? The server-side processing basically handles a single keyword at a time. I'd rather not have to store the duplicates in a database table with some kind of session key which gets sent with every ajax call, and is then used at the end to generate the text file server-side (and then gets cleaned up some time later). I can see how to do this, but it seems very clunky and a bit 20th century.

    Read the article

  • Zabbix doesn't update value from file neither with log[] nor with vfs.file.regexp[] item

    - by tymik
    I am using Zabbix 2.2. I have a very specific environment, where I have to generate desired data to file via script, then upload that file to ftp from host and download it to Zabbix server from ftp. After file is downloaded, I check it with log[] and vfs.file.regexp[] items. I use these items as below: log[/path/to/file.txt,"C.*\s([0-9]+\.[0-9])$",Windows-1250,,"all",\1] vfs.file.regexp[/path/to/file.txt,"C.*\s([0-9]+\.[0-9])$",Windows-1250,,,\1] The line I am parsing looks like below: C: 8195Mb 5879Mb 2316Mb 28.2 The value I want to extract is 28.2 at the end of file. The problem I am currently trying to solve is that when I update the file (upload from host to ftp, then download from ftp to Zabbix server), the value does not update. I was trying only log[] at start, but I suspect, that log[] treat the file as real log file and doesn't check the same lines (althought, following the documentation, it should with "all" value), so I added vfs.file.regexp[] item too. The log[] has received a value in past, but it doesn't update. The vfs.file.regexp[] hasn't received any value so far. file.txt has got reuploaded and redownloaded several times and situation doesn't change. It seems that log[] reads only new lines in the file, it doesn't check lines already caught if there are any changes. The zabbix_agentd.log file doesn't report any problem with access to file, nor with regexp construction (it did report "unsupported" for log[] key, when I had something set up wrong). I use debug logging level for agent - I haven't found any interesting info about that problem. I have no idea what I might be doing wrong or what I do not know about how Zabbix is performing these checks. I see 2 solutions for that: adding more lines to the file instead of making new one or making new files and check them with logrt[], but those doesn't satisfy my desires. Any help is greatly appreciated. Of course I will provide additional information, if requested - for now I don't know what else might be useful.

    Read the article

  • SQL SERVER – Server Side Paging in SQL Server 2011 Performance Comparison

    - by pinaldave
    Earlier, I have written about SQL SERVER – Server Side Paging in SQL Server 2011 – A Better Alternative. I got many emails asking for performance analysis of paging. Here is the quick analysis of it. The real challenge of paging is all the unnecessary IO reads from the database. Network traffic was one of the reasons why paging has become a very expensive operation. I have seen many legacy applications where a complete resultset is brought back to the application and paging has been done. As what you have read earlier, SQL Server 2011 offers a better alternative to an age-old solution. This article has been divided into two parts: Test 1: Performance Comparison of the Two Different Pages on SQL Server 2011 Method In this test, we will analyze the performance of the two different pages where one is at the beginning of the table and the other one is at its end. Test 2: Performance Comparison of the Two Different Pages Using CTE (Earlier Solution from SQL Server 2005/2008) and the New Method of SQL Server 2011 We will explore this in the next article. This article will tackle test 1 first. Test 1: Retrieving Page from two different locations of the table. Run the following T-SQL Script and compare the performance. SET STATISTICS IO ON; USE AdventureWorks2008R2 GO DECLARE @RowsPerPage INT = 10, @PageNumber INT = 5 SELECT * FROM Sales.SalesOrderDetail ORDER BY SalesOrderDetailID OFFSET @PageNumber*@RowsPerPage ROWS FETCH NEXT 10 ROWS ONLY GO USE AdventureWorks2008R2 GO DECLARE @RowsPerPage INT = 10, @PageNumber INT = 12100 SELECT * FROM Sales.SalesOrderDetail ORDER BY SalesOrderDetailID OFFSET @PageNumber*@RowsPerPage ROWS FETCH NEXT 10 ROWS ONLY GO You will notice that when we are reading the page from the beginning of the table, the database pages read are much lower than when the page is read from the end of the table. This is very interesting as when the the OFFSET changes, PAGE IO is increased or decreased. In the normal case of the search engine, people usually read it from the first few pages, which means that IO will be increased as we go further in the higher parts of navigation. I am really impressed because using the new method of SQL Server 2011,  PAGE IO will be much lower when the first few pages are searched in the navigation. Test 2: Retrieving Page from two different locations of the table and comparing to earlier versions. In this test, we will compare the queries of the Test 1 with the earlier solution via Common Table Expression (CTE) which we utilized in SQL Server 2005 and SQL Server 2008. Test 2 A : Page early in the table -- Test with pages early in table USE AdventureWorks2008R2 GO DECLARE @RowsPerPage INT = 10, @PageNumber INT = 5 ;WITH CTE_SalesOrderDetail AS ( SELECT *, ROW_NUMBER() OVER( ORDER BY SalesOrderDetailID) AS RowNumber FROM Sales.SalesOrderDetail PC) SELECT * FROM CTE_SalesOrderDetail WHERE RowNumber >= @PageNumber*@RowsPerPage+1 AND RowNumber <= (@PageNumber+1)*@RowsPerPage ORDER BY SalesOrderDetailID GO SET STATISTICS IO ON; USE AdventureWorks2008R2 GO DECLARE @RowsPerPage INT = 10, @PageNumber INT = 5 SELECT * FROM Sales.SalesOrderDetail ORDER BY SalesOrderDetailID OFFSET @PageNumber*@RowsPerPage ROWS FETCH NEXT 10 ROWS ONLY GO Test 2 B : Page later in the table -- Test with pages later in table USE AdventureWorks2008R2 GO DECLARE @RowsPerPage INT = 10, @PageNumber INT = 12100 ;WITH CTE_SalesOrderDetail AS ( SELECT *, ROW_NUMBER() OVER( ORDER BY SalesOrderDetailID) AS RowNumber FROM Sales.SalesOrderDetail PC) SELECT * FROM CTE_SalesOrderDetail WHERE RowNumber >= @PageNumber*@RowsPerPage+1 AND RowNumber <= (@PageNumber+1)*@RowsPerPage ORDER BY SalesOrderDetailID GO SET STATISTICS IO ON; USE AdventureWorks2008R2 GO DECLARE @RowsPerPage INT = 10, @PageNumber INT = 12100 SELECT * FROM Sales.SalesOrderDetail ORDER BY SalesOrderDetailID OFFSET @PageNumber*@RowsPerPage ROWS FETCH NEXT 10 ROWS ONLY GO From the resultset, it is very clear that in the earlier case, the pages read in the solution are always much higher than the new technique introduced in SQL Server 2011 even if we don’t retrieve all the data to the screen. If you carefully look at both the comparisons, the PAGE IO is much lesser in the case of the new technique introduced in SQL Server 2011 when we read the page from the beginning of the table and when we read it from the end. I consider this as a big improvement as paging is one of the most used features for the most part of the application. The solution introduced in SQL Server 2011 is very elegant because it also improves the performance of the query and, at large, the database. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: SQL, SQL Authority, SQL Optimization, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • SSI: Failed String Comparison with CGI Environment Variable [migrated]

    - by Calyo Delphi
    I am currently working on developing a personal website. It's not my first time doing this, but this is my first major foray into implementing SSI. I've run myself into a wall, however, with an if-else directive that uses one of the CGI environment variables as part of its comparison. Even after some limited attempts at debugging, all of the output and documentation that I have means that the comparisons being made should fail outright. This is not the case, and the wrong evaluation is being made by the if-else directive. Here's the code in the file index.shtml: <head> <!--#set var="page" value="Home" --> <!--#include file="headlinks.shtml" --> <style> img#ref { float: right; margin-left: 8px; border-width: 0px; } </style> </head> Here's the code in the file headlinks.shtml: <title><!--#echo var="page" --> &ndash; <!--#echo var="HTTP_HOST" --></title> <!--#set var="docroot" value="${DOCUMENT_ROOT}" --> <!--#echo var="docroot" --> <!--#if expr="( $docroot != '/Applications/MAMP/htdocs' ) || ( $docroot != '/home/dragarch/public_html' )" --> <link rel="stylesheet" type="text/css" href="../style.css"> <link rel="shortcut icon" type="image/svg+xml" href="../favicon.svg" /> <!--#else --> <link rel="stylesheet" type="text/css" href="style.css"> <link rel="shortcut icon" type="image/svg+xml" href="favicon.svg" /> <!--#endif --> And here's the output for the file index.shtml: <title>Home &ndash; dragarch</title> /Applications/MAMP/htdocs <link rel="stylesheet" type="text/css" href="../style.css"> <link rel="shortcut icon" type="image/svg+xml" href="../favicon.svg" /> Both style.css and favicon.svg are in the document root with index.shtml, so the if directive should fail and default to the output of the else directive. As you can see, while the document root (which is currently the MAMP htdocs folder on my own notebook) is correct according to the output of the echo directive, the comparison in the if-else directive fails to compare the strings properly. I'm using this page for my documentation: http://httpd.apache.org/docs/2.2/mod/mod_include.html I'm at a complete loss as to why this is the case, and need a bit of help here. EDIT: I should note that dragarch is a hostname that I configured in /etc/hosts to point to 127.0.0.1 so I could test the site without having to use localhost. It has no real effect on the functionality of anything, other than to just act as a prettier hostname to use.

    Read the article

  • Help needed implementing a web based file management system with a file hierarchy system, help neede

    - by molleman
    Hello i am trying to create a web application that will allow users to upload files online, i am using gwt while using hibernate for database communication, i am able to upload file to a server , and store them on the server. but what i want is to associate the files with a user. i want the user to be able to create folders and store a file in sub folders. my logic was to use the composite pattern to store folders and fileLocations with a user but i am am finding it difficult to implement this so i can show the files and folders within a gwt tree. what would be the best way to implement a hierarchy of folders and information of the location of a file so it could be displayed in a gwt tree? what i did have was a User would hold a reference to a root folder and then each sub folder could hold folders or fileLocations. i used the composite pattern to implement the file hierarchy, but when i want to display a the contents of a folder i need a for loop for each list. so i could a folder within a folder within a folder that would need 3 for loops to show the contents of my folders. What is the best way to implement this file management system. so what do you guys think?

    Read the article

  • java IO to copy one File to another

    - by Aly
    I have two Java.io.File objects file1 and file2. I want to copy the contents from file1 to file2. Is there an standard way to do this without me having to create a method that reads file1 and write to file2

    Read the article

  • dpkg: warning: files list file for package 'x' missing

    - by Mark
    I get this warning for several packages every time I install any package or perform apt-get upgrade. Not sure what is causing it; it's a fresh Debian install on my OpenVZ server and I haven't changed any dpkg settings. Here's an example: root@debian:~# apt-get install cowsay Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: filters The following NEW packages will be installed: cowsay 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 21.9 kB of archives. After this operation, 91.1 kB of additional disk space will be used. Get:1 http://ftp.us.debian.org/debian/ unstable/main cowsay all 3.03+dfsg1-4 [21.9 kB] Fetched 21.9 kB in 0s (70.2 kB/s) Selecting previously unselected package cowsay. dpkg: warning: files list file for package 'libssh2-1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libkrb5-3:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libwrap0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libcap2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libpam-ck-connector:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libc6:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libtalloc2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libselinux1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libp11-kit0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libavahi-client3:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libbz2-1.0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libpcre3:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libgpm2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libgnutls26:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libavahi-common3:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libcroco3:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'liblzma5:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libpaper1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libsensors4:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libbsd0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libavahi-common-data:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libss2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libblkid1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libslang2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libacl1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libcomerr2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libkrb5support0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'e2fslibs:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'librtmp0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libidn11:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libpcap0.8:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libattr1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libdevmapper1.02.1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'odbcinst1debian2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libexpat1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libltdl7:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libkeyutils1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libcups2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libsqlite3-0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libck-connector0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'zlib1g:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libnl1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libfontconfig1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libudev0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libsepol1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libmagic1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libk5crypto3:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libunistring0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libgpg-error0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libusb-0.1-4:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libpam0g:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libpopt0:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libgssapi-krb5-2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libgeoip1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libcurl3-gnutls:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libtasn1-3:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libuuid1:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libgcrypt11:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libgdbm3:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libdbus-1-3:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libsysfs2:amd64' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'libfreetype6:amd64' missing; assuming package has no files currently installed (Reading database ... 21908 files and directories currently installed.) Unpacking cowsay (from .../cowsay_3.03+dfsg1-4_all.deb) ... Processing triggers for man-db ... Setting up cowsay (3.03+dfsg1-4) ... root@debian:~# Everything works fine, but these warning messages are pretty annoying. Does anyone know how I can fix this?

    Read the article

  • C#/.NET: Retrieving the contents/file attributes from a file inside a recycle bin

    - by eibhrum
    Hi, I just wanna ask if there's a possibility to retrieve the contents of a 'dump' file from the recycle bin programatically. The contents that I'm looking for are file attributes like 'Date Last Modified, 'Data created', 'size', etc (without restoring the file itself to the original location to preserve the original attributes found while inside the recycle bin.) Comments and suggestions are highly appreciated. Thanks.

    Read the article

  • File Output using Gforth

    - by sheepez
    As a first project I have been writing a short program to render the Mandelbrot fractal. I have got to the point of trying to output my results to a file ( e.g. .bmp or .ppm ) and got stuck. I have not really found any examples of exactly what I am trying to do, but I have found two examples of code to copy from one file to another. The examples in the Gforth documentation ( Section 3.27 ) did not work for me ( winXP ) in fact they seemed to open and create files but not write to files properly. This is the Gforth documentation example that copies the contents of one file to another: 0 Value fd-in 0 Value fd-out : open-input ( addr u -- ) r/o open-file throw to fd-in ; : open-output ( addr u -- ) w/o create-file throw to fd-out ; s" foo.in" open-input s" foo.out" open-output : copy-file ( -- ) begin line-buffer max-line fd-in read-line throw while line-buffer swap fd-out write-line throw repeat ; I found this example ( http://rosettacode.org/wiki/File_IO#Forth ) which does work. The main problem is that I can't isolate the part that writes to a file and have it still work. The main confusion is that r doesn't seem to consume TOS as I might expect. : copy-file2 ( a1 n1 a2 n2 -- ) r/o open-file throw >r w/o create-file throw r> begin pad maxstring 2 pick read-file throw ?dup while pad swap 3 pick write-file throw repeat close-file throw close-file throw ; \ Invoke it like this: s" output.txt" s" input.txt" copy-file I would be very grateful if someone could explain exactly how the open, create read and write -file words actually work, as my investigation keeps resulting in somewhat bizarre stacks. Any clues as to why the Gforth examples do not work might help too. In summary, I want to output from Gforth to a file and so far have been thwarted. Can anyone offer any help? Thank you Vijay, I think that I understand the example that you gave. However when I try to use something like this ( which I think is similar ): 0 value test-file : write-test s" testfile.out" w/o create-file throw to test-file s" test text" test-file write-line ; I get ok but nothing is put into the file, have I made a mistake? It seems that the problem was due to not flushing the relevant buffers or explicitly closing the file. Adding something like test-file flush-file throw or test-file close-file throw between write-line and ; makes it work. Thanks again Vijay for helping.

    Read the article

  • php : get file content and store file in particular folder

    - by Sanjay
    hi , i am getting file content from file_get_content funtion in php. and want to store that file in particular folder. how could i store that file in particular folder. $image = file_get_contents('http://www.affiliatewindow.com/logos/1961/logo.gif'); i want to save this image in particular folder. any idea abt it?

    Read the article

  • How do I force specific permissions for new files/folders on Linux file server?

    - by humble_coder
    I'm having an issue with my install of Ubuntu 9.10 (file server) and its samba permissions. Logging in and reading works fine. However, creation of new directories by users restricts access for other users. For instance, if Bob (Windows user who maps the drive) creates a folder in the directory, Jane (Mac user that simply smb mounts) can read from it, but can't write to it -- and vice versa. I then must go CHMOD 777 the directory for everyone to be happy. I've tried editing the "create/directory mask", and "force" options in the smb.conf file but this doesn't seem to help. I'm about to resort to CRONTABing a recursive chmod routine, although I'm sure this isn't the fix. How do I get all new items to always be 777? Does anyone have any suggestions to fix this ever-occurring situation? Best

    Read the article

  • Resuming File Downloads in Ruby on Rails

    - by jaycode
    Hi, this has been asked here: http://stackoverflow.com/questions/1840413/resuming-file-downloads-in-ruby-on-rails-range-header-support But there was no answer. I am having similar problem, could anybody help, please? Thanks before. Alright I am getting close. Seems like I need to setup header Content-Length or Content-Range, as described here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13. Haven't got an idea how. Anybody knows? Jay response.header["Content-Range"] = "20000-#{size}" send_file "#{Dir.pwd}/products/filename.zip", :type => 'application/zip', :size => (size - 20000) doesn't work

    Read the article

  • NoSQL as file meta database

    - by fga
    I am trying to implement a virtual file system structure in front of an object storage (Openstack). For availability reasons we initially chose Cassandra, however while designing file system data model, it looked like a tree structure similar to a relational model. Here is the dilemma for availability and partition tolerance we need NoSQL, but our data model is relational. The intended file system must be able to handle filtered search based on date, name etc. as fast as possible. So what path should i take? Stick to relational with some indexing mechanism backed by 3 rd tools like Apache Solr or dig deeper into NoSQL and find a suitable model and database satisfying the model? P.S: Currently from NoSQL Cassandra or MongoDB are choices proposed by my colleagues.

    Read the article

  • 1 to 1 Comparison and Ranking System

    - by David
    I'm looking to create a comparison and ranking system which allows users to view 2 items, click on the one that they feel is the better one and then get presented with 2 more random items and continue to do this until they decide to stop. In the background, I want the system to use these wins and loses to rank each item in an overall ranking table so I can then see what is #1 and what isn't. I haven't got a clue where to begin with the formula, but I image I need to log wins and loses. Any help/direction appreciated!

    Read the article

  • Comparison between a value with static type Array and a possibly unrelated type Class

    - by Kaoru
    I got this error: Comparison between a value with static type Array and a possibly unrelated type Class. After i modify the class to many classes (before that, everything is on 1 class (all of the functions)), but after i move everything to many classes (all the functions is not on 1 class), that error appear. How to solve this? I am using AS3 and as3isolib Library. Here is the code after i modify the function: if (Constant.dude.y < Constant._numY) { if (Constant.dude.sprites != marioBackClass) { Constant.dude.sprites = [marioBackClass]; Constant.dudeDir = "Up"; } } Here is the code before i change the function to many classes: if (dude.y < ._numY) { if (dude.sprites.toString() != marioBackClass.toString()) { dude.sprites = [marioBackClass]; dudeDir = "Up"; } }

    Read the article

  • How to organize my site's file system properly?

    - by Wolfpack'08
    Doing some reading on Stack Overflow, I've found a lot of information suggesting that proper organization of a file system is crucial to a well-written web app. One of the key pieces of evidence is high-frequency references to "separation of concerns" in questions related to keeping programs organized. Now, I've found some information on organizing file systems (Filesystem Hierarchy Standard) from 2004. It raises only two concerns: first, the standard's a bit dated, so I believe it may be possible to do better given the changes in technology over the past 8 years; second, and most important, my application is very small compared to an entire Linux distro. I think that the file system should be organized very differently because of that. Here's what I'm looking at, currently: /scripts, /databases, /www -> /dev, /production -> login, router, admin pages, /sites -> content types, static pages /modules, /includes, /css, /media -> /module-specific-media

    Read the article

  • Does this file format exist?

    - by Jon Chase
    Is there a file format that handles the following use case... I'd like to create a tar file (or whatever - I'm just using tar here b/c it's a well known file format for containing multiple files) that would be usable even if I only had access to specific chunks of said file. For example, say I tar up my mp3 and photo collection into a 100GB tar file, then put the file into some long term storage somewhere. Later, I want to access a specific mp3 file. I don't want to download the entire 100GB tar file just to get to one mp3. In fact, let's say I can't download the entire 100GB tar file. Instead, I'd like to say "give me megabytes 10 through 19 of the 100GB tar file" and then have the mp3 magically extracted from those 10 megabytes. Does a file format like this exist?

    Read the article

  • Foremost custom file type not accepted by -t argument

    - by Channel72
    I'm trying to recover a deleted file on an ext3 file system using the foremost utility. The file I want to recover is a hpp C++ source code file. However, foremost does not automatically support the hpp file extension, so I have to add it to the config file. So, following the instructions on the man page, I add the following line to the config file: hpp n 50000 include include ASCII Then I run foremost as follows: $foremost -v -T -t hpp -i /dev/md0 -o /home/recover/ Instead of doing anything, it just displays the help message. If I change the hpp to htm or jpg, it works. So apparently foremost isn't accepting the custom file type I added into the config file. But I've looked over this dozens of times now, and I can't see what I'm doing wrong. I'm following the instructions exactly. Why doesn't foremost recognize the new file type I added to the config file?

    Read the article

  • Need a solution to store images (1 billion, 1000,000,000) which users will upload to a website via php or javascript upload [on hold]

    - by wish_you_all_peace
    I need a solution to store images (1 billion) which users will upload to a website via PHP or Javascript upload (website will have 1 billion page views a month using Linux Debian distros) assuming 20 photos per user maximum (10 thumbnails of size 90px by 90px and 10 large, script resized images of having maximum width 500px or maximum height 500px depending on shape of image, meaning square, rectangle, horizontal, vertical etc). Assume this to be a LEMP-stack (Linux Nginx MySQL PHP) social-media or social-matchmaking type application whose content will be text and images. Since everyone knows storing tons of images (website users uploaded images in this case) are bad inside a single directory or NFS etc, please explain all the details about the architecture and configuration of the entire setup of storage solution, to store 1 billion images on any method you recommend (no third-party cloud storage like S3 etc. It has to be within the private data center using our own hardware and resources.). The solution has to include both the storage solution and organizing the images uploaded by users. How will we organize the users images if a single user will not have more than 20 images (10 thumbs and 10 large of having either width or height 500px)? Please consider that this has to be organized in a structural way so we can fetch a single user's images via PHP/Javascript or API programmatically through some type of user's unique identifier(s).

    Read the article

  • Error with SQL Server Setup 2012 on Windows 2012

    - by Jeff
    I am trying to install SQL Server on Windows 2012. I was able to finally get the wizard up and running after making some changes on the server, but now it fails no matter what I do with the following error: TITLE: SQL Server Setup failure. SQL Server Setup has encountered the following error: There is an error in XML document (108, 148).. For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&EvtType=0x066FCAFD%25400x5539C151 LinkID: 20476 Product Name: Microsoft SQL Server Message Source setup.rll Message ID: 50000 EvtType: 0x066FCAFD%400x5539C151 What I've tried: Installing from commandline with /q Result from CL installation: Error result: -2147467259 Result facility code: 0 Result error code: 16389 Please review the summary.txt log for further details The Verbose CL installation reveals: Sco: File 'C:\SQL Install\1033_ENU_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Sco: File 'C:\SQL Install\1033_ENU_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Package ID sql_bids_loc_Cpu64_1033: NotInstalled Sco: File 'C:\SQL Install\1036_FRA_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Sco: File 'C:\SQL Install\1036_FRA_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Package ID sql_bids_loc_Cpu64_1036: NotInstalled Sco: File 'C:\SQL Install\1040_ITA_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Sco: File 'C:\SQL Install\1040_ITA_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Package ID sql_bids_loc_Cpu64_1040: NotInstalled Sco: File 'C:\SQL Install\1041_JPN_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Sco: File 'C:\SQL Install\1041_JPN_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Package ID sql_bids_loc_Cpu64_1041: NotInstalled Sco: File 'C:\SQL Install\1042_KOR_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Sco: File 'C:\SQL Install\1042_KOR_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Package ID sql_bids_loc_Cpu64_1042: NotInstalled Sco: File 'C:\SQL Install\1046_PTB_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Sco: File 'C:\SQL Install\1046_PTB_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Package ID sql_bids_loc_Cpu64_1046: NotInstalled Sco: File 'C:\SQL Install\1049_RUS_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Sco: File 'C:\SQL Install\1049_RUS_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Package ID sql_bids_loc_Cpu64_1049: NotInstalled Sco: File 'C:\SQL Install\2052_CHS_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Sco: File 'C:\SQL Install\2052_CHS_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Package ID sql_bids_loc_Cpu64_2052: NotInstalled Sco: File 'C:\SQL Install\3082_ESN_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Sco: File 'C:\SQL Install\3082_ESN_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Package ID sql_bids_loc_Cpu64_3082: NotInstalled Sco: File 'C:\SQL Install\1053_SVE_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Sco: File 'C:\SQL Install\1053_SVE_LP\x64\setup\x64\sql_bids_loc.msi' does not exist Package ID sql_bids_loc_Cpu64_1053: NotInstalled Sco: File 'C:\SQL Install\x64\setup\x64\sql_ssms.msi' does not exist Sco: File 'C:\SQL Install\x64\setup\x64\sql_ssms.msi' does not exist Package ID sql_ssms_Cpu64: NotInstalled Sco: File 'C:\SQL Install\1028_CHT_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\1028_CHT_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_1028: NotInstalled Sco: File 'C:\SQL Install\1031_DEU_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\1031_DEU_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_1031: NotInstalled Sco: File 'C:\SQL Install\1033_ENU_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\1033_ENU_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_1033: NotInstalled Sco: File 'C:\SQL Install\1036_FRA_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\1036_FRA_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_1036: NotInstalled Sco: File 'C:\SQL Install\1040_ITA_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\1040_ITA_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_1040: NotInstalled Sco: File 'C:\SQL Install\1041_JPN_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\1041_JPN_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_1041: NotInstalled Sco: File 'C:\SQL Install\1042_KOR_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\1042_KOR_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_1042: NotInstalled Sco: File 'C:\SQL Install\1046_PTB_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\1046_PTB_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_1046: NotInstalled Sco: File 'C:\SQL Install\1049_RUS_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\1049_RUS_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_1049: NotInstalled Sco: File 'C:\SQL Install\2052_CHS_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\2052_CHS_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_2052: NotInstalled Sco: File 'C:\SQL Install\3082_ESN_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\3082_ESN_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_3082: NotInstalled Sco: File 'C:\SQL Install\1053_SVE_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Sco: File 'C:\SQL Install\1053_SVE_LP\x64\setup\x64\sql_ssms_loc.msi' does not exist Package ID sql_ssms_loc_Cpu64_1053: NotInstalled Sco: File 'C:\SQL Install\x64\setup\sql_common_core_msi\x64\sql_common_core.msi' does not e Sco: File 'C:\SQL Install\x64\setup\sql_common_core_msi\x64\sql_common_core.msi' does not e Package ID sql_common_core_Cpu64: NotInstalled Sco: File 'C:\SQL Install\1028_CHT_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\1028_CHT_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_1028: NotInstalled Sco: File 'C:\SQL Install\1031_DEU_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\1031_DEU_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_1031: NotInstalled Sco: File 'C:\SQL Install\1033_ENU_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\1033_ENU_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_1033: NotInstalled Sco: File 'C:\SQL Install\1036_FRA_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\1036_FRA_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_1036: NotInstalled Sco: File 'C:\SQL Install\1040_ITA_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\1040_ITA_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_1040: NotInstalled Sco: File 'C:\SQL Install\1041_JPN_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\1041_JPN_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_1041: NotInstalled Sco: File 'C:\SQL Install\1042_KOR_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\1042_KOR_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_1042: NotInstalled Sco: File 'C:\SQL Install\1046_PTB_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\1046_PTB_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_1046: NotInstalled Sco: File 'C:\SQL Install\1049_RUS_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\1049_RUS_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_1049: NotInstalled Sco: File 'C:\SQL Install\2052_CHS_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\2052_CHS_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_2052: NotInstalled Sco: File 'C:\SQL Install\3082_ESN_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\3082_ESN_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_3082: NotInstalled Sco: File 'C:\SQL Install\1053_SVE_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Sco: File 'C:\SQL Install\1053_SVE_LP\x64\setup\sql_common_core_loc_msi\x64\sql_common_core Package ID sql_common_core_loc_Cpu64_1053: NotInstalled Sco: File 'C:\Users\Administrator\AppData\Local\Temp\2\SQL Server 2012\Setup\1033_ENU_LP\x6 lSupport.msi' does not exist Sco: File 'C:\Users\Administrator\AppData\Local\Temp\2\SQL Server 2012\Setup\1033_ENU_LP\x6 lSupport.msi' does not exist Package ID SqlSupport_Cpu64: NotInstalled Sco: File 'C:\SQL Install\redist\watson\x86\dw20shared.msi' does not exist Sco: File 'C:\SQL Install\redist\watson\x86\dw20shared.msi' does not exist Package ID WatsonX86_Cpu32: NotInstalled Package ID sqlncli_Cpu64: NotInstalled Package ID SqlLocalDB_Cpu64: NotInstalled Package ID SqlLocalDB_CTP3_Cpu64: NotInstalled Sco: File 'C:\SQL Install\1033_ENU_LP\x64\setup\x86\SSDTStub.msi' does not exist Sco: File 'C:\SQL Install\1033_ENU_LP\x64\setup\x86\SSDTStub.msi' does not exist Package ID SSDTStub_Cpu32: NotInstalled Sco: File 'C:\SQL Install\1033_ENU_LP\x64\setup\x86\SSDTDBSvcExternals.msi' does not exist Sco: File 'C:\SQL Install\1033_ENU_LP\x64\setup\x86\SSDTDBSvcExternals.msi' does not exist What does this mean?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >