Search Results

Search found 13450 results on 538 pages for 'recent items'.

Page 32/538 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • sort items based on their appears count

    - by ANIL MANE
    Hello Experts, I have data like this d b c a d c b a b c a c a d c if you analyse, you will find the appearance of each element as follows a: 4 b: 3 c: 5 d: 2 According to appearance my sorted elements would be c,a,b,d and final output should be c b d a d c b a b c a c a d c Any clue, how we can achieve this using sql query ?

    Read the article

  • Items mixed up after scrolling in UITableView

    - by jean
    When I scroll in my UITableView, the cells become mixed up. What am I doing wrong? This is my method: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } [cell insertSubview:[itemArray objectAtIndex:indexPath.row] atIndex:indexPath.row]; return cell; } Update It now works by using cell.contentView, but now when I select an item, the selected one is overlayed with the content of a different cell...

    Read the article

  • Haskell parsec parsing a string of items

    - by Chris
    I have a list that I need to parse where the all but the last element needs to be parsed by one parser, and the last element needs to be parsed by another parser. a = "p1 p1b ... p2" or a = "p2" Originally I tried parser = do parse1 <- many parser1 parse2 <- parser2 return AParse parse1 parse2 The problem is that parse1 can consume a parse2 input. So parse1 always consumes the entire list, and leave parse2 with nothing. Is there a way to say to apply parse1 to everything besides the last element in a string, and then apply parse2?

    Read the article

  • ASP.NET MVC: Accessing ModelMetadata for items in a collection

    - by DanM
    I'm trying to write an auto-scaffolder for Index views. I'd like to be able to pass in a collection of models or view-models (e.g., IEnumerable<MyViewModel>) and get back an HTML table that uses the DisplayName attribute for the headings (th elements) and Html.Display(propertyName) for the cells (td elements). Each row should correspond to one item in the collection. When I'm only displaying a single record, as in a Details view, I use ViewData.ModelMetadata.Properties to obtain the list of properties for a given model. But what happens when the model I pass to the view is a collection of model or view-model objects and not a model or view-model itself? How do I obtain the ModelMetadata for a particular item in a collection?

    Read the article

  • Show list items specific to user sharepoint

    - by Sachin
    Hi all, In my project i have a asset list which contains "request to download" link. In the same list there is "download link" column which is default empty. Now when any user clicks on request to download link a workflow is activated and it will send request to approver to approve or reject the download request. If approver accept the request then the "download link" column in the asset list will be updated by some URL which redirect user to download page. Now what happen is, if user A send request to download asset to approver and approver approves it this will update respective item in asset list and put a download URL in "Download Link" column but if user B get look for the same record in asset list the download link will be visible to this user too which is wrong. I want to display download link columns value to only those user whos request has been approve. FYI: I am using WSS 3.0 Can anyone help me what should be the best approch to do this...? Thanks in Advance Sachin

    Read the article

  • Adding custom context menu items to an Outlook MailItem using Outlook 2007 VSTO 3.0

    - by cbass
    Hi I've been trying to figure out how to create a context menu in VSTO 2007. I'm hoping that is possible. When I make this call. Dim commandBar As Microsoft.Office.Core.CommandBar = _word.CommandBars("Text") I get the following error. This object model command is not available in e-mail. I've look all over and from what I can tell it's not possible to add to the context menu in Office 2007. This doesn't seem right. I've also tried this event without any luck since it isn't being fired when right clicking on the MailItem ItemContextMenuDisplay(ByVal commandBar As Microsoft.Office.Core.CommandBar, ByVal selection As Microsoft.Office.Interop.Outlook.Selection) Hoping that someone can help. Thanks in advance.

    Read the article

  • Creating items in groups in Rails

    - by LearnRails
    My product table is id type price location 1 chips $3 aisle3 I have a question with adding the products in groups. There is a quantity field(nonmodel) where the user can enter the quantity While adding a new product if the user enters: type: soda quantity: 3 Then there 3 records should be created in product model with type= soda like the following. id type 2 soda 3 soda 4 soda If user enters location: aisle4 quantity: 2 Then id location 5 ailse4 6 ailse4 Can you tell me how to pass the nonmodel field 'quantity' to the rails(model or controller) and how use it to add the products in groups as mentioned above? or should I create a column called quantity in my product table? Will the history be updated too for all these new records with after_create filter which I already have ? Is there any good tutorial or book which shows how to pass such nonmodel html/javascript fields from view to rails and then back to the view? Any help will be greatly appreciated. Thanks

    Read the article

  • Display/hide menu items depending on logged on user

    - by Andrew
    In my web app, I would like to show an "Admin" menu link only to users who have been added to the database as an administrator. What would be the best way to do this in ASP.NET MVC 2? At the moment, I am doing it by checking whether the user exists in the Admin database table for every page. Obviously, there must be a better way to do this. If it helps, I am using Windows Auth.

    Read the article

  • WPF TreeView: How to style selected items with rounded corners like in Explorer

    - by Helge Klein
    The selected item in a WPF TreeView has a dark blue background with "sharp" corners. That looks a bit dated today: I would like to change the background to look like in Explorer of Windows 7 (with/without focus): What I tried so far does not remove the original dark blue background but paints a rounded border on top of it so that you see the dark blue color at the edges and at the left side - ugly. Interestingly, when my version does not have the focus, it looks pretty OK: I would like to refrain from redefining the control template as shown here or here. I want to set the minimum required properties to make the selected item look like in Explorer. Alternative: I would also be happy to have the focused selected item look like mine does now when it does not have the focus. When losing the focus, the color should change from blue to grey. Here is my code: <TreeView x:Name="TreeView" ItemsSource="{Binding TopLevelNodes}" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling"> <TreeView.ItemContainerStyle> <Style TargetType="{x:Type TreeViewItem}"> <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="BorderBrush" Value="#FF7DA2CE" /> <Setter Property="Background" Value="#FFCCE2FC" /> </Trigger> </Style.Triggers> </Style> </TreeView.ItemContainerStyle> <TreeView.Resources> <HierarchicalDataTemplate DataType="{x:Type viewmodels:ObjectBaseViewModel}" ItemsSource="{Binding Children}"> <Border Name="ItemBorder" CornerRadius="2" Background="{Binding Background, RelativeSource={RelativeSource AncestorType=TreeViewItem}}" BorderBrush="{Binding BorderBrush, RelativeSource={RelativeSource AncestorType=TreeViewItem}}" BorderThickness="1"> <StackPanel Orientation="Horizontal" Margin="2"> <Image Name="icon" Source="/ExplorerTreeView/Images/folder.png"/> <TextBlock Text="{Binding Name}"/> </StackPanel> </Border> </HierarchicalDataTemplate> </TreeView.Resources> </TreeView>

    Read the article

  • How to get more Feed items?

    - by drozzy
    How would I get the next page or more results for a feed? For example, when I go to Security Now feed page, there is no "next" link of any kind and the url parameter of "page=100" does nothing: http://leoville.tv/podcasts/sn.xml I get only 1 page of results of about 20 episodes. However my Google Reader can successfully retrieve episodes that are earlier than that.

    Read the article

  • Counting consecutive items within MS SQL

    - by Greg
    Got a problem with a query I'm trying to write. I have a table that lists people that have been sent an email. There is a bit column named Active which is set to true if they have responded. But I need to count the number of consecutive emails the person has been inactive since either their first email or last active email. For example, this basic table shows one person has been sent 9 emails. They have been active within two of the emails (3 & 5). So their inactive count would be 4 as we are counting from email number 6 onwards. PersonID(int) EmailID(int) Active(bit) 1 1 0 1 2 0 1 3 1 1 4 0 1 5 1 1 6 0 1 7 0 1 8 0 1 9 0 Any pointers or help would be great. Regards Greg

    Read the article

  • How to add items rows to a listview WPF and VB.net

    - by leviatan1001
    Im getting crazy with it. It is so easy in windows form, but in wpf it seems to be different. Every example i find is in C# and i cant addapt it. Well, this is the code i have. Atm, i have just defined the columns: 'diseño de las columnas Dim item As ListViewItem = New ListViewItem Dim Mi_Lista As GridView = New GridView Mi_Lista.AllowsColumnReorder = True Dim cine As New GridViewColumn() Dim Si3d As New GridViewColumn cine.Header = "Cine" cine.DisplayMemberBinding = New Binding("Cine") Si3d.DisplayMemberBinding = New Binding("si3D") cine.Width = 140 Si3d.Header = "3D" Si3d.Width = 50 Mi_Lista.Columns.Add(cine) Mi_Lista.Columns.Add(Si3d) Thanks in advance.

    Read the article

  • wx Python is not properly drawing customtree items

    - by uberjumper
    Hi, I am currently using wx.CustomTree, to use to display a series of configuration settings. I generally fill them with wx.TextCtrl / wx.Combobox, to allow the user to edit / enter stuff. Here is my code: class ConfigTree(CT.CustomTreeCtrl): """ Holds all non gui drawing panel stuff """ def __init__(self, parent): CT.CustomTreeCtrl.__init__(self, parent, id = common.ID_CONTROL_SETTINGS, style = wx.TR_DEFAULT_STYLE | wx.TR_HAS_BUTTONS | wx.TR_HAS_VARIABLE_ROW_HEIGHT | wx.TR_SINGLE) #self.HideWindows() #self.RefreshSubtree(self.root) self.population_size_ctrl = None self.SetSizeHints(350, common.FRAME_SIZE[1]) self.root = self.AddRoot("Configuration Settings") child = self.AppendItem(self.root, "Foo", wnd=wx.TextCtrl(self, wx.ID_ANY, "Lots Of Muffins")) The problem is, any children nodes, the data for these nodes is not filled in. When i basically expand the configuration settings tree node. I see the "Foo" node, however the textbox is empty. This is the same for both text node, Until i actually click on the child node. I've looked tried every form of update / etc. Does anyone have any ideas?

    Read the article

  • Javascript: Simply change items in another select box?

    - by oni-kun
    I'm developing a registration page and wish to use JS to dynamically choose avatar selection based on gender. Here's what I have so far.. <select name="gender"> <option value="Male">Male </option> <option value="Female">Female </option> </select> And that should update options in this based on gender: <select name="avatar"> <option value="Trainer">Trainer </option> </select> <br /> <img src="images/trainers/male/Trainer.gif" /> I can't wrap my head around example code or concepts, I just need an example of how to fill 2-3 values into the 'avatar' selectbox based on gender, female or male, also how can I make 'Trainer' part of 'Trainer.gif' become dynamic? based on the avatar they choose?

    Read the article

  • How to read the selected items in an Html.ListBox at postback time

    - by EasyTimer
    I have a search page on my MVC site that contains a list of strings that I think the user might wish to search for in my database. This list of strings is available in my model class, so I can populate an Html.ListBox with those strings thus: <%=Html.ListBox("SearchStrings", new SelectList(Model.SearchStrings)) % My problem is, how can I tell which strings the user selected in that list in my postback action? Any help would be most appreciated.

    Read the article

  • C# Adding Items To A Windows Form

    - by Soo
    I built a little console application in C# and need to add a windows form interface to it. I added a form item, and now have a blank form. I don't know how to go from here and start adding buttons and menus to the form. Is there a form design toolbar or do I have to add buttons and menus using code?

    Read the article

  • Sending items in a LINQ sequence to a method that returns void

    - by generalt
    Hello all. Often while I'm dealing with LINQ sequences, I want to send each item to a method returning void, avoiding a foreach loop. However, I haven't found an elegant way to do this. Today, I wrote the following code: private StreamWriter _sw; private void streamToFile(List<ErrorEntry> errors) { if (_sw == null) { _sw = new StreamWriter(Path.Combine (Path.GetDirectoryName(_targetDatabasePath), "errors.txt")); } Func<ErrorEntry, bool> writeSelector = (e) => { _sw.WriteLine(getTabDelimititedLine(e)); return true; }; errors.Select(writeSelector); _sw.Flush(); } As you can see, I write a lambda function that just returns true, and I realize that the Select method will return a sequence of booleans- I'll just ignore that sequence. However, this seems a little bit noobish and jank. Is there any elegant way to do this? Or am I just misapplying LINQ? Thanks.

    Read the article

  • Find items with belongs_to associations in Rails?

    - by dannymcc
    Hi Everyone, I have a model called Kase each "Case" is assigned to a contact person via the following code: class Kase < ActiveRecord::Base validates_presence_of :jobno has_many :notes, :order => "created_at DESC" belongs_to :company # foreign key: company_id belongs_to :person # foreign key in join table belongs_to :surveyor, :class_name => "Company", :foreign_key => "appointedsurveyor_id" belongs_to :surveyorperson, :class_name => "Person", :foreign_key => "surveyorperson_id" I was wondering if it is possible to list on the contacts page all of the kases that that person is associated with. I assume I need to use the find command within the Person model? Maybe something like the following? def index @kases = Person.Kase.find(:person_id) or am I completely misunderstanding everything again? Thanks, Danny EDIT: If I use: @kases= @person.kases I can successfully do the following: <% if @person.kases.empty? %> No Cases Found <% end %> <% if @person.kases %> This person has a case assigned to them <% end %> but how do I output the "jobref" field from the kase table for each record found?

    Read the article

  • ASP.NET custom server control: nested items

    - by Dylan Lin
    Hi, In the aspx code view, we can code like this: <asp:ListBox runat="server"> <asp:ListItem Text="Item1" /> <asp:ListItem Text="Item2" /> </asp:ListBox> However, the ListItem class is not a server control. How could we do that? Is there some attributes being consumed by the visual studio? Thanks:)

    Read the article

  • ASP.NET MVC: How to display strongly typed view model, containing list of items, which also contain

    - by Sam Delaney
    Hi, I'm building an app using ASP.NET MVC which I want to use a strongly type view model, which contains a List called items which contains an id int and itemName string. The view model also conatins a List called people, and the Person class contains a List. The way I want to display the information is as a table, with each row having a column of Person name, then n number of columns which contain checkboxes, one for each of the List, and checked based on whether the Person's List (called items) contains the id of the Item. I have the display working fine, but I'm struggling to understand how to name the items so that the posted method can read the data. This is what I have in the BeginForm: <table cellpadding="20"> <thead> <th>Person name</th> <!-- for each of the items, create a column with the item name --> <% foreach( var i in Model.items ) { %> <th><%= Html.Encode(i.itemName) %></th> <% } %> </thead> <% foreach( var p in Model.people ) { %> <tr> <td><%= Html.Encode(p.name) %></td> <!-- for each item, create a column with a checkbox --> <% foreach( var i in Model.items ) { %> <td> <% if( p.items.Contains(i.id) ) { %> <!-- vm is the name of the view model passed to the view --> <%= Html.CheckBox( "vm.people[" + p.id + "].items[" + i.id + "]", true ) %> <% } else { %> <%= Html.CheckBox( "vm.people[" + p.id + "].items[" + i.id + "]", false ) %> <% } %> </td> <% } %> </tr> <% } %> </table> And this code displays the information perfectly. When I click submit, however, I get an Object Reference Not Set.. error message. Can anyone help with this please?

    Read the article

  • SQL2008 merge replication fails to update depdendent items when table is added

    - by Dan Puzey
    Setup: an existing SQL2008 merge replication scenario. A large server database, including views and stored procs, being replicated to client machines. What I'm doing: * adding a new table to the database * mark the new table for replication (using SP_AddMergeArticle) * alter a view (which is already part of the replicated content) is updated to include fields from this new table (which is joined to the tables in the existing view). A stored procedure is similarly updated. The problem: the table gets replicated to client machines, but the view is not updated. The stored procedure is also not updated. Non-useful workaround: if I run the snapshot agent after calling SP_AddMergeArticle and before updating the view/SP, both the view and the stored procedure changes correctly replicate to the client. The bigger problem: I'm running a list of database scripts in a transaction, as part of a larger process. The snapshot agent can't be run during a transaction, and if I interrupt the transaction (e.g. by running the scripts in multiple transactions), I lose the ability to roll back the changes should something fail. Does anyone have any suggestions? It seems like I must be missing something obvious, because I don't see why the changes to the view/sproc wouldn't be replicating anyway, regardless of what's going on with the new table.

    Read the article

  • Perl Regex Multiple Items in Single String

    - by Sho Minamimoto
    I'm trying to parse a single string and get multiple chunks of data out from the same string with the same regex conditions. I'm parsing a single HTML doc that is static (For an undisclosed reason, I can't use an HTML parser to do the job.) I have an expression that looks like $string =~ /\<img\ssrc\="(.*)"/; and I want to get the value of $1. However, in the one string, there are many img tags like this, so I need something like an array returned (@1?) is this possible?

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >