Search Results

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

Page 1/1 | 1 

  • Is tcerl for Mnesia production ready? Is there any alternatives?

    - by Sanoj
    I would like to create a scalable web service using Mnesia as database. However Mnesia per default isn't scalable for persistent storgage since it is using Dets (which has a 2GB limit) as backend. I have seen discussions about extending Mnesia with MnesiaEx and use tcerl as backend. It sounds good and have showed good performance. However, I have seen in a talk about Tokyo Cabinet and CouchDB with Mnesia that there are some issues: issues with durability issues with memory leaks issues with crashes Is tcerl + Mnesia really production ready? And is there any other alternatives? How doe´s companies overcome these issues if they use Mnesia in bigger systems? Is there a working solution with Mnesia and Tokyo Tyrant that is working better?

    Read the article

  • Insert text depending on time of day and day of week.

    - by ploughansen
    I'm trying to piece together a php script to output different text depending on what day it is and the time of day. Example: On weekdays (mon-fri), I would like to output text according to the following periods of time (24H, server time, UTC): 00:00-08:00: "Lorem ipsum" 08:00-13:00: "dolor sit amet" 13:00-15:00: "Pellentesque habitant" 15:00-15:30: "dolor sit amet" 15:30-24:00: "Lorem ipsum" On weekends (sat-sun), I would like to output the following text in this time period: 00:00-24:00 "Lorem ipsum" Can anyone help with a php script to do that? I've already gotten some help over at the css-tricks forum. They supplied this code: <?php $date = strtotime("now"); $hour = date("H", $date); switch($hour) { case 00: case 01: case 02: case 03: case 04: case 05: case 06: case 07: case 08: $dets = array("img" => "image1.png", "txt" => "Lorem ipsum"); break; case 09: case 10: case 11: case 12: case 13: $dets = array("img" => "image2.png", "txt" => "dolor sit amet"); break; case 14: case 15: case 16: $dets = array("img" => "image3.png", "txt" => "Pellentesque habitant"); break; case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: $dets = array("img" => "image1.png", "txt" => "Lorem ipsum"); break; } echo "<img src='$dets[img]' alt='$dets[txt]' />"; ?> But it works for all days, and only in full hours. I want to be able to specify per half-hour and on a day to day basis. Still a php-noob so I'm hoping someone can help me.

    Read the article

  • How do I count Internal Logical Files (ILF) and External Inputs (EI) for a dynamic form entry page?

    - by DmytroL
    Assuming I have an applicant information entry screen, the number and types of fields on which can be defined by the system administrator, how do I go about counting the number of Internal Logical Files (ILFs) and Data Element Types (DETs) for the related data functions? So far I have come up with something like this: ILF #1 (control information): Field Metadata, 1 RET, ~3 DET (name, type, mandatory) ILF #2 (business data): Applicant Data, most likely 1 RET, but how many DET? Of course I could count it as 2 DET (Field ref, Value), but I am not sure that would be correct And when it comes to an External Input (EI), say, "Add New Applicant", things become even more complicated, because the number of DET corresponding to the user-editable fields is totally dependent on the control information in ILF #1, and I am out of ideas here... Anyone fancy to help with that? Thanks in advance!

    Read the article

  • need help transforming an XML file, whose part of it is with escape sequences, into html

    - by shlomi
    hello, i need help transforming the following XML <?xml-stylesheet type=text/xsl href=XSL_17.xsl?> <Root> <Book> <Author>John smith</Author> <Genre>Novel</Genre> <Details>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Dets&gt;&lt;Ds&gt;&lt;D DN="Pages" DV="381" /&gt;&lt;D DN="Binding" DV="Hardcover" /&gt;&lt;D DN="Rate" DV="7.8" /&gt;&lt;/Ds&gt;&lt;/Dets&gt;</Details> </Book> <Car> <Year>2010</Year> <Name>Charger</Name> <Manufacturer>Dodge</Manufacturer> </Car> </Root> to the following HTML <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <table> <tr> <td><strong>Book</strong></td> </tr> <tr> <td><strong>Name</strong></td> <td><strong>Value</strong></td> </tr> <tr> <td>Author</td> <td>John smith</td> </tr> <tr> <td>Genre</td> <td>Novel</td> </tr> <tr> <td>Details</td> <td> <table> <tr> <td><strong>Name</strong></td> <td><strong>Value</strong></td> </tr> <tr> <td>Pages</td> <td>381</td> </tr> <tr> <td>Binding</td> <td>Hardcover</td> </tr> <tr> <td>Rate</td> <td>7.8</td> </tr> </table> </td> </tr> </table> <table> <tr> <td><strong>Car</strong></td> </tr> <tr> <td><strong>Name</strong></td> <td><strong>Value</strong></td> </tr> <tr> <td>Year</td> <td>2010</td> </tr> <tr> <td>Name</td> <td>Charger</td> </tr> <tr> <td>Manufacturer</td> <td>Dodge</td> </tr> </table> </body> </html> i.e. i need to represent both normal XML and escaped XML in HTML tables.

    Read the article

  • Where are tables in Mnesia located?

    - by Sanoj
    I try to compare Mnesia with more traditional databases. As I understand it tables in Mnesia can be located to: ram_copies - tables are stored in RAM only, so no durability as in ACID. disc_copies - tables are located on disc and a copy is located in RAM, so the table can not be bigger than the available memory? disc_only_copies - tables are located to disc only, so no caching in memory and worse performance? And the size of the table are limited to the size of dets or the table has to be fragmented. So if I want the performance of doing reads from RAM and the durability of writes to disc, then the size of the tables are very limited compared to a traditional RDBMS like MySQL or PostgreSQL. I know that Mnesia aren't meant to replace traditional RDBMS:s, but can it be used as a big RDBMS or do I have to look for another database? The server I will use is a VPS with limited amount of memory, around 512MB, but I want good database performance. Are disc_copies and the other types of tables in Mnesia so limited as I have understood?

    Read the article

  • Change a UIButton View's background upon press

    - by Michael
    This should be easy but its got me stumped. I've got a button on each row of a table cell. The button is to delete the file associated with that row. I have an image that indicates if the file is present on the iPhone or not present. When the user presses the button, the target action method (showDeleteSheet) then calls a UIActionSheet with a variable to give it the indexPath of the row pressed. Then the user presses delete on the action sheet and the action sheet's clickedButtonAtIndex method deletes the file. Now, I need to update the button's background image property to change the image in the appropriate table cell to the not downloaded image. This can be done in either the button's target action method or the action sheet's clickedButtonAtIndex method. Here is some code: In the table's cellForRowAtIndexPath method I create the button: UIButton *deleteButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain]; [deleteButton addTarget:self action:@selector(showDeleteSheet:) forControlEvents:UIControlEventTouchDown]; deleteButton.frame = CGRectMake(246, 26, 30, 30); if (![AppData isDownloaded:[dets objectForKey:@"fileName"]]) { [deleteButton setBackgroundImage:notdownloadedImage forState:UIControlStateNormal]; } else { [deleteButton setBackgroundImage:notdownloadedImage forState:UIControlStateNormal]; } In the button's target method: -(void)showDeleteSheet:(id)sender { //get the cell row that the button is in NSIndexPath *indexPath = [table indexPathForCell:(UITableViewCell *)[[sender superview] superview]]; NSInteger currentSection = indexPath.section; NSInteger currentIndexRow = indexPath.row; NSLog(@"section = %i row = %i", currentSection, currentIndexRow); UIButton *deleteButton = [UIButton buttonWithType:UIButtonTypeCustom]; [table reloadData]; //if deleteButton is declared in .h then the other instances of deleteButton show 'local declaration hides instance variable' [deleteButton setBackgroundImage:[UIImage imageNamed:@"not-downloaded.png"] forState:UIControlStateNormal]; UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Delete this file?" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:nil]; actionSheet.tag = currentIndexRow; actionSheet.actionSheetStyle = UIActionSheetStyleDefault; [actionSheet showInView:self.view]; [actionSheet release]; } Perhaps the issue is that the call to [deleteButton setBackgroundImage...]; doesn't know which cell's button should be updated. If so I don't know how to tell it which. Because I test if the file is downloaded when the button is made and the background image is set, when I scroll down so the cell in question is de-queued then scroll back up it show's the correct image. I've tried to force the table to reload but [table reloadData]; is doing nothing. I've tried reloadRowsAtIndexPaths and still no good. Any one care to educate me on how this is done?

    Read the article

1