Search Results

Search found 8414 results on 337 pages for 'critical section'.

Page 54/337 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • Problem in UITableViewDelegate - RowSelected gives wrong NSIndexPath

    - by vlad259
    I have a UITableViewSource which I have subclassed. I'm overriding GetCell and using my own subclassed cells, like so: public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { MarketItem item=_tableItems[indexPath.Section].Items[indexPath.Row]; MarketCell cell=tableView.DequeueReusableCell(_cellIdentifier) as MarketCell; if (cell==null) { cell=new MarketCell(UITableViewCellStyle.Subtitle,_cellIdentifier,item); } // decorate the cell // ... return cell; } This works but when I get events in my UITableViewDelegate, the index path gets me the wrong cell (events like AccessoryButtonTapped, WillSelectRow etc). The Section and Row numbers look correct but when I do a tableView.CellAt(indexPath) I get the wrong cell. (The row and section numbers again look correct.) Things to note: The table is constantly being updated - items arrive in a different thread which are then InvokeOnMainThread'd Although the table is constantly updated, rows and sections are only added - nothing is re-ordered or deleted If I pause the updates when I get a 'WillSelectRow', it doesn't help Most interestingly (but not a shippable solution) if I make a new cell each time rather than doing DequeueReusableCell, it works correctly. I can't help thinking it's a stupid bug of my own making but can't find it. Any help would be most gratefully received!

    Read the article

  • Calling NSFetchedResultsController & CoreData experts

    - by JK
    I am having a few nagging issues with NSFetchedResultsController and CoreData, any of which I would be very grateful to get help on. Issue 1 - Updates: I update my store on a background thread which results in certain rows being delete, inserted or updated. The changes are merged into the context on the main thread using the "mergeChangesFromContextDidSaveNotification:" method. Inserts and deletes are updated properly, but updates are not (e.g. the cell label is not updated with the change) although I have confirmed the updates to come through the contextDidSaveNotifcation, exactly like the inserts and deleted. My current workaround is to temporarily change the staleness interval of the context to 0, but this does not seem like the ideal solution. Issue 2 - Deleting objects: My fetch batch size is 20. If an object is deleted by the background thread which is in the first 20 rows, everything works fine. But if the object is after the first 20 rows and the table is scrolled down, a "CoreData could not fulfill a fault" error is raised. I have tried resaving the context and reperforming the frc fetch - all to no avail. Note: In this scenario, the frc delegate method "didChangeObject...." is not called for the delete - I assume this is because the object in question had not been faulted at that time (as it is was outside the initial fetch range). But for some reason, the context still thinks the object is around, although is has been deleted from the store. Issue 3 - Deleting sections : When the deletion of a row leads to the deletion of a section, I have gotten the "invalid number of rows in section???" error. I have worked around this by removing the "reloadSection" line from the NSFetchedResultsChangeMove: section and replacing it with "[tableView insertRowsAtIndexPaths...." This seems to work, but once again, I am not sure if this is the best solution. Any help would be greatly appreciated. Thank you!

    Read the article

  • Parsing data from txt file in J2ME

    - by CSFYPMAIL
    Basically I'm creating an indoor navigation system in J2ME. I've put the location details in a .txt file i.e. Locations names and their coordinates. Edges with respective start node and end node as well as the weight (length of the node). I put both details in the same file so users dont have to download multiple files to get their map working (it could become time consuming and seem complex). So what i did is to seperate the deferent details by typing out location Names and coordinates first, After that I seperated that section from the next section which is the edges by drawing a line with multiple underscores. Now the problem I'm having is parsing the different details into seperate arrays by setting up a command (while manually tokenizing the input stream) to check wether the the next token is an underscore. If it is, (in pseudocode terms), move to the next line in the stream, create a new array and fill it up with the next set of details. I found a some explanation/code HERE that does something similar but still parses into one array, although it manually tokenizes the input. Any ideas on what to do? Thanks Text File Explanation The text has the following format... <--1stSection--  /**   * Section one has the following format   * xCoordinate;yCoordinate;LocationName   */ 12;13;New York City 40;12;Washington D.C. ...e.t.c _________________________ <--(underscore divider) <--2ndSection--  /**   * Its actually an adjacency list but indirectly provides "edge" details.   * Its in this form   * StartNode/MainReferencePoint;Endnode1;distance2endNode1;Endnode2;distance2endNode2;...e.t.c   */ philadelphia;Washington D.C.;7;New York City;2 New York City;Florida;24;Illinois;71 ...e.t.c

    Read the article

  • What's the proper approach for writing multi-path "story" flows?

    - by Basiclife
    Hi, I wonder if you can help me. I'm writing a game (2d) which allows players to take multiple routes, some of which branch/merge - perhaps even loop. Each section of the game will decide which section is loaded next. I'm calling each section an IStoryElement - And I'm wondering how best to link these elements up in a way that is easily changed/configured and at the same time, graphable I'm going to have an engine/factory assembly which will load the appropriate StoryElement(s) based on various config options. I initially planned to give each StoryElement a NextElement() As IStoryElement property and a Completed() event. When the vent fires, the engine reads the NextElement property to find the next StoryElement. The downside to this is that if I ever wanted to graph all the routes through the game, I would be unable to - I couldn't determine all possible targets for each StoryElement. I considered a couple of other solutions but they all feel a little clunky - eg Do I need an additional layer of abstraction? ie StoryElementPlayers or similar - Each one would be responsible for stringing together multiple StoryElement perhaps a Series and a ChoicePlayer with each responsible for graphing its own StoryElement - But this will just move the problem up a layer. In short, I need some way of emulating a simple but dynamic workflow (but I'd rather not actually use WWF). Is there a pattern for something this simple? All the ones I've managed to find relate to more advanced control flow (parallel processing, etc.)

    Read the article

  • cellForRowAtIndexPath not called for all sections

    - by Wynn
    I have a UITableView that has five sections. Just as the title describes cellForRowAtIndexPath is only being called for the first four. All connections have been made concerning the datasource and delegate. Also, my numberOfSectionsInTableView clearly returns 5. Printing out the number of sections from within cellForRowAtIndexPath shows the correct number, thus confirming that cellForRowAtIndexPath is simply not being called for all sections. What on earth is going on? I looked pretty hard for an answer to this question but could't find one. If this has already been answered please forgive me and point me in the correct direction. My cellForRowAtIndexPath: - (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [theTableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } switch (indexPath.section) { case 0: cell.textLabel.text = ticket.description; break; case 1: cell.textLabel.text = ticket.ticketStatus; break; case 2: cell.textLabel.text = ticket.priority; break; case 3: cell.textLabel.text = ticket.customerOfficePhone; break; case 4: { //This never ever gets executed Comment *comment = [ticket.comments objectAtIndex:indexPath.row]; cell.textLabel.text = comment.commentContent; break; } } return cell; } My numberOfSectionsInTableView: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 5; } My numberOfRowsInSection: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { NSInteger numberOfRows; if (section == 4) { numberOfRows = [ticket.comments count]; } else { numberOfRows = 1; } return numberOfRows; } Any suggestions are appreciated. Thanks in advance.

    Read the article

  • Deleting list items via ProcessBatchData()

    - by q-tuyen
    You can build a batch string to delete all of the items from a SharePoint list like this: 1: //create new StringBuilder 2: StringBuilder batchString= new StringBuilder(); 3: 4: //add the main text to the stringbuilder 5: batchString.Append(""); 6: 7: //add each item to the batch string and give it a command Delete 8: foreach (SPListItem item in itemCollection) 9: { 10: //create a new method section 11: batchString.Append(""); 12: //insert the listid to know where to delete from 13: batchString.Append("" + Convert.ToString(item.ParentList.ID) + ""); 14: //the item to delete 15: batchString.Append("" + Convert.ToString(item.ID) + ""); 16: //set the action you would like to preform 17: batchString.Append("Delete"); 18: //close the method section 19: batchString.Append(""); 20: } 21: 22: //close the batch section 23: batchString.Append(""); 24: 25: //preform the batch 26: SPContext.Current.Web.ProcessBatchData(batchString.ToString()); The only disadvantage that I can think of right know is that all the items you delete will be put in the recycle bin. How can I prevent that? I also found the solution like below: // web is a the SPWeb object your lists belong to // Before starting your deletion web.Site.WebApplication.RecycleBinEnabled = false; // When your are finished re-enable it web.Site.WebApplication.RecycleBinEnabled = true; Ref [Here](http://www.entwicklungsgedanken.de/2008/04/02/how-to-speed-up-the-deletion-of-large-amounts-of-list-items-within-sharepoint/) But the disadvantage of that solution is that only future deletion will not be sent to the Recycle Bins but it will delete all existing items as well which user do not want. Any idea to prevent not to delete existing items? Many thanks in advance, TQT

    Read the article

  • Been asked a dozen times, but no luck from what I've read. Prevent Anchor Jumping on page load

    - by jasenmp
    I'm currently working with WP theme that can be found here: sanjay.dmediastudios.com I'm currently using 'smooth scroll' on my page, I'm attempting to have the page smoothly scroll to the requested section when coming from an external link (for instance coming from the blog page takes you to sanjay.dmediastudios.com/#portfolio) from there I want the page to start at the top and THEN scroll to the portfolio section. What's happening is it briefly displays the 'portfolio section' (anchor jump) and THEN resets to the top and scrolls down. It's driving me nuts :(. Here is the code I'm using: Click function for smooth scroll: $(function() { $('.menu li a').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $root.animate({ scrollTop: target.offset().top - 75 }, 800, 'swing'); return false; } } }); //end of click function }); The page load function: $(window).on("load", function() { if (location.hash) { // do the test straight away window.scrollTo(0, 0); // execute it straight away setTimeout(function() { window.scrollTo(0, 0); // run it a bit later also for browser compatibility }, 1); } var urlHash = window.location.href.split("#")[1]; if (urlHash && $('#' + urlHash).length) $('html,body').animate({ scrollTop: $('#' + urlHash).offset().top - 75 }, 800, 'swing'); }); Any help would be MUCH appreciated.

    Read the article

  • UITableViewCell: how to verify the kind of accessoryType in all cells?

    - by R31n4ld0_
    Hello, Guys. I have a UITableView in that some cells are marked with UITableViewCellAccessoryCheckmark at the initialization of the view. When the user selects another row, I have to check if the maximum number of selected rows was achieved before. To do that, I used the code bellow: - (NSInteger)tableView:(UITableView *)tableView numberOfSelectedRowsInSection:(NSInteger)section{ NSInteger numberOfRows = [self tableView:tableView numberOfRowsInSection:section]; NSInteger numberOfSelectedRows = 0; for (int i = 0; i < numberOfRows; i++) { UITableViewCell *otherCell = [tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:section]]; if (otherCell.accessoryType == UITableViewCellAccessoryCheckmark) { numberOfSelectedRows++; } } return numberOfSelectedRows; } If my number of rows is, as example, 20, the variable numberOfRows is setted correctly with 20. Lets say that 13 rows already are marked with UITableViewCellAccessoryCheckmark. So, numberOfSelectedRows should be 13 after the loop, but only the marked and VISIBLE cells are considered. So, if I have 9 cells showed and 7 are marked, the numberOfSelectedRows returns 7 instead of 13 (but the for iterate 20 times, as expected). Is this a correct behavior of UITableView or it is a bug of iPhone simulator? Thanks in advance.

    Read the article

  • Objective-c: Comparing two strings not working correctly.

    - by Mr. McPepperNuts
    - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section]; if(tempArray != nil){ for (int i = 0; i < [tempArray count]; i++) { if([[sectionInfo indexTitle] isEqualToString:[tempArray objectAtIndex:i]]) // if([sectionInfo indexTitle] == [tempArray objectAtIndex:i]) { NSLog(@"found"); break; } else { NSLog(@"Not found %@", [sectionInfo indexTitle]); [tempArray addObject:[sectionInfo indexTitle]]; NSLog(@"array %@", tempArray); return [tempArray objectAtIndex:i]; } } } } The comparison of the strings in the if statement never resolves to true. The sample data has two instances of duplicates for testing purposes. The commented line is an alternate, although I believe incorrect, attempt to compare the section with the string in the tempArray. What am I doing incorrectly? Also, all data is in capital letters, so the comparison is not a matter of lower to upper case.

    Read the article

  • Using an objects date (without time) for a table header instead of an objects date and time (iphone)

    - by billywilliamton
    I've been working on an iphone project and have run into an issue. Currently In the table view where it displays all the objects, I use headers based on the objects datePerformed field. The only problem is that my code apparently creates a header that contains both the date and time resulting in objects not being grouped solely by their date as I intended, but rather based on their date and time. I'm not sure if it matters, but when an object is created I use a date picker to pick the date, but not the time. I was wondering if anyone could give me any suggestions or advice. Here is the code where i set up the fetchedResultsController - (NSFetchedResultsController *)fetchedResultsController { if (fetchedResultsController != nil) { return fetchedResultsController; } // Create and configure a fetch request with the Exercise entity. NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Exercise" inManagedObjectContext:managedObjectContext]; [fetchRequest setEntity:entity]; // Create the sort descriptors array using date and name NSSortDescriptor *dateDescriptor = [[NSSortDescriptor alloc] initWithKey:@"datePerformed" ascending:NO]; NSSortDescriptor *nameDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:dateDescriptor, nameDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; // Create and initialize the fetch results controller NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:@"datePerformed" cacheName:@"Root"]; self.fetchedResultsController = aFetchedResultsController; fetchedResultsController.delegate = self; // Memory management calls [aFetchedResultsController release]; [fetchRequest release]; [dateDescriptor release]; [nameDescriptor release]; [sortDescriptors release]; return fetchedResultsController; } Here's where I set up the table header properties - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { // Display the exercise' date as section headings. return [[[fetchedResultsController sections] objectAtIndex:section] name]; } Any suggestions welcome. Thanks for your time. -Billy Williamton

    Read the article

  • jQuery: How do I rewrite .after( content, content )?

    - by Evan Carroll
    I've got this form working, but according to my previous question it might not be supported: it isn't in the docs either way -- but the intention is pretty obvious in the code. $(".section.warranty .warranty_checks :last").after( $('<div class="little check" />').click( function () { alert('hi') } ) , $('<span>OEM</span>') /*Notice this (a second) argument */ ); What this does is insert <div class="little check"> with a simple .click() callback, followed by a sibling of <span>OEM</span>. How else can I write this then? I'm having difficulty conjuring something working by chaining any combination of .after(), and .insertAfter()? I would expect this to work, but it doesn't: $(".section.warranty .warranty_checks :last").after( $('<div class="little check" />').click( function () { alert('hi') } ).after ( $('<span>OEM</span>') ) ); I would also expect this to work, but it doesn't: $(".section.warranty .warranty_checks :last").after( $('<span>OEM</span>').insertAfter( $('<div class="little check" />').click( function () { alert('hi') } ) ); );

    Read the article

  • Hide Dynamically Added Columns/Fields

    - by baldwingrand
    I have some dynamically created rows/columns. What I'd like to do is set a section of it (txtOffsetID) to be hidden. I tried this: txtOffsetID.setAttribute('type', 'hidden'); but it didn't work. I want to hide that entire column and any new columns added. I need it to work in IE. Thanks. Sample code: function addNewOffsetItem() { var iX = document.getElementById("txtOffsetIndex").value; iX ++; document.getElementById("txtOffsetIndex").value = iX; var tbl = document.getElementById("tblOffsetDetail").getElementsByTagName("TBODY")[0]; var tr = document.createElement("TR"); tbl.appendChild(tr); //This section should be hidden. //txtOffsetID1 var tdID = document.createElement("TD"); tr.appendChild(tdID); var p = document.createElement("P"); tdID.appendChild(p); var txtOffsetID = document.createElement("input"); p.appendChild(txtOffsetID); txtOffsetID.id = "txtOffsetID" + iX; txtOffsetID.setAttribute('name','txtOffsetID' + iX); //This section should be visible. //txtOffsetComments1 var tdComments = document.createElement("TD"); tr.appendChild(tdComments); var p = document.createElement("P"); tdComments.appendChild(p); var txtOffsetComments = document.createElement("textarea"); p.appendChild(txtOffsetComments); txtOffsetComments.id = "txtOffsetComments" + iX; txtOffsetComments.setAttribute('name','txtOffsetComments' + iX); }

    Read the article

  • How to strip everything between a key phrase and an ending tag?

    - by user3620142
    I am trying to strip everything between a key phrase and ending tag but for some reason it is not working. I always get blank data. I've tried many different ways but no luck. Basically I have a script that connect to IMAP and store emails into MySQL as service tickets. It works great but I am trying to strip off everything except for user reply because currently if a user reply to an email it re-inserts the entire email into MySQL. I added a key phrase at the top of all outgoing emails . Structure is as below: --Reply below this line to respond-- ------------------------------------------------------------------------------------ Email body message... When replying to the message, it becomes: New Message reply...... --Reply below this line to respond-- old message body. I would only like to insert the new reply message only. This is what I've got so far: $message = strip_tags($message, "<br><div><p><u><hr></section>"); $message=preg_replace("</p>", "br /", $message); $message=preg_replace('#--REPLY above this line to respond--(.*?)</section>)#s', ' ', $message); $message=clean("<br/><hr><u>Received On $rep_date / $from_email</u><br><br/>$message"); It inserts the Received On date and From but $message is blank. If I remove $message=preg_replace('#--REPLY above this line to respond--(.*?)</section>)#s', ' ', $message); it inserts the entire email. Any suggestion on what i am doing wrong?

    Read the article

  • Django - Weird behaviour of sessions variables with Apache

    - by Étienne Loks
    In a Menu class with Section children, each Section has an available attribute. This attribute is initialized during the instance creation. The process of getting the availability is not trivial, so I stock a Menu instance for each user in a session variable. With the Django embedded webserver this works well. But when I deploy the application on an Apache webserver I can observe a very weird behavior. Once authentified, a click on a link or a refreshment of the page and the availability of each Section seems to be forgotten (empty menu but in the log file I can see that all Sections are here) then a new refresh on the page the availability is back, a new refresh the menu disappears once again, etc. There is no cache activated on the web server. The menu is initialized in a context processor. def get_base_context(request): if 'MENU' not in request.session or \ not request.session['MENU'].childs or\ request.session['MENU'].user != request.user: _menu = Menu(request.user) _menu.init() request.session['MENU'] = _menu (...) I have no idea what could cause such a behavior. Any clue?

    Read the article

  • More than one JPanel in a Frame / having a brackground Image and another Layer with Components on the top

    - by user1905203
    I've got a JFrame with a JPanel in which there is a JLabel with an ImageIcon(). Everything's working perfectly, problem is i now want to add another JPanel with all the other stuff like buttons and so on to the JFrame. But it still shows the background Image on top and nothing with the second JPanel. Can someone help me? Here is an extract of my code: JFrame window = new JFrame("Http Download"); /* * Background Section */ JPanel panel1 = new JPanel(); JLabel lbl1 = new JLabel(); /* * Component Section */ JPanel panel2 = new JPanel(); JLabel lbl2 = new JLabel(); /* * Dimension Section */ Dimension windowSize = new Dimension(800, 600); Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); public HTTPDownloadGUI() { window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); panel1.setLayout(null); panel1.setSize(windowSize); panel1.setOpaque(false); panel2.setLayout(null); panel2.setSize(windowSize); panel2.setOpaque(false); lbl1.setSize(windowSize); lbl1.setLocation(0, 0); lbl1.setIcon(new ImageIcon(getClass().getResource("bg1.png"))); panel1.add(lbl1); lbl2.setBounds(0, 0, 100, 100); //lbl2.setIcon(new ImageIcon(getClass().getResource("bg2.png"))); lbl2.setBackground(Color.GREEN); panel2.add(lbl2); panel1.add(panel2); window.add(panel1); int X = (screen.width / 2) - (windowSize.width / 2); int Y = (screen.height / 2) - (windowSize.height / 2); window.setBounds(X,Y , windowSize.width, windowSize.height); window.setVisible(true); }

    Read the article

  • Jquery Ajax refresh not working in IE.

    - by Probocop
    Hi, I have a <ul> which refreshes every ten seconds to check if there have been any new tweets (its pulling from a twitter feed). This works fine in Firefox and Chrome etc, but it does not work in any version if Internet Explorer. My code is as follows: setInterval(function() { $("#banter .scroll-pane").load(location.href+" #banter .scroll-pane>*",""); }, 10000); My PHP function creating the list is as follows: function showTweets($section, $limit, $class) { $result = mysql_query("SELECT * FROM hash WHERE section = '".$section."' ORDER BY date DESC LIMIT ".$limit); echo '<ul class="scroll-pane '.$class.'">'; while($row = mysql_fetch_array($result)) { echo '<li>'; echo '<p>'.html_entity_decode($row['tweet']).'</p>'; echo '<a href="'.$row['user_url'].'">'.$row['user'].'</a>'; echo '</li>'; } echo '</ul>'; } Any idea what's going wrong? Thanks

    Read the article

  • objectAtIndex:indexPath.row method always causes exception in IOS

    - by kalkin
    Hi I always seem to get exception when I use objectAtInded method to retrieve NSString from an array. I am reading data from a dictionary which is in the "PropertyList.plist" file.My code is - (void)viewDidLoad { [super viewDidLoad]; NSString *path = [[NSBundle mainBundle] pathForResource:@"PropertyList" ofType:@"plist"]; names = [[NSDictionary alloc] initWithContentsOfFile:path]; keys = [[[names allKeys] sortedArrayUsingSelector: @selector(compare:)] retain]; } -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger section = [indexPath section]; NSUInteger row = [indexPath row]; NSString *key = [keys objectAtIndex:section]; NSArray *nameSection = [names objectForKey:key]; static NSString *SectionsTableIdentifier = @"SectionsTableIdentifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SectionsTableIdentifier]; if(cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:SectionsTableIdentifier] autorelease]; } cell.textLabel.text = [nameSection objectAtIndex:row]; return cell; } The exception happens on the method "cellForRowAtIndexPath" in the line cell.textLabel.text = [nameSection objectAtIndex:row]; The error message is Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x6832440 Where ever I use "[nameSection objectAtIndex:row];" type of statement it always get exception.

    Read the article

  • One controller with multiple models? Am I doing this correctly?

    - by user363243
    My web app, up until this point, has been fairly straight forward. I have Users, Contacts, Appointments and a few other things to manage. All of these are easy - it's just one model per section so I just did a scaffold for each, then modified the scaffolded code to fit my need. Pretty easy... Unfortunately I am having a problem on this next section because I want the 'Financials' section of my app to be more in depth than the other sections which I simply scaffolded. For example, when the user clicks the 'Contacts' link on the navigation bar, it just shows a list of contacts, pretty straight forward and is in line with the scaffold. However, when the user clicks the 'Financials' link on the navigation bar, I want to show the bank accounts on the left of the page and a few of the transactions on the right. So the financials tab will basically work with data from two models: transactions and bank_accounts. I think I should make the models (transactions & bank_accounts) and then make a controller called Financials, then I can query the models from the Financials controller and display the pages in app/views/financials/ Am I correct in this app layout? I have never worked with more than the basics of scaffolding so I want to ensure I get this right! Thank you!

    Read the article

  • How to arrange HTML5 web page elements?

    - by Argus9
    I'm trying to make a sample web page to get acquainted with HTML5, and I'd like to try replicating Facebook's page layout; that is, the header that spans the entire width of the screen, a small footer at the bottom, and a three-column main body, consisting of a list of links on the left, the main content in the middle, and an optional section on the right (for ads, frames, etc.). It's neat and displays well in multiple window sizes. So far, I've tried to accomplish this with a <header>, <footer> and a <nav> and <section> block, respectively. There's a few anomalies with the page, however. The footer (which contains a simple text block with copyright info) appears at the top-right of the page below the header when the window is maximized. On the other hand, when there isn't enough space to display everything in the window, it places the main body text below the section. In other words, it keeps moving elements around to fit the window. Could someone please tell me how I'd achieve the look I'm going for? I've tried playing around with a few CSS attributes I read about through Google, but I'm pretty sure I don't know what I'm doing, and could really use some guidance. Thank you!

    Read the article

  • Calculix Data Visualiser using QT

    - by Ann
    I am doing a project on CalculiX data visualizor,using Qt.I 've to draw the structure and after giving force the displacement should be shawn as variation in color.I chose HSV coloring,but while executing I got an error message:"QColor::from Hsv:HSV parameters out of range".The code is: DataViz1::DataViz1(QWidget *parent) : QWidget(parent), ui(new Ui::DataViz1) { DArea = new QGLScreen(this); DArea-setGeometry(QRect(10,10,700,600)); //TODO This values are feeded by user dfile="/home/41407/color.txt";//input file with displacement mfile="/home/41407/mesh21.txt";//input file nodeId="*NODE"; elId="*ELEMENT"; DataId="displ"; parseMfile(); parseDfile(); DArea->Nodes=Nodes; DArea->Elements=Elements; DArea->Data=Data; DArea->fillColorArray(); //printf("Colr is %d",DArea->pickColor(-11.02,0));fflush(stdout); ui->setupUi(this); } DataViz1::~DataViz1() { delete ui; } void DataViz1::parseMfile() { QFile file(mfile); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) return; int node_end=0; QTextStream in(&file); in.skipWhiteSpace(); while (!in.atEnd()) { QString line = in.readLine(); if(line.startsWith(nodeId))//Node block in Mfile { while(1) { line = in.readLine(); if(line.startsWith(elId)) { break; } Nodes< while(1) { line = in.readLine(); Elements<<line; //printf("Element is %s\n",line.toLocal8Bit().constData());fflush(stdout); if(in.atEnd()) break; } } } } void DataViz1::parseDfile() { QFile file(dfile); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) return; int node_end=0; QTextStream in(&file); in.skipWhiteSpace(); while (!in.atEnd()) { QString line = in.readLine(); if(line.startsWith(DataId)) { continue; } line = in.readLine(); Data< } /......................................................................../ include "qglscreen.h" include GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f }; GLfloat LightDiffuse[]= { 1.0f, 1.0f, 1.0f, 1.0f }; GLfloat LightPosition[]= { 0.0f, 0.0f, 2.0f, 1.0f }; QGLScreen::QGLScreen(QWidget *parent):QGLWidget(QGLFormat(QGL::SampleBuffers), parent) { clearColor = Qt::black; xRot = 0; yRot = 0; zRot = 0; ifdef QT_OPENGL_ES_2 program = 0; endif //TODO user input ElType="HE8"; DType="SolidFrame"; axis="X"; } QGLScreen::~QGLScreen() { } QSize QGLScreen::minimumSizeHint() const { return QSize(50, 50); } QSize QGLScreen::sizeHint() const { return QSize(200, 200); } void QGLScreen::setClearColor(const QColor &color) { clearColor = color; updateGL(); } void QGLScreen::initializeGL() { xRot=0; yRot=0; zRot=0; scaling = 1.0; /* select clearing (background) color */ glClearColor (0.0, 0.0, 0.0, 0.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); // glViewport(0,0,10,10); glOrtho(-10.0, +10.0, -10.0, +10.0, -10.0,+10.0); glEnable (GL_LINE_SMOOTH); glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE); } void QGLScreen::wheel1() { scaling1 += .0025; count2++; update(); } void QGLScreen::wheel2() { if(count2-14) { scaling1 -= .0025; count2--; update(); } } void QGLScreen::drawModel(int x1,int y1,int x2,int y2) { makeCurrent(); QStringList Cnode,Celement; for (int i = 0; i < Elements.size(); ++i) { Celement=Elements.at(i).split(","); // printf("Element is %s",Celement.at(0).toLocal8Bit().constData());fflush(stdout); //printf("Node at el is %s\n",(findNode(Celement.at(1).toInt())).at(1).toLocal8Bit().constData()); fflush(stdout); if(ElType=="HE8") { //First four nodes float ENX1=(findNode(Celement.at(1).toInt())).at(1).toDouble(); float ENX2=(findNode(Celement.at(2).toInt())).at(1).toDouble(); float ENX3=(findNode(Celement.at(3).toInt())).at(1).toDouble(); float ENX4=(findNode(Celement.at(4).toInt())).at(1).toDouble(); float ENY1=(findNode(Celement.at(1).toInt())).at(2).toDouble(); float ENY2=(findNode(Celement.at(2).toInt())).at(2).toDouble(); float ENY3=(findNode(Celement.at(3).toInt())).at(2).toDouble(); float ENY4=(findNode(Celement.at(4).toInt())).at(2).toDouble(); float ENZ1=(findNode(Celement.at(1).toInt())).at(3).toDouble(); float ENZ2=(findNode(Celement.at(2).toInt())).at(3).toDouble(); float ENZ3=(findNode(Celement.at(3).toInt())).at(3).toDouble(); float ENZ4=(findNode(Celement.at(4).toInt())).at(3).toDouble(); //Second four Nodes float ENX5=(findNode(Celement.at(5).toInt())).at(1).toDouble(); float ENX6=(findNode(Celement.at(6).toInt())).at(1).toDouble(); float ENX7=(findNode(Celement.at(7).toInt())).at(1).toDouble(); float ENX8=(findNode(Celement.at(8).toInt())).at(1).toDouble(); float ENY5=(findNode(Celement.at(5).toInt())).at(2).toDouble(); float ENY6=(findNode(Celement.at(6).toInt())).at(2).toDouble(); float ENY7=(findNode(Celement.at(7).toInt())).at(2).toDouble(); float ENY8=(findNode(Celement.at(8).toInt())).at(2).toDouble(); float ENZ5=(findNode(Celement.at(5).toInt())).at(3).toDouble(); float ENZ6=(findNode(Celement.at(6).toInt())).at(3).toDouble(); float ENZ7=(findNode(Celement.at(7).toInt())).at(3).toDouble(); float ENZ8=(findNode(Celement.at(8).toInt())).at(3).toDouble(); //Identify Colors GLfloat ENC[8][3]; for(int k=1;k<8;k++) { int hsv=pickColor(findData(Celement.at(k).toInt()).toDouble(),0); //printf("hsv is %d=",hsv);fflush(stdout); getRGB(hsv); //printf("%d*%d*%d\n",red,green,blue); //ENC[k]={red,green,blue}; ENC[k][0]=red; ENC[k][1]=green; ENC[k][2]=blue; } //Plot the first four direct loop if(DType=="WireFrame"){ glBegin(GL_LINE_LOOP); glColor3f(255,0,0); glVertex3f(ENX1,ENY1,ENZ1); glColor3f(255,0,0); glVertex3f(ENX2,ENY2,ENZ2); glColor3f(255,0,0); glVertex3f(ENX3,ENY3,ENZ3); glColor3f(255,0,0); glVertex3f(ENX4,ENY4,ENZ4); glEnd(); //Plot the second four direct loop glBegin(GL_LINE_LOOP); glColor3f(0,0,255); glVertex3f(ENX5,ENY5,ENZ5); glColor3f(0,0,255); glVertex3f(ENX6,ENY6,ENZ6); glColor3f(0,0,255); glVertex3f(ENX7,ENY7,ENZ7); glColor3f(0,0,255); glVertex3f(ENX8,ENY8,ENZ8); glEnd(); //Plot the interconnections glBegin(GL_LINE); glColor3f(150,150,150); glVertex3f(ENX1,ENY1,ENZ1); glVertex3f(ENX5,ENY5,ENZ5); glEnd(); glBegin(GL_LINE); glColor3f(150,150,150); glVertex3f(ENX2,ENY2,ENZ2); glVertex3f(ENX6,ENY6,ENZ6); glEnd(); glBegin(GL_LINE); glColor3f(150,150,150); glVertex3f(ENX3,ENY3,ENZ3); glVertex3f(ENX7,ENY7,ENZ7); glEnd(); glBegin(GL_LINE); glColor3f(150,150,150); glVertex3f(ENX4,ENY4,ENZ4); glVertex3f(ENX8,ENY8,ENZ8); glEnd(); } if(DType=="SolidFrame") { glBegin(GL_QUADS); glColor3fv(ENC[1]); glVertex3f(ENX1,ENY1,ENZ1); glColor3fv(ENC[2]); glVertex3f(ENX2,ENY2,ENZ2); glColor3fv(ENC[3]); glVertex3f(ENX3,ENY3,ENZ3); glColor3fv(ENC[4]); glVertex3f(ENX4,ENY4,ENZ4); glEnd(); //break; glBegin(GL_QUADS); glColor3fv(ENC[5]); glVertex3f(ENX5,ENY5,ENZ5); glColor3fv(ENC[6]); glVertex3f(ENX6,ENY6,ENZ6); glColor3fv(ENC[7]); glVertex3f(ENX7,ENY7,ENZ7); glColor3fv(ENC[8]); glVertex3f(ENX8,ENY8,ENZ8); glEnd(); glBegin(GL_QUAD_STRIP); glColor3fv(ENC[1]); glVertex3f(ENX1,ENY1,ENZ1); glColor3fv(ENC[5]); glVertex3f(ENX5,ENY5,ENZ5); glColor3fv(ENC[2]); glVertex3f(ENX2,ENY2,ENZ2); glColor3fv(ENC[6]); glVertex3f(ENX6,ENY6,ENZ6); glEnd(); glBegin(GL_QUAD_STRIP); glColor3fv(ENC[3]); glVertex3f(ENX3,ENY3,ENZ3); glColor3fv(ENC[7]); glVertex3f(ENX7,ENY7,ENZ7); glColor3fv(ENC[4]); glVertex3f(ENX4,ENY4,ENZ4); glColor3fv(ENC[8]); glVertex3f(ENX8,ENY8,ENZ8); glEnd(); glBegin(GL_QUAD_STRIP); glColor3fv(ENC[2]); glVertex3f(ENX2,ENY2,ENZ2); glColor3fv(ENC[6]); glVertex3f(ENX6,ENY6,ENZ6); glColor3fv(ENC[3]); glVertex3f(ENX3,ENY3,ENZ3); glColor3fv(ENC[7]); glVertex3f(ENX7,ENY7,ENZ7); glEnd(); glBegin(GL_QUAD_STRIP); glColor3fv(ENC[1]); glVertex3f(ENX1,ENY1,ENZ1); glColor3fv(ENC[5]); glVertex3f(ENX5,ENY5,ENZ5); glColor3fv(ENC[4]); glVertex3f(ENX4,ENY4,ENZ4); glColor3fv(ENC[8]); glVertex3f(ENX8,ENY8,ENZ8); glEnd(); } } } } QStringList QGLScreen::findNode(int element) { QStringList Temp; for (int i = 0; i < Nodes.size(); ++i) { Temp=Nodes.at(i).split(","); if(Temp.at(0).toInt()==element) { break; } } return Temp; } QString QGLScreen::findData(int Node) { QString Temp; QRegExp sep("\s+"); for (int i = 0; i < Data.size(); ++i) { if((Data.at(i).split("\t")).at(0).section(sep,1,1).toInt()==Node) { if(axis=="X") { Temp=Data.at(i).split("\t").at(0).section(sep,2,2); } if(axis=="Y") { Temp=Data.at(i).split("\t").at(0).section(sep,3,3); } if(axis=="Z") { Temp=Data.at(i).split("\t").at(0).section(sep,4,4); } break; } } return Temp; } void QGLScreen::fillColorArray() { QString Temp1,Temp2,Temp3; double d1s=0,d2s=0,d3s=0,d1l=0,d2l=0,d3l=0,diff=0; QRegExp sep("\\s+"); for (int i = 0; i < Data.size(); ++i) { Temp1=(Data.at(i).split("\t")).at(0).section(sep,2,2); if(d1s>Temp1.toDouble()) { d1s=Temp1.toDouble(); } if(d1l<Temp1.toDouble()) { d1l=Temp1.toDouble(); } Temp2=(Data.at(i).split("\t")).at(0).section(sep,3,3); if(d2s>Temp2.toDouble()) { d2s=Temp2.toDouble(); } if(d2l<Temp2.toDouble()) { d2l=Temp2.toDouble(); } Temp3=(Data.at(i).split("\t")).at(0).section(sep,4,4); if(d3s>Temp3.toDouble()) { d3s=Temp3.toDouble(); } if(d3l<Temp3.toDouble()) { d3l=Temp3.toDouble(); } // printf("data is %s",Temp.toLocal8Bit().constData());fflush(stdout); } color[0][0]=d1l; for(int i=1;i<360;i++) { //printf("Large is%f small is %f",d1l,d1s); diff=d1l-d1s; if(d1l==0&&d1s<0) color[0][i]=color[0][i-1]-diff/360; else if(d1l>0&&d1s==0) color[0][i]=color[0][i-1]+diff/360; else if(d1l>0&&d1s<0) color[0][i]=color[0][i-1]-diff/360; diff=d2l-d2s; if(d2l==0&&d2s<0) color[1][i]=color[1][i-1]-diff/360; else if(d2l>0&&d2s==0) color[1][i]=color[1][i-1]+diff/360; else if(d2l>0&&d2s<0) color[1][i]=color[1][i-1]-diff/360; diff=d3l-d3s; if(d3l==0&&d3s<0) color[2][i]=color[2][i-1]-diff/360; else if(d3l>0&&d3s==0) color[2][i]=color[2][i-1]+diff/360; else if(d3l>0&&d3s<0) color[2][i]=color[2][i-1]-diff/360; } //for(int i=0;i<360;i++) printf("%d %f %f %f\n",i,color[0][i],color[1][i],color[2][i]); } int QGLScreen::pickColor(double data,int Did) { int i,pos; if(axis=="X")Did=0; if(axis=="Y")Did=1; if(axis=="Z")Did=2; //printf("%f data is",data);fflush(stdout); for(int i=0;i<360;i++) { if(color[Did][i]<data && data>color[Did][i+1]) { //printf("Orginal dat is %f Data found is %f and pos %d\n",data,color[Did][i],i);fflush(stdout); pos=i; break; } } return pos; } void QGLScreen::getRGB(int hsv) { QColor c; c.setHsv(hsv,255,255,255); QColor r=QColor::fromHsv(hsv,255,255); red=r.red(); green=r.green(); blue=r.blue(); } void QGLScreen::paintGL() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushAttrib(GL_ALL_ATTRIB_BITS); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); GLfloat x = 3.0 * GLfloat(width()) / height(); glOrtho(-x, +x, -3.0, +3.0, 4.0, 15.0); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glTranslatef(0.0, 0.0, -10.0); glScalef(scaling, scaling, scaling); glRotatef(xRot, 1.0, 0.0, 0.0); glRotatef(yRot, 0.0, 1.0, 0.0); glRotatef(zRot, 0.0, 0.0, 1.0); drawModel(0,0,1,1); /* don't wait! * start processing buffered OpenGL routines */ glFlush (); } /void QGLScreen::zoom1() { scaling+=.05; update(); }/ void QGLScreen::resizeGL(int width, int height) { int side = qMin(width, height); glViewport((width - side) / 2, (height - side) / 2, side, side); #if !defined(QT_OPENGL_ES_2) glMatrixMode(GL_PROJECTION); glLoadIdentity(); #ifndef QT_OPENGL_ES glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0); #else glOrthof(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0); #endif glMatrixMode(GL_MODELVIEW); #endif } void QGLScreen::mousePressEvent(QMouseEvent *event) { lastPos = event-pos(); } void QGLScreen::mouseMoveEvent(QMouseEvent *event) { GLfloat dx = GLfloat(event->x() - lastPos.x()) / width(); GLfloat dy = GLfloat(event->y() - lastPos.y()) / height(); if (event->buttons() & Qt::LeftButton) { xRot+= 180 * dy; yRot += 180 * dx; update(); } else if (event->buttons() & Qt::RightButton) { xRot += 180 * dy; yRot += 180 * dx; update(); } lastPos = event->pos(); } void QGLScreen::mouseReleaseEvent(QMouseEvent * /* event */) { emit clicked(); }

    Read the article

  • WARNING: unrecognised client name "localhost.local", check server config

    - by dmonder
    I have two machines connected. The server is S1 and the client is C1. section: aliases C1.wcu.edu: C1 end section: links S1: right = C1.wcu.edu C1.wcu.edu: left = S1 end When I start Synergy on both machines, the connection is made but I get the subject WARNING message on the server constantly. On the client, I get the three messages below. ERROR: server refused client with name "localhost.local" WARNING: failed to connect to server: server refused client with our name NOTE: connecting to 'S1.wcu.edu': XXX.XXX.XXX.73:24800 Any idea why I am getting these messages? The connection is working. David

    Read the article

  • ELMAH - Filtering 404 Errors

    - by Nathan Taylor
    I am attempting to configure ELMAH to filter 404 errors and I am running into difficulties with the XML-provided filter rules in my Web.config file. I followed the tutorial here and here and added an <is-type binding="BaseException" type="System.IO.FileNotFoundException" /> declaration under my <test><or>... declaration, but that completely failed. When I tested it locally I stuck a breakpoint in protected void ErrorLog_Filtering() {} of the Global.asax found that the System.Web.HttpException that gets fired by ASP.NET for a 404 doesn't have a base type of System.IO.FileNotFound, but rather it is simply a System.Web.HttpException. Next I decided to try a <regex binding="BaseException.Message" pattern="The file '/[^']+' does not exist" /> in the hopes that any exception matching the pattern "The file '/foo.ext' does not exist" would get filtered, but that too having no effect. As a last resort I tried <is-type binding="BaseException" type="System.Exception" />, and even that is entirely disregarded. I'm inclined to think there's a configuration error with ELMAH, but I fail to see any. Am I missing something blatantly obvious? Here's the relevant stuff from my web.config: <configuration> <configSections> <sectionGroup name="elmah"> <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/> <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah"/> <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah"/> <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" /> </sectionGroup> </configSections> <elmah> <errorFilter> <test> <or> <equal binding="HttpStatusCode" value="404" type="Int32" /> <regex binding="BaseException.Message" pattern="The file '/[^']+' does not exist" /> </or> </test> </errorFilter> <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data/logs/elmah" /> </elmah> <system.web> <httpModules> <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/> </httpModules> </system.web> <system.webServer> <modules> <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" /> </modules> </system.webServer> </configuration>

    Read the article

  • Error when reloading supervisord: unix:///tmp/supervisor.sock no such file

    - by Yarin
    I'm running supervisord on my CentOS 6 box like so, /usr/bin/supervisord -c /etc/supervisord.conf and when I launch supervisorctl all process status are fine, but if I try to reload using supervisorctl I get unix:///tmp/supervisor.sock no such file I'm using the same config file I've used successfully on other boxes, and im running everything as root. I can't undesrtand what the problem is... Config file: ; Sample supervisor config file. [unix_http_server] file=/tmp/supervisor.sock ; (the path to the socket file) ;chmod=0700 ; socket file mode (default 0700) ;chown=nobody:nogroup ; socket file uid:gid owner ;username=user ; (default is no username (open server)) ;password=123 ; (default is no password (open server)) ;[inet_http_server] ; inet (TCP) server disabled by default ;port=127.0.0.1:9001 ; (ip_address:port specifier, *:port for all iface) ;username=user ; (default is no username (open server)) ;password=123 ; (default is no password (open server)) [supervisord] logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log) logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) logfile_backups=10 ; (num of main logfile rotation backups;default 10) loglevel=info ; (log level;default info; others: debug,warn,trace) pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) nodaemon=false ; (start in foreground if true;default false) minfds=1024 ; (min. avail startup file descriptors;default 1024) minprocs=200 ; (min. avail process descriptors;default 200) ;umask=022 ; (process file creation umask;default 022) ;user=chrism ; (default is current user, required if root) ;identifier=supervisor ; (supervisord identifier, default is 'supervisor') ;directory=/tmp ; (default is not to cd during start) ;nocleanup=true ; (don't clean up tempfiles at start;default false) ;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP) ;environment=KEY=value ; (key value pairs to add to environment) ;strip_ansi=false ; (strip ansi escape codes in logs; def. false) ; the below section must remain in the config file for RPC ; (supervisorctl/web interface) to work, additional interfaces may be ; added by defining them in separate rpcinterface: sections [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket ;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket ;username=chris ; should be same as http_username if set ;password=123 ; should be same as http_password if set ;prompt=mysupervisor ; cmd line prompt (default "supervisor") ;history_file=~/.sc_history ; use readline history if available ; The below sample program section shows all possible program subsection values, ; create one or more 'real' program: sections to be able to control them under ; supervisor. ;[program:foo] ;command=/bin/cat [program:embed_scheduler] command=/opt/web-apps/mywebsite/custom_process.py process_name=%(program_name)s_%(process_num)d numprocs=3 ;[program:theprogramname] ;command=/bin/cat ; the program (relative uses PATH, can take args) ;process_name=%(program_name)s ; process_name expr (default %(program_name)s) ;numprocs=1 ; number of processes copies to start (def 1) ;directory=/tmp ; directory to cwd to before exec (def no cwd) ;umask=022 ; umask for process (default None) ;priority=999 ; the relative start priority (default 999) ;autostart=true ; start at supervisord start (default: true) ;autorestart=unexpected ; whether/when to restart (default: unexpected) ;startsecs=1 ; number of secs prog must stay running (def. 1) ;startretries=3 ; max # of serial start failures (default 3) ;exitcodes=0,2 ; 'expected' exit codes for process (default 0,2) ;stopsignal=QUIT ; signal used to kill process (default TERM) ;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10) ;killasgroup=false ; SIGKILL the UNIX process group (def false) ;user=chrism ; setuid to this UNIX account to run the program ;redirect_stderr=true ; redirect proc stderr to stdout (default false) ;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO ;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) ;stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) ;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0) ;stdout_events_enabled=false ; emit events on stdout writes (default false) ;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO ;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) ;stderr_logfile_backups=10 ; # of stderr logfile backups (default 10) ;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0) ;stderr_events_enabled=false ; emit events on stderr writes (default false) ;environment=A=1,B=2 ; process environment additions (def no adds) ;serverurl=AUTO ; override serverurl computation (childutils) ; The below sample eventlistener section shows all possible ; eventlistener subsection values, create one or more 'real' ; eventlistener: sections to be able to handle event notifications ; sent by supervisor. ;[eventlistener:theeventlistenername] ;command=/bin/eventlistener ; the program (relative uses PATH, can take args) ;process_name=%(program_name)s ; process_name expr (default %(program_name)s) ;numprocs=1 ; number of processes copies to start (def 1) ;events=EVENT ; event notif. types to subscribe to (req'd) ;buffer_size=10 ; event buffer queue size (default 10) ;directory=/tmp ; directory to cwd to before exec (def no cwd) ;umask=022 ; umask for process (default None) ;priority=-1 ; the relative start priority (default -1) ;autostart=true ; start at supervisord start (default: true) ;autorestart=unexpected ; whether/when to restart (default: unexpected) ;startsecs=1 ; number of secs prog must stay running (def. 1) ;startretries=3 ; max # of serial start failures (default 3) ;exitcodes=0,2 ; 'expected' exit codes for process (default 0,2) ;stopsignal=QUIT ; signal used to kill process (default TERM) ;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10) ;killasgroup=false ; SIGKILL the UNIX process group (def false) ;user=chrism ; setuid to this UNIX account to run the program ;redirect_stderr=true ; redirect proc stderr to stdout (default false) ;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO ;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) ;stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) ;stdout_events_enabled=false ; emit events on stdout writes (default false) ;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO ;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) ;stderr_logfile_backups ; # of stderr logfile backups (default 10) ;stderr_events_enabled=false ; emit events on stderr writes (default false) ;environment=A=1,B=2 ; process environment additions ;serverurl=AUTO ; override serverurl computation (childutils) ; The below sample group section shows all possible group values, ; create one or more 'real' group: sections to create "heterogeneous" ; process groups. ;[group:thegroupname] ;programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions ;priority=999 ; the relative start priority (default 999) ; The [include] section can just contain the "files" setting. This ; setting can list multiple files (separated by whitespace or ; newlines). It can also contain wildcards. The filenames are ; interpreted as relative to this file. Included files *cannot* ; include files themselves. ;[include] ;files = relative/directory/*.ini

    Read the article

  • Issues in getting Synergy setup

    - by chris
    For some reason I cannot get things working when the Linux box is the server and the macbook pro is the client. However I can get things working just fine in the inverse, unfortunately since the macbook is not the primary machine, and not powered on all the time, the later setup won't work. Here is the error that I am getting: started client connecting to '10.0.1.4': 10.0.1.4:24800 The only firewall that I have is the one on the router, so since things work with the macbook as the server I am pretty sure that is not where the problem is. Here is the .synergy.conf file section: screens Chris-MacBook-Pro: # I have tried this with the .local as well chris-archlinux.local: end section: links Chris-MacBook-Pro: right = chris-archlinux.local chris-archlinux.local: left = Chris-MacBook-Pro.local end ** Update: I should also add that I can ping the linux machine from the mac. To try get things working, I have also prevented the hosts.deny/.allow files from blocking anything. An ideas to where the problem could be?

    Read the article

  • Get rid of Vista security warning

    - by Ken
    I found this question. The question exactly matches my problem, but the solution doesn't work. In the Properties window, I see "Security: This file came from another computer and might be blocked to help protect this computer. ((Unblock))". When I click Unblock and Apply, the Security section disappears. But when I go to run it again, I still get the security warning. If I right-click and choose Properties on the exact same thing, the Security section is back, offering me the chance to Unblock it again. So unblock seems exactly as useless as the "Always ask" checkbox. Anyone seen this before? How do you really Unblock an app that Vista doesn't want to let you Unblock?

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >