Search Results

Search found 2460 results on 99 pages for 'dave carpeneto'.

Page 50/99 | < Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >

  • Html.EditorFor not updating model on post

    - by Dave
    I have a complex type composed of two nullable DateTimes: public class Period { public DateTime? Start { get; set; } public DateTime? End { get; set; } public static implicit operator string(Period period) { /* converts from Period to string */ } public static implicit operator Period(string value) { /* and back again */ } } I want to display them together in a single textbox as a date range so I can provide a nice jQuery UI date range selector. To make that happen have the following custom editor template: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Period>" %> <% string name = ViewData.TemplateInfo.HtmlFieldPrefix; %> <%= Html.PeriodTextBox(name, Model.EarliestDate, Model.LatestDate) %> Where Html.PeriodTextBox is an extension method I've written that just concatenates the two dates sensibly, turns off autocomplete and generates a textbox, like so: public static MvcHelperString PeriodTextBox(this HtmlHelper helper, string name, DateTime? startDate, DateTime? endDate) { TagBuilder builder = new TagBuilder("input"); builder.GenerateId(name); builder.Attributes.Add("name", name); builder.Attributes.Add("type", "text"); builder.Attributes.Add("autocomplete", "off"); builder.Attributes.Add("value", ConcatDates(startDate, endDate)); return MvcHtmlString.Create(builder.ToString()); } That's working fine in that I can call <%= Html.EditorFor(m => m.ReportPeriod) %> and I get my textbox, then when the form is submitted the FormCollection passed to the post action will contain an entry named ReportPeriod with the correct value. [HttpPost] public ActionResult ReportByRange(FormCollection formValues) { Period reportPeriod = formValues["ReportPeriod"]; // creates a Period, with the expected values } The problem is if I replace the FormCollection with the model type I'm passing to the view then the ReportPeriod property never gets set. [HttpPost] public ActionResult ReportByRange(ReportViewModel viewModel) { Period reportPeriod = viewModel.ReportPeriod; // this is null } I expected MVC would try to set the string from the textbox to that property and it would automatically generate a Period (as in my FormCollection example), but it's not. How do I tell the textbox I've generated in the custom editor to poplate that property on the model?

    Read the article

  • Telerik RADGrid - linq and updating

    - by Dave
    Hi Telerik's RADGrid, basing on their example on http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/programaticlinqupdates/defaultcs.aspx Problem: I can insert and delete, however updating doesn't work. No error trapped. Data just doesn't change. From the code below it looks like Telerik Grid is doing some kung-fu behind the scenes to wire things up. I can't see the db receiving any update statements. Question: anything obvious I'm missing? protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e) { var editableItem = ((GridEditableItem) e.Item); var raceId = (Guid) editableItem.GetDataKeyValue("RaceID"); //retrive entity form the Db var race = DbContext.races.Where(n => n.raceid == raceId).FirstOrDefault(); if (race != null) { //update entity's state editableItem.UpdateValues(race); try { //submit chanages to Db DbContext.SubmitChanges(); } catch (Exception f) { ShowErrorMessage(f); } } } Think I may have to go back to their example.. get their db.. and attack from that point of view. Cheers!

    Read the article

  • Sort latitude and longitude coordinates into clockwise ordered quadrilateral

    - by Dave Jarvis
    Problem Users can provide up to four latitude and longitude coordinates, in any order. They do so with Google Maps. Using Google's Polygon API (v3), the coordinates they select should highlight the selected area between the four coordinates. Solutions and Searches http://www.geocodezip.com/map-markers_ConvexHull_Polygon.asp http://softsurfer.com/Archive/algorithm_0103/algorithm_0103.htm http://stackoverflow.com/questions/2374708/how-to-sort-points-in-a-google-maps-polygon-so-that-lines-do-not-cross http://stackoverflow.com/questions/242404/sort-four-points-in-clockwise-order http://en.literateprograms.org/Quickhull_%28Javascript%29 Graham's scan seems too complicated for four coordinates Sort the coordinates into two arrays (one by latitude, the other longitude) ... then? Jarvis March algorithm? Question How do you sort the coordinates in (counter-)clockwise order, using JavaScript? Code Here is what I have so far: // Ensures the markers are sorted: NW, NE, SE, SW function sortMarkers() { var ns = markers.slice( 0 ); var ew = markers.slice( 0 ); ew.sort( function( a, b ) { if( a.position.lat() < b.position.lat() ) { return -1; } else if( a.position.lat() > b.position.lat() ) { return 1; } return 0; }); ns.sort( function( a, b ) { if( a.position.lng() < b.position.lng() ) { return -1; } else if( a.position.lng() > b.position.lng() ) { return 1; } return 0; }); var nw; var ne; var se; var sw; if( ew.indexOf( ns[0] ) > 1 ) { nw = ns[0]; } else { ne = ns[0]; } if( ew.indexOf( ns[1] ) > 1 ) { nw = ns[1]; } else { ne = ns[1]; } if( ew.indexOf( ns[2] ) > 1 ) { sw = ns[2]; } else { se = ns[2]; } if( ew.indexOf( ns[3] ) > 1 ) { sw = ns[3]; } else { se = ns[3]; } markers[0] = nw; markers[1] = ne; markers[2] = se; markers[3] = sw; } What is a better approach? The recursive Convex Hull algorithm is overkill for four points in the data set. Thank you.

    Read the article

  • .NET C#: WebBrowser control Navigate() does not load targeted URL

    - by Dave
    Hey guys, I'm trying to programmatically load a web page via the WebBrowser control with the intent of testing the page & it's JavaScript functions. Basically, I want to compare the HTML & JavaScript run through this control against a known output to ascertain whether there is a problem. However, I'm having trouble simply creating and navigating the WebBrowser control. The code below is intended to load the HtmlDocument into the WebBrowser.Document property: WebBrowser wb = new WebBrowser(); wb.AllowNavigation = true; wb.Navigate("http://www.google.com/"); When examining the web browser's state via Intellisense after Navigate() runs, the WebBrowser.ReadyState is 'Uninitialized', WebBrowser.Document = null, and it overall appears completely unaffected by my call. On a contextual note, I'm running this control outside of a Windows form object: I do not need to load a window or actually look at the page. Requirements dictate the need to simply execute the page's JavaScript and examine the resultant HTML. Any suggestions are greatly appreciated, thanks!

    Read the article

  • Need additional help with binding multiple CommandParameters using MultiBinding

    - by Dave
    I need to have a command handler for a ToggleButton that can take multiple parameters, namely the IsChecked property of said ToggleButton, along with a constant value, which could be a string, byte, int... doesn't matter. I found this great question on SO and followed the answer's link and read up on MultiBinding and IMultiValueConverter. It went really smoothly until I had to write the MultiBinding, when I realized that I also need to pass a constant value and couldn't do something like <Binding Value="1" /> I then came across another similar question that Kent Boogaart answered, and then I started to think about ways that I could get around this. One possible way is to not use MVVM and simply add the Tag property to my ToggleButton, in which case my MultiBinding would look like this: <MultiBinding Converter="{StaticResource MyConverter}"> <MultiBinding.Bindings> <Binding Path="IsChecked" /> <Binding Path="Tag" /> </MultiBinding.Bindings> </MultiBinding> Kent had made a comment along the lines of, "if you're using MVVM you should be able to get around this issue". However, I'm not sure that's an option for me, even though I have adopted MVVM as my WPF pattern of necessity choice. The reason why I say this is that I have wayyyy more than one ToggleButton in the UserControl, and each of the ToggleButtons' Commands need to call the same function. But since they are ToggleButtons, I can't use the property bound to IsChecked in the ViewModel, because I don't know which one was last clicked. I suppose I could add another private property to keep track of this, but it seems a little silly. As far as the constant goes, I could probably get rid of this if I did the tracking idea, but not sure of any other way to get around it. Does anyone have good suggestions for me here? :) EDIT -- ok, so I need to update my bindings, which still don't work quite right: <ToggleButton Tag="1" Command="{Binding MyCommand}" Style="{StaticResource PassFailToggleButtonStyle}" HorizontalContentAlignment="Center" Background="Transparent" BorderBrush="Transparent" BorderThickness="0"> <ToggleButton.CommandParameter> <MultiBinding Converter="{StaticResource MyConverter}"> <MultiBinding.Bindings> <Binding Path="IsChecked" RelativeSource="{RelativeSource Mode=Self}" /> <Binding Path="Tag" RelativeSource="{RelativeSource Mode=Self}" /> </MultiBinding.Bindings> </MultiBinding> </ToggleButton.CommandParameter> </ToggleButton> IsChecked was working, but not Tag. I just realized that Tag is a string... duh. It's working now! The key was to use a RelativeSource of Self.

    Read the article

  • Creating a "crossover" function for a genetic algorithm to improve network paths

    - by Dave
    Hi, I'm trying to develop a genetic algorithm that will find the most efficient way to connect a given number of nodes at specified locations. All the nodes on the network must be able to connect to the server node and there must be no cycles within the network. It's basically a tree. I have a function that can measure the "fitness" of any given network layout. What's stopping me is that I can't think of a crossover function that would take 2 network structures (parents) and somehow mix them to create offspring that would meet the above conditions. Any ideas? Clarification: The nodes each have a fixed x,y coordiante position. Only the routes between them can be altered.

    Read the article

  • UIActionSheet position on landscape and portrait

    - by Dave
    UIActionSheet positioning is not centered when I open it in landscape mode. If I set bounds or change the frame. The contents inside the UIActionSheet which is a subview changes but the actual sheet remains in the same place which looks very awkward. How do I move the UIActionSheet along with it's subview to the center of the screen?

    Read the article

  • Migrate from MySQL to PostgreSQL on Linux (Kubuntu)

    - by Dave Jarvis
    A long time ago in a galaxy far, far away... Trying to migrate a database from MySQL to PostgreSQL. All the documentation I have read covers, in great detail, how to migrate the structure. I have found very little documentation on migrating the data. The schema has 13 tables (which have been migrated successfully) and 9 GB of data. MySQL version: 5.1.x PostgreSQL version: 8.4.x I want to use the R programming language to analyze the data using SQL select statements; PostgreSQL has PL/R, but MySQL has nothing (as far as I can tell). A New Hope Create the database location (/var has insufficient space; also dislike having the PostgreSQL version number everywhere -- upgrading would break scripts!): sudo mkdir -p /home/postgres/main sudo cp -Rp /var/lib/postgresql/8.4/main /home/postgres sudo chown -R postgres.postgres /home/postgres sudo chmod -R 700 /home/postgres sudo usermod -d /home/postgres/ postgres All good to here. Next, restart the server and configure the database using these installation instructions: sudo apt-get install postgresql pgadmin3 sudo /etc/init.d/postgresql-8.4 stop sudo vi /etc/postgresql/8.4/main/postgresql.conf Change data_directory to /home/postgres/main sudo /etc/init.d/postgresql-8.4 start sudo -u postgres psql postgres \password postgres sudo -u postgres createdb climate pgadmin3 Use pgadmin3 to configure the database and create a schema. The episode continues in a remote shell known as bash, with both databases running, and the installation of a set of tools with a rather unusual logo: SQL Fairy. perl Makefile.PL sudo make install sudo apt-get install perl-doc (strangely, it is not called perldoc) perldoc SQL::Translator::Manual Extract a PostgreSQL-friendly DDL and all the MySQL data: sqlt -f DBI --dsn dbi:mysql:climate --db-user user --db-password password -t PostgreSQL > climate-pg-ddl.sql mysqldump --skip-add-locks --complete-insert --no-create-db --no-create-info --quick --result-file="climate-my.sql" --databases climate --skip-comments -u root -p The Database Strikes Back Recreate the structure in PostgreSQL as follows: pgadmin3 (switch to it) Click the Execute arbitrary SQL queries icon Open climate-pg-ddl.sql Search for TABLE " replace with TABLE climate." (insert the schema name climate) Search for on " replace with on climate." (insert the schema name climate) Press F5 to execute This results in: Query returned successfully with no result in 122 ms. Replies of the Jedi At this point I am stumped. Where do I go from here (what are the steps) to convert climate-my.sql to climate-pg.sql so that they can be executed against PostgreSQL? How to I make sure the indexes are copied over correctly (to maintain referential integrity; I don't have constraints at the moment to ease the transition)? How do I ensure that adding new rows in PostgreSQL will start enumerating from the index of the last row inserted (and not conflict with an existing primary key from the sequence)? How do you ensure the schema name comes through when transforming the data from MySQL to PostgreSQL inserts? Resources A fair bit of information was needed to get this far: https://help.ubuntu.com/community/PostgreSQL http://articles.sitepoint.com/article/site-mysql-postgresql-1 http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#MySQL http://pgfoundry.org/frs/shownotes.php?release_id=810 http://sqlfairy.sourceforge.net/ Thank you!

    Read the article

  • Binding not writing to datasource on .NET Compact Framework Form -- works on Full Framework

    - by Dave Welling
    I have a problem with a bound user control writing back to it's datasource on a NetCF forms application. The application is too complex to post code, so I made a toy version to show you. I create a form, usercontrol with a combobox, a class (testBind) and another class (TestLookup). I bind a property of the usercontrol ("value") to a property ("selectedValue") on the testBind class. The testBind class implements INotifyPropertyChanged. I create a few fascade methods on the user control to bind the contained combobox to a BindingList(of TestLookup). I create a button to show the value of the testBind bound property (in a MessageBox). The messagebox returns "-1" every time regardless of the combobox entry selected. I can take the EXACT same code, paste it in a full framework Forms app and it will return the correct value of the selected combobox entry. Imports System.ComponentModel Public Class Form2 Inherits Form Private _testBind1 As testBind Private _testUserControlX As UserControlX Friend WithEvents _buttonX As System.Windows.Forms.Button Public Sub New() _buttonX = New System.Windows.Forms.Button _buttonX.Location = New System.Drawing.Point(126, 228) _buttonX.Size = New System.Drawing.Size(70, 21) _testBind1 = New testBind _testUserControlX = New UserControlX() Dim _lookup As New System.ComponentModel.BindingList(Of TestLookup)() _lookup.Add(New TestLookup(1, "text1")) _lookup.Add(New TestLookup(2, "text2")) _testUserControlX.DataSource = _lookup _testUserControlX.DisplayMember = "Text" _testUserControlX.ValueMember = "ID" _testUserControlX.DataBindings.Add("Value", _testBind1, "SelectedID", False, DataSourceUpdateMode.OnValidation) MinimizeBox = False Controls.Add(_testUserControlX) Controls.Add(_buttonX) End Sub Private Sub ButtonX_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _buttonX.Click MessageBox.Show(_testBind1.SelectedID.ToString()) End Sub Public Class testBind Implements System.ComponentModel.INotifyPropertyChanged Private _selectedRow As Integer = -1 Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged Protected Sub OnPropertyChanged(ByVal PropertyName As String) RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(PropertyName)) End Sub Public Property SelectedID() As Integer Get Return _selectedRow End Get Set(ByVal value As Integer) _selectedRow = value OnPropertyChanged("SelectedID") End Set End Property End Class Public Class TestLookup Private _text As String Private _id As Integer Public Sub New(ByVal id As Integer, ByVal text As String) _text = text _id = id End Sub Public Property ID() As Integer Get Return _id End Get Set(ByVal value As Integer) _id = value End Set End Property Public Property Text() As String Get Return _text End Get Set(ByVal value As String) _text = value End Set End Property End Class End Class Public Class UserControlX Inherits System.Windows.Forms.UserControl Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Public Sub New() Me.ComboBox1 = New System.Windows.Forms.ComboBox Me.Controls.Add(Me.ComboBox1) End Sub Public Property Value() As Integer Get Return ComboBox1.SelectedValue End Get Set(ByVal value As Integer) ComboBox1.SelectedValue = value End Set End Property Public Property DataSource() As Object Get Return ComboBox1.DataSource End Get Set(ByVal value As Object) ComboBox1.DataSource = value End Set End Property Public Property ValueMember() As String Get Return ComboBox1.ValueMember End Get Set(ByVal value As String) ComboBox1.ValueMember = value End Set End Property Public Property DisplayMember() As String Get Return ComboBox1.DisplayMember End Get Set(ByVal value As String) ComboBox1.DisplayMember = value End Set End Property End Class

    Read the article

  • Databinding to ObservableCollection in a different UserControl?

    - by Dave
    Question re-written on 2010-03-24 I have two UserControls, where one is a dialog that has a TabControl, and the other is one that appears within said TabControl. I'll just call them CandyDialog and CandyNameViewer for simplicity's sake. There's also a data management class called Tracker that manages information storage, which for all intents and purposes just exposes a public property that is an ObservableCollection. I display the CandyNameViewer in CandyDialog via code behind, like this: private void CandyDialog_Loaded( object sender, RoutedEventArgs e) { _candyviewer = new CandyViewer(); _candyviewer.DataContext = _tracker; candy_tab.Content = _candyviewer; } The CandyViewer's XAML looks like this (edited for kaxaml): <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Page.Resources> <DataTemplate x:Key="CandyItemTemplate"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="120"></ColumnDefinition> <ColumnDefinition Width="150"></ColumnDefinition> </Grid.ColumnDefinitions> <TextBox Grid.Column="0" Text="{Binding CandyName}" Margin="3"></TextBox> <!-- just binding to DataContext ends up using InventoryItem as parent, so we need to get to the UserControl --> <ComboBox Grid.Column="1" SelectedItem="{Binding SelectedCandy, Mode=TwoWay}" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.CandyNames}" Margin="3"></ComboBox> </Grid> </DataTemplate> </Page.Resources> <Grid> <ListBox DockPanel.Dock="Top" ItemsSource="{Binding CandyBoxContents, Mode=TwoWay}" ItemTemplate="{StaticResource CandyItemTemplate}" /> </Grid> </Page> Now everything works fine when the controls are loaded. As long as CandyNames is populated first, and then the consumer UserControl is displayed, all of the names are there. I obviously don't get any errors in the Output Window or anything like that. The issue I have is that when the ObservableCollection is modified from the model, those changes are not reflected in the consumer UserControl! I've never had this problem before; all of my previous uses of ObservableCollection updated fine, although in those cases I wasn't databinding across assemblies. Although I am currently only adding and removing candy names to/from the ObservableCollection, at a later date I will likely also allow renaming from the model side. Is there something I did wrong? Is there a good way to actually debug this? Reed Copsey indicates here that inter-UserControl databinding is possible. Unfortunately, my favorite Bea Stollnitz article on WPF databinding debugging doesn't suggest anything that I could use for this particular problem.

    Read the article

  • Visual Studio 2008 maintenance mode - I can't remember my installation source drive letter!!!

    - by Dave
    I've searched high and low for this and can't find the answer anywhere. I installed VS2008, but my drive letters are all mapped differently now, and of course I need to add a component to my current installation (VC++). But since I don't know which drive letter it was installed from, and since I don't want to try to figure it out the brute force way, I was hoping that someone here knew how to figure that out. I poked through HKCU and HKLM in the registry, hoping to find the info there, but couldn't. Does anyone know how to get this to work? Right now, I get the error "A selected drive is no longer valid. Please review your installation path settings before continuing with setup".

    Read the article

  • iPod/iPhone OpenGL ES UIView flashes when updating

    - by Dave Viner
    I have a simple iPhone application which uses OpenGL ES (v1) to draw a line based on the touches of the user. In the XCode Simulator, the code works perfectly. However, when I install the app onto an iPod or iPhone, the OpenGL ES view "flashes" when drawing the line. If I disable the line drawing, the flash disappears. By "flash", I mean that the background image (which is an OpenGL texture) disappears momentarily, and then reappears. It appears as if the entire scene is completely erased and redrawn. The code which handles the line drawing is the following: renderLineFromPoint:(CGPoint)start toPoint:(CGPoint)end { static GLfloat* vertexBuffer = NULL; static NSUInteger vertexMax = 64; NSUInteger vertexCount = 0, count, i; //Allocate vertex array buffer if(vertexBuffer == NULL) vertexBuffer = malloc(vertexMax * 2 * sizeof(GLfloat)); //Add points to the buffer so there are drawing points every X pixels count = MAX(ceilf(sqrtf((end.x - start.x) * (end.x - start.x) + (end.y - start.y) * (end.y - start.y)) / kBrushPixelStep), 1); for(i = 0; i < count; ++i) { if(vertexCount == vertexMax) { vertexMax = 2 * vertexMax; vertexBuffer = realloc(vertexBuffer, vertexMax * 2 * sizeof(GLfloat)); } vertexBuffer[2 * vertexCount + 0] = start.x + (end.x - start.x) * ((GLfloat)i / (GLfloat)count); vertexBuffer[2 * vertexCount + 1] = start.y + (end.y - start.y) * ((GLfloat)i / (GLfloat)count); vertexCount += 1; } //Render the vertex array glVertexPointer(2, GL_FLOAT, 0, vertexBuffer); glDrawArrays(GL_POINTS, 0, vertexCount); //Display the buffer [context presentRenderbuffer:GL_RENDERBUFFER_OES]; } (This function is based on the function of the same name from the GLPaint sample application.) For the life of me, I can not figure out why this causes the screen to flash. The line is drawn properly (both in the Simulator and in the iPod). But, the flash makes it unusable. Anyone have ideas on how to prevent the "flash"?

    Read the article

  • MKMapView - viewForAnnotation not called while loading more results

    - by Dave
    I have a search enabled map view. When user hits search, my custom annotations are added to the map view. The search returns 20 results with a 'load more' link. When I hit load more, more annotations should be added to map view. The problem is - annotations gets added to the map view but is not displayed on the map. If I zoom in or zoom out to change the map region, the pins are shown. I find that viewForAnnotations: is not getting called when i hit 'load more'. I am not sure how to trigger this. any one?

    Read the article

  • Minimax algorithm: Cost/evaluation function?

    - by Dave
    Hi guys, A school project has me writing a Date game in C++ (example at http://www.cut-the-knot.org/Curriculum/Games/Date.shtml) where the computer player must implement a Minimax algorithm with alpha-beta pruning. Thus far, I understand what the goal is behind the algorithm in terms of maximizing potential gains while assuming the opponent will minify them. However, none of the resources I read helped me understand how to design the evaluation function the minimax bases all it's decisions on. All the examples have had arbitrary numbers assigned to the leaf nodes, however, I need to actually assign meaningful values to those nodes. Intuition tells me it'd be something like +1 for a win leaf node, and -1 for a loss, but how do intermediate nodes evaluate? Any help would be most appreciated.

    Read the article

  • UIActionSheet positioning problem

    - by Dave
    I need to display a pop with a UISwitch and a Done button when user taps on a button and save the state of the switch when the done button in the pop up is tapped. So I use UIActionSheet to do this - sheet = [[UIActionSheet alloc] initWithTitle:@"Switch Setting" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:@"Done", nil]; theSwitch = [[UISwitch alloc] init]; [sheet addSubview:theSwitch]; [sheet showInView:self.view]; - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == actionSheet.firstOtherButtonIndex) { theSwitch .on? NSLog(@"Switch is on") : NSLog(@"Switch if off"); } } All this works great. I have problem with positioning. Unfortunately, I don't have a screen shot at the moment to post here. But the switch appears at the very top on the same line with the Action Sheet title and then below that is the Done button. Please someone help me how to position the switch below the Title and increase the Action Sheet size so it looks neat. I need this asap. Thanks.

    Read the article

  • A help system for a PHP web app

    - by Dave
    Hi, As our new web app gets more complicated, so the need for help docs increases. I am not talking about documenting code, I am literally talking about application help. So myapp/help, or for example, enabling context help from a particular point in the app with a link such as myapp/help/users/create/ etc. Are there apps out there for doing this? For example, Wufoo use wordpress for http://wufoo.com/docs/ which I like (and understand wp, so its a nice solution), and Xero have a lovely ASPX http://help.xero.com/ interface. But I'm thinking there might be more dedicated implementations for what I'm looking for. We're on a linux, apache, postgresql, php stack, but a mysql supported installation is not the end of the world. Does anyone have any suggestions for this? It's a bit of a minefield when googling php + help + system.

    Read the article

  • ListView + MultipleSelect + MVVM = ?

    - by Dave
    If I were to say "the heck with it!", I could just give my ListView with SelectionMode="Multiple" a name, and be able to get all of the selected items very easily. But I'm trying to stick to MVVM as much as possible, and I want to somehow databind to an ObservableCollection that holds the value from the Name column for each selected item. How in the world do you do this? Single selection is simple, but the multi selection solution is not obvious to me with my current WPF / MVVM knowledge. I read this question on SO, and while it does give me some good insight, I don't know how to add the necessary binding to a row, because I am using a ListView with a GridView as its View, not a ListBox. Here's what my XAML basically looks like: <ListView DockPanel.Dock="Top" ItemsSource="{Binding ClientPreview}" SelectionMode="Multiple"> <ListView.View> <GridView AllowsColumnReorder="False"> <GridViewColumn Header="Name"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Path=Name}" /> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> <GridViewColumn Header="Address"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Path=Address}" /> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> </ListView> It sounds like the right thing to do is to databind each row's IsSelected property to each object stored in the ObservableCollection I'm databinding to. I just haven't figured out how to do this.

    Read the article

  • UIKeyBoard resize on orientation change to landscape

    - by Dave
    This is very rookie question. I have a UIToolBar at the bottom which is supposed to animatedly move up and down with key board when the UIKeyBoard is displayed. I got that working with the help of UIKeyBoard Notifications. The view we are talking about has split view enabled. When device orientation is landscape, both the views as columns are shown [hope that makes sense]. When key board is shown, i do this CGSize keyBoardSize = [[notificationInfo objectForKey:UIKeyboardFrameEndUserInfoKey]CGRectValue].size; CGRect toolbarFrame= [BottomToolBar frame]; toolbarFrame.origin.y -= keyBoardSize.height; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.3]; BottomToolBar .frame = viewFrame; [UIView commitAnimations]; when key board is hiiden i do this toolbarFrame.origin.y += keyBoardSize.height; My Problem is when device orientation changes to landscape, when the key board is visible the bottom tool bar is gone. I see it move up quickly. I am not sure how to fix this. Can anyone help please? Also, is there a way to NOT make the key board span across both the views in the split view?

    Read the article

  • Databinding between UserControls?

    - by Dave
    I've got a situation where one of my UserControls would like to display a list of strings in a droplist, and the ItemsSource is set to another UserControl's ObservableCollection. The consumer of this data has its droplist defined in XAML like this: <ComboBox Grid.Column="1" SelectedItem="{Binding MyItem, Mode=TwoWay}" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.MyItems}" Margin="3"></ComboBox> MyItems is defined as an ObservableCollection<string> in the producer UserControl. Now everything works fine when the controls are loaded. As long as MyItems is populated first, and then the consumer UserControl is displayed, all of the items are there. I obviously don't get any errors in the Output Window or anything like that. The issue I have is that when the ObservableCollection is modified, those changes are not reflected in the consumer UserControl! I've never had this problem before, but all of my previous uses of ObservableCollection with updating the collection are within a single control, and databinding is not inter-UserControl. Is there something I did wrong? Is there a good way to actually debug this? Reed Copsey indicates here that inter-UserControl databinding is possible. Unfortunately, my favorite Bea Stollnitz article on WPF databinding debugging doesn't suggest anything that I could use for this particular problem.

    Read the article

  • creating a Grails application in IntelliJ IDEA 9.0.x fails to prompt for "create-app"

    - by dave
    When I create a Grails application in IntelliJ 9 on Snow Leopard I am not prompted to create an application. IntelliJ finished the wizard and creates an empty project that is not a Grails application. I have tried two different Apple computers (MacBook Pro and Mac Pro) it does not work on either. The same steps on a Linux system results in a prompt to "create-app" and a Grails application. I have already tried the steps in http://stackoverflow.com/questions/470882/intellij-idea-setup-on-os-x Is there a specific place that Grails needs to be installed? Has anyone else seen this behavior? Thanks

    Read the article

  • C# WPF fill datagrid or listview from XML file

    - by Dave
    I have a well formed XML file I would like to fill a datagrid with. I would prefer using the AutoGenerate feature of WFPToolKit datagrid, but could hard code the columns in. The trouble I am having is getting the xml file contents into a datagrid. I had it partially working in a listview, but think a datagrid would be more suited for my needs. Can anyone provide a quick example of how to accomplish this? Thanks!

    Read the article

  • serializing type definitions?

    - by Dave
    I'm not positive I'm going about this the right way. I've got a suite of applications that have varying types of output (custom defined types). For example, I might have a type called Widget: Class Widget Public name as String End Class Throughout the course of operation, when a user experiences a certain condition, the application will take that output instance of widget that user received, serialize it, and log it to the database noting the name of the type. Now, I have other applications that do something similar, but instead of dealing with Widget, it could be some totally random other type with different attributes, but again I serialize the instance, log it to the db, and note the name of the type. I have maybe a half dozen different types and don't anticipate too many additional ones in the future. After all this is said and done, I have an admin interface that looks through these logs, and has the ability for the user to view the contents of this data thats been logged. The Admin app has a reference to all the types involved, and with some basic switch case logic hinged upon the name of the type, will cast it into their original types, and pass it on to some handlers that have basic display logic to spit the data back out in a readable format (one display handler for each type) NOW... all this is well and good... Until one day, my model changed. The Widget class now has deprecated the name attribute and added on a bunch of other attributes. I will of course get type mismatches in the admin side when I try to reconstitute this data. I was wondering if there was some way, at runtime, i could perhaps reflect through my code and get a snapshot of the type definition at that precise moment, serialize it, and store it along with the data so that I could somehow use this to reconstitute it in the future?

    Read the article

  • Strange crashes when using MPMoviePlayerController in iPad and iPad simulator with iOS 4.2.

    - by Dave L
    I'm getting crashes when trying to play a movie using MPMoviePlayerController on the iPad and in the iPad simulator using iOS 4.2. I am building using xcode 3.2.5 and the 4.2 SDK. When running on an iPad using iOS 3.2 or in the iPad simulator 3.2, the same code works fine, but on an iPad running 4.2 or in the iPad simulator 4.2, it crashes. The crash is due to an exception for calling an unknown selector down somewhere deep in the cocoa libraries, something tries to call a selector called "setHitRectInsets:" on a UIButton object. Also, the crash happens after control has returned to the main event loop. Anybody have any idea what might be causing this? Here is the code (roughly, some extraneous stuff deleted that doesn't seem to have any effect) that is crashing: NSString *fullMovieFilename = [[NSBundle mainBundle] pathForResource:@"movie" ofType:@"m4v"]; NSURL *movieURL = [NSURL fileURLWithPath:fullMovieFilename]; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; moviePlayer.controlStyle = MPMovieControlStyleNone; // crash happens regardless of the setting here [moviePlayer.view setFrame:self.view.bounds]; [self.view addSubview:moviePlayer.view]; [moviePlayer setFullscreen:YES animated:YES]; // crash happens whether i use fullscreen or not [moviePlayer play]; The same code also works just find if I build using Xcode 3.2.3 and the 4.0 SDK. The crash stack trace looks like this: 2011-03-04 23:08:22.017 MyApp[31610:207] -[UIButton setHitRectInsets:]: unrecognized selector sent to instance 0x990bc60 2011-03-04 23:08:22.020 MyApp[31610:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIButton setHitRectInsets:]: unrecognized selector sent to instance 0x990bc60' *** Call stack at first throw: ( 0 CoreFoundation 0x0151abe9 __exceptionPreprocess + 185 1 libobjc.A.dylib 0x0166f5c2 objc_exception_throw + 47 2 CoreFoundation 0x0151c6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 3 CoreFoundation 0x0148c366 ___forwarding___ + 966 4 CoreFoundation 0x0148bf22 _CF_forwarding_prep_0 + 50 5 MediaPlayer 0x011b5bdb -[MPTransportControls createButtonForPart:] + 380 6 MediaPlayer 0x011b65d5 -[MPTransportControls _updateAdditions:removals:forPart:] + 110 7 MediaPlayer 0x011b4d78 -[MPTransportControls _reloadViewWithAnimation:] + 299 8 MediaPlayer 0x011b621a -[MPTransportControls setVisibleParts:] + 49 9 MediaPlayer 0x011b6e4a -[MPTransportControls initWithFrame:] + 173 10 MediaPlayer 0x011f9188 -[MPInlineTransportControls initWithFrame:] + 78 11 MediaPlayer 0x011f193a -[MPInlineVideoOverlay layoutSubviews] + 158 12 QuartzCore 0x00d6e451 -[CALayer layoutSublayers] + 181 13 QuartzCore 0x00d6e17c CALayerLayoutIfNeeded + 220 14 QuartzCore 0x00d6e088 -[CALayer layoutIfNeeded] + 111 15 MediaPlayer 0x011f130c -[MPInlineVideoOverlay setAllowsWirelessPlayback:] + 46 16 MediaPlayer 0x011f5b0d -[MPInlineVideoViewController _overlayView] + 526 17 MediaPlayer 0x011f6359 -[MPInlineVideoViewController _layoutForItemTypeAvailable] + 1350 18 Foundation 0x000e56c1 _nsnote_callback + 145 19 CoreFoundation 0x014f2f99 __CFXNotificationPost_old + 745 20 CoreFoundation 0x0147233a _CFXNotificationPostNotification + 186 21 Foundation 0x000db266 -[NSNotificationCenter postNotificationName:object:userInfo:] + 134 22 Foundation 0x000e75a9 -[NSNotificationCenter postNotificationName:object:] + 56 23 MediaPlayer 0x01184dd6 -[MPAVItem _updateForNaturalSizeChange] + 278 24 MediaPlayer 0x011818e4 __-[MPAVItem blockForDirectAVControllerNotificationReferencingItem:]_block_invoke_1 + 82 25 MediaPlayer 0x011899ba -[MPAVController _postMPAVControllerSizeDidChangeNotificationWithItem:] + 138 26 Foundation 0x000e56c1 _nsnote_callback + 145 27 CoreFoundation 0x014f2f99 __CFXNotificationPost_old + 745 28 CoreFoundation 0x0147233a _CFXNotificationPostNotification + 186 29 Foundation 0x000db266 -[NSNotificationCenter postNotificationName:object:userInfo:] + 134 30 Celestial 0x052a35b2 -[NSObject(NSObject_AVShared) postNotificationWithDescription:] + 176 31 Celestial 0x052ab214 -[AVController fpItemNotification:sender:] + 735 32 Celestial 0x052b5305 -[AVPlaybackItem fpItemNotificationInfo:] + 640 33 Celestial 0x052a3d5c -[AVObjectRegistry safeInvokeWithDescription:] + 211 34 Foundation 0x000fa9a6 __NSThreadPerformPerform + 251 35 CoreFoundation 0x014fc01f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 36 CoreFoundation 0x0145a28b __CFRunLoopDoSources0 + 571 37 CoreFoundation 0x01459786 __CFRunLoopRun + 470 38 CoreFoundation 0x01459240 CFRunLoopRunSpecific + 208 39 CoreFoundation 0x01459161 CFRunLoopRunInMode + 97 40 GraphicsServices 0x01e4f268 GSEventRunModal + 217 41 GraphicsServices 0x01e4f32d GSEventRun + 115 42 UIKit 0x0038a42e UIApplicationMain + 1160 43 MyApp 0x0000837a main + 102 44 MpApp 0x00002009 start + 53 ) terminate called after throwing an instance of 'NSException' Been fighting with this for several days, and have searched the internet quite a bit for anybody having similar problems, all with no luck. Any suggestions would be greatly appreciated.

    Read the article

< Previous Page | 46 47 48 49 50 51 52 53 54 55 56 57  | Next Page >