Search Results

Search found 6 results on 1 pages for 'montecristo'.

Page 1/1 | 1 

  • Testing for disk write

    - by Montecristo
    I'm writing an application for storing lots of images (size <5MB) on an ext3 filesystem, this is what I have for now. After some searching here on serverfault I have decided for a structure of directories like this: 000/000/000000001.jpg ... 236/519/236519107.jpg This structure will allow me to save up to 1'000'000'000 images as I'll store a max of 1'000 images in each leaf. I've created it, from a theoretical point of view seems ok to me (though I've no experience on this), but I want to find out what will happen when there will be directories full of files in there. A question about creating this structure: is it better to create it all in one go (takes approx 50 minutes on my pc) or should I create directories as they are needed? From a developer point of view I think the first option is better (no extra waiting time for the user), but from a sysadmin point of view, is this ok? I've thought I could do as if the filesystem is already under the running application, I'll make a script that will save images as fast as it can, monitoring things as follows: how much time does it take for an image to be saved when there is no or little space used? how does this change when the space starts to be used up? how much time does it take for an image to be read from a random leaf? Does this change a lot when there are lots of files? Does launching this command sync; echo 3 | sudo tee /proc/sys/vm/drop_caches has any sense at all? Is this the only thing I have to do to have a clean start if I want to start over again with my tests? Do you have any suggestions or corrections?

    Read the article

  • Grub error 18, gparted not showing anything

    - by Montecristo
    Some week ago I started having some problems with my pc, sometimes it just freezed not allowing me to do anything. I had to turn it off and on and sometimes do it a couple of time even at startup. Now it does not start at all, grub is giving me error 18. I have found that a solution is to create a bootable partition in the first sector of the disk. gparted does not recognize any partition, the window in which there would be my partitions is empty. sudo fdisk -l does not output anything. If I type sudo mount /dev/sda and then tab tab to autocomplete these are the devices coming out: sda sda1 sda2 sda5. If I launch sudo mount -t ext3 /dev/sda1 disk I get the following error: mount: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so dmesg outputs [ 1831.974847] EXT3-fs: unable to read superblock Do you know how to solve this issue? I'm not completely sure this is a software problem, should I try with a new hard disk?

    Read the article

  • How to patch source files

    - by Montecristo
    I am trying to patch dmenu with the files provided here: http://aur.archlinux.org/packages.php?ID=27334 I do not know how to do it, I've read that I should do patch file-to-patch the-path, but in the patch provided there is more than one file involved. I've tried patching manually but I failed, it will not compile.

    Read the article

  • What are these lines doing?

    - by Montecristo
    I'm starting learning javascript for a project, I've found a script that does a part of what I need to do, I'd like to know how it works, both for me and in case it needs to be modified. Originally it was used inside the page, now I've put it in a file on its own and does not work anymore, so I'm dividing it in parts, because I fail to get the whole thing. Here is what bother me most for now: 1) Is this a declaration a function? What is its name? How can it be invoked? (function() { //some code })(); 2) No clue of what is going on here var VARIABLE = VARIABLE || {}; 3) Am I defining a the implementation of methodCall here? Something like overriding a method in Java? VARIABLE.methodCall = function(parameter) { console.log("parameter was: " + parameter); }; Thank you in advance for your help.

    Read the article

  • What is a mantainable way of saving "star rating" in a database?

    - by Montecristo
    I'll use the jQuery plugin for presenting the user with a nice interface The request is to display 5 stars, up to a total score of 10 (2 points per star). By now I thought about using 7/10 as a format for that value, but what if at some point in the future I'll receive a request like We would like to give users more choice, let's increase the total score to 20 (so that each star contributes with a maximum of 4 points) I'll end up with a table with mixed values for the "star rating" column: some will be like 7/10 while others will be like 14/20. Is it ok for you to have this difference in the database and deal with it in the logic layer to have it consistent? Or is preferred another way so that querying the table will not result in inconsistent results outside the application? Maybe floating point values could help me, is it better to store that value as a number less than or equal to one? So in each of the two examples the resulting value stored in the database would be 0,7, as a number, not a varchar, which can be queried also outside the application. What do you think?

    Read the article

1