Search Results

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

Page 16/538 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Performance of DirectX and Recent Windows Mobile Version

    - by Kevin
    I'm seeing very poor performance while using the managed DirectDraw wrappers for WindowsMobile. Microsoft.WindowsMobile.DirectX.Direct3D I would appear the biggest bottle neck is calling Device.Present() after building up the scene. When using the System.Diagnostics.Stopwatch and running this very trivial exmaple Using Sprites on MSDN I'm seeing it's taking approximately 150ms to call the Device.Present() method. I'm seeing this on my AT&T Tilt and on the emulator. In larger applications such as the UltimateGMan sample it's taking over a second to call this method. Does anyone have any experience with using DirectX on mobile devices? What am I missing? I would prefer to stay in the managed world but if I drop back into C++ would I see better performance?

    Read the article

  • Replace between 2 items in observableArray - knockout

    - by Yojik
    im tring to Replace between 2 items in observableArray with knockout but something is wrong.. after the replace of the items ,i will change and send the displayOrder property (in both itmems) to the server (or should i take other approach for this) rankDownMessage: function () { console.log("ranking down msg"); var currentItemindex = viewModel.messages.indexOf(this); var nextItemIndex = currentItemindex + 1; viewModel.messages.replace( viewModel.messages()[nextItemIndex], viewModel.messages()[currentItemindex] ); } only the first item changed to the second item but the second item doesnt become the first one

    Read the article

  • Adding items in the combobox dynamically.

    - by Harikrishna
    Can we add the items in the combobox located on the window form dynamically ? Like there are 7 combobox on the window form and when the application is run user should be able to add the item(s) in the combobox.And items added by user should be permanent in the combobox.

    Read the article

  • Mysql Avg function for recent 15 records by date (order date desc) in every symbol

    - by venkatesh
    i am trying to create a statement in sql (for a table which holds stock symbols and price on specified date) with avg of 5 day price and avg of 15 days price for each symbol. table description: symbol open high close date the average price is calculated from last 5 days and last 15 days. i tried this for getting 1 symbol: SELECT avg(close), avg(`trd_qty`) FROM (select * from cashmarket WHERE symbol = \'hdil\' order by `M_day` desc limit 0,15 ) s ...but I couldn't get the desired the list for showing avg values for all symbols.

    Read the article

  • Query a List of List of Items in LINQ c#

    - by call me Steve
    I am a bit new to LINQ, here is my problem. I have a List of List of Items I like to get the Items which are present in only one List (and if I could get the List in which they are without re-iterating through the "list of list" that would be great). I am trying without success to use the Aggregate / Except / Group keywords in the Linq query but nothing close to a solution so far.

    Read the article

  • filtering and though a sharepoint list items with powershell

    - by naijacoder
    I have tried below but not getting any result back Not sure if i'm doing this well. Can i filter in the foreach or in my if statement Thanks in advance [DateTime] $CreatedDate = $item["Created"] $convertedCreatedDate = $CreatedDate.ToString("yyyy-MM-dd") $today = (Get-Date).AddDays(-1).ToString("yyyy-MM-dd") foreach ($item in $list.items | where {$convertedCreatedDate -eq $today}) { if ($list.items | where {$convertedCreatedDate -eq $today}) { Write-Host $item["Created"] } Write-Host $item["Created"] }

    Read the article

  • No recent books on MPI: is it dying?

    - by Jono
    I've never used Message Passing Interface (MPI), but I've heard its name thrown about, most recently with Windows HPC Server. I had a quick look on amazon to see if there were any books on it, but they're all dated around 7 or more years ago. Is MPI still a valid technology choice for new applications, or has it been largely superceded by other distributed programming alternatives (e.g. DataSynapse GridServer)? As it's not really an implementation, but rather a standard, what is the likelihood (assuming it's not dead) that learning it will result in better design of distributed programming systems? Is there something else I should be looking at instead?

    Read the article

  • JavaScript + Adding items into dropdown

    - by Panther24
    I have two dropdowns in my JSP page 1. lstA test1 test2 test3 test4 2. lstB Now on selection of lstA, I want to populate all the items of lstA into lstB except the select one, also the content of lstA should remain the same. How can I achieve this? I tried to do it, but from lstA some random items get removed, which is quite wired.

    Read the article

  • Core Data - Best way to save a "number of items"

    - by Daniel Granger
    The user will have a static list of items to choose from. Using a Picker View they will choose one of the items and then select how many of them they want. Whats the best way to save this in core data? A Struct? struct order { NSInteger item; NSInteger numberOf; }; Or some sort of relationship? Many Thanks

    Read the article

  • Dojo treemodel- adding large number of items

    - by Ashley
    I am trying to add a large number of items (100+) to my tree via ForestStoreModel by calling newItem in a loop. This seems to be quite slow and locks up the browser. Is there any way I can do something similar to grid's beginUpdate & endUpdate? I want to basically 'turn off' my tree, add 100 items in a batch, then 'turn on' my tree. Any ideas? Thanks!

    Read the article

  • Efficiently store last X items in an MySQL Database

    - by Saif Bechan
    I want to store the last 3 items in an MySQL database in an efficient way. So when the 4th item is stored the first should be deleted. The way I do this not is first run a query getting the items. Than check what I should do then insert/delete. There has to be a better way to do this. Any suggestions?

    Read the article

  • How to add Items to GridView in C# Windows Store App (Win8)

    - by flexage
    To keep things simple let's just say I have a c# Windows Store Project for Windows 8 that has the following items: GridView (PlatformsGrid) List«PlatformSearchResult» (allPlatforms) DataTemplate (PlatformDataTemplate) in standardstyles.xaml allPlatforms is a collection of "PlatformSearchResult"objects populated from an online API, and has the following 3 properties: ID Name Alias I am able to add a new item to the gridview for each object that exists in my allPlatforms collection, however the items are blank and do not show the data from my objects. A quick summary of the current code looks like this: XAML Markup: <!-- Platforms Content --> <GridView x:Name="PlatformsGrid" Grid.Row="1" CanReorderItems="True" CanDragItems="True" ItemTemplate="{StaticResource PlatformDataTemplate}" > <GridView.ItemsPanel> <ItemsPanelTemplate> <WrapGrid MaximumRowsOrColumns="2" VerticalChildrenAlignment="Top" HorizontalChildrenAlignment="Center" /> </ItemsPanelTemplate> </GridView.ItemsPanel> </GridView> Data Template <!-- Platform Item Template --> <DataTemplate x:Key="PlatformDataTemplate"> <Grid Background="#FF939598" Height="250" Width="250"> <Image Source="/SampleImage.png" Stretch="UniformToFill"/> <StackPanel Orientation="Vertical" Background="#CC000000" Height="90" VerticalAlignment="Bottom"> <TextBlock Text="{Binding Name}" Margin="10,3,0,0" Width="242" Height="62" TextTrimming="WordEllipsis" TextWrapping="Wrap" HorizontalAlignment="Left"/> <TextBlock Text="{Binding Alias}" Margin="10,2,0,0" Width="186" Height="14" TextTrimming="WordEllipsis" HorizontalAlignment="Left" FontSize="9" Opacity="0.49"/> </StackPanel> </Grid> </DataTemplate> Controlling Function private async void FetchItemInfo_Loaded(object sender, RoutedEventArgs e) { // Get List of Top Games List<PlatformSearchResult> allPlatforms = new List<PlatformSearchResult>(); allPlatforms = await GamesDB.GetPlatforms(); // Dynamically Create Platform Tiles foreach (PlatformSearchResult platform in allPlatforms) { PlatformsGrid.DataContext = platform; PlatformsGrid.Items.Add(platform); } } How do I get the added items to show the appropriate object properties (ignoring the image for now), I'm just interested in populating the content of the TextBlocks. I appreciate any help anyone can provide! Thanks, Alex.

    Read the article

  • Making more recent items more likely to be drawn

    - by bobo
    There are a few hundred of book records in the database and each record has a publish time. In the homepage of the website, I am required to write some codes to randomly pick 10 books and put them there. The requirement is that newer books need to have higher chances of getting displayed. Since the time is an integer, I am thinking like this to calculate the probability for each book: Probability of a book to be drawn = (current time - publish time of the book) / ((current time - publish time of the book1) + (current time - publish time of the book1) + ... (current time - publish time of the bookn)) After a book is drawn, the next round of the loop will minus the (current time - publish time of the book) from the denominator and recalculate the probability for each of the remaining books, the loop continues until 10 books have been drawn. Is this algorithm a correct one? By the way, the website is written in PHP. Feel free to suggest some PHP codes if you have a better algorithm in your mind. Many thanks to you all.

    Read the article

  • jquery: iterating through various ul's list-items?

    - by user239831
    hey guys, someone already helped me solving the following problem: i wanted to iterate with my up and down arrows through list-items. http://jsfiddle.net/zBjrS/1/ in this example i only had one UL and wanted to navigate through its list-items. meannwhile i have multiple ul's underneath each other and want to navigate seemlessly through all of them as if there were only one UL. http://jsfiddle.net/zBjrS/2/ any idea how i could do that? thank you

    Read the article

  • itunes iphone sync stuck on "Waiting for items to copy"

    - by lindes
    superuser crowd, I've found a number of threads about this, but have yet to find a satisfactory answer. Perhaps I'll have better luck on this site?? I hope so... I'm having a problem with iTunes where syncing my iPhone ends up seeming to basically finish, but it says "Waiting for items to copy" after everything else, and just stays there for... well, a very long time, if I let it. Oh, and I'm not sure this is always the case, but at the moment, it's doing this while "Syncing Genius Data to [my iPhone] (Step 8 of 8)". If I click the little x in iTunes, it then gets stuck on "Canceling sync", for an equally indefinite sort of period. If I simply unplug the phone, everything seems to be synced and happy, but the next time I sync, it happens again. I presume this is a bug of some sort on Apple's part, but it seems like people have found workarounds... I'm just having trouble tracking one down that (a) is well described enough that I can actually follow it, (b) has enough detail that I can do it without losing data (i.e. tells me pathnames that I might want to copy first, or the like, before telling me to remove something) (note: see also point (a) -- I can't remove it if it's telling me to remove something that I don't know where it is!), and (c) otherwise seems sane. I'm hoping that here perhaps I'll get better luck -- with either a workaround, and/or debugging tips for figuring out how to find myself a workaround. Note: I'm busy with some other things at the moment, but can try to add some additional information later, if necessary.

    Read the article

  • XAML | When used XamlReader.Parse, not able to refer the items using the LogicalTreeHelper/VisualTre

    - by Roopesh
    Hi, I am setting the dynamic xaml (I am reading the xaml from the DB) for the content of a tab using the below statement. Tab.Content = XamlReader.Parse(xaml, ctx) After setting the content, if I try getting the children using the VisualTreeHelper, but I am not able to get. How ever I dont have this issue when I construct the xaml statically. Here is the code to reading the xaml. Dim XmlDocument = New XmlDataDocument() Dim IID As String = Nothing Dim xaml As String = Nothing Dim Tab As New TabItem Dim TempPanel As XmlNode = Nothing 'Tab.Height = 0 Try XmlDocument.Load(Directory.GetCurrentDirectory & "\Xml\AppFile.xml") pXmlDoc = XmlDocument xaml = XmlDocument.SelectSingleNode("//Grid").OuterXml Dim AsmName As String = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name Dim ctx As ParserContext = New ParserContext() ' New ParserContext() ctx.XamlTypeMapper = New XamlTypeMapper(New String() {AsmName}) ctx.XamlTypeMapper.AddMappingProcessingInstruction("src", "WpfToolkitDataGridTester", AsmName) ctx.XmlnsDictionary.Add("", "http://schemas.microsoft.com/winfx/2006/xaml/presentation") ctx.XmlnsDictionary.Add("x", "http://schemas.microsoft.com/winfx/2006/xaml") ctx.XmlnsDictionary.Add("src", "clr-namespace:WpfToolkitDataGridTester;assembly=" + AsmName) Tab.Name = "Tab" & Grid1Tab.Items.Count + 1 Tab.Header = "AppFile-1" Tab.BorderThickness = New Thickness(0) Tab.IsSelected = True Tab.Content = XamlReader.Parse(xaml, ctx) Grid1Tab.Items.Add(Tab) Return True Catch ex As Exception Throw End Try Here is the code to access the item after constructing the XAML. For i As Integer = 0 To VisualTreeHelper.GetChildrenCount(myVisual) - 1 Dim childVisual As Visual = CType(VisualTreeHelper.GetChild(myVisual, i), Visual) Select Case childVisual.DependencyObjectType.Name Case "ComboBox" AddHandler CType(childVisual, ComboBox).SelectionChanged, AddressOf ComboBox_SelectChanged Case "CheckBox" AddHandler CType(childVisual, CheckBox).Checked, AddressOf CheckBoxClicked AddHandler CType(childVisual, CheckBox).Unchecked, AddressOf CheckBoxClicked Case "RadioButton" AddHandler CType(childVisual, RadioButton).Checked, AddressOf CheckBoxClicked Case "TabControl" For Each item As System.Windows.Controls.TabItem In CType(childVisual, TabControl).Items EnumVisual(item.Content) Next End Select EnumVisual(childVisual) Next i any help is highly appreciated. Thanks,

    Read the article

  • Exception during iteration on collection and remove items from that collection

    - by Muhammad Kashif Nadeem
    I remove item from ArrayList in foreach loop and get follwing exception. Collection was modified; enumeration operation may not execute. How can I remove items in foreach Following is my code: /* * Need to remove all items from 'attachementsFielPath' which does not exist in names array. */ try { string attachmentFileNames = txtAttachment.Text.Trim(); // Textbox having file names. string[] names = attachmentFileNames.Split(new char[] { ';' }); int index = 0; // attachmentsFilePath is ArrayList holding full path of fiels user selected at any time. foreach (var fullFilePath in attachmentsFilePath) { bool isNeedToRemove = true; // Extract filename from full path. string fileName = fullFilePath.ToString().Substring(fullFilePath.ToString().LastIndexOf('\\') + 1); for (int i = 0; i < names.Length; i++) { // If filename found in array then no need to check remaining items. if (fileName.Equals(names[i].Trim())) { isNeedToRemove = false; break; } } // If file not found in names array, remove it. if (isNeedToRemove) { attachmentsFilePath.RemoveAt(index); isNeedToRemove = true; } index++; } } catch (Exception ex) { throw ex; }

    Read the article

  • Java - How to find count of items in a list in another list

    - by David Buckley
    Say I have two lists: List<String>products = new ArrayList<String>(); products.add("computer"); products.add("phone"); products.add("mouse"); products.add("keyboard"); List<String>cart = new ArrayList<String>(); cart.add("phone"); cart.add("monitor"); I need to find how many items in the cart list exist in the products list. For the lists above, the answer would be 1 (as phone is in products and cart). If the cart list was: List<String>cart = new ArrayList<String>(); cart.add("desk"); cart.add("chair"); The result would be 0. If cart contained computer, mouse, desk, chair, the result would be 2 (for computer and mouse). Is there something in the Apache Commons Collections or the Google Collections API? I've looked through them and see ways to get a bag count, but not from another list, although it's possible I'm missing something. Right now, the only way I can think of is to iterate over the cart items and see if products contains the individual item and keep a count. I can't use containsAll as I need the count (not a boolean), and that would fail if all items in cart didn't exist in the product list (which can happen). I'm using Java 1.6 if that matters.

    Read the article

  • XSLT Global count of grouped items

    - by Chris
    Hi there, I have a set of items which i am grouping using the muenchian method using keys. This is working great however when i try to do things with the first x number of items it is doing it on the x number of items in each group rather than across the whole set of results. How would i get the individual position of each item accross the whole collection? <xsl:key name="pictures-by-productid" match="/dsQueryResponse/Rows/Row" use="@ProductId" /> <xsl:template match="/"> <div style="border:1px solid red; float:left;"> <xsl:apply-templates select="/" mode="sub"> </xsl:apply-templates> </div> </xsl:template> and the second template <xsl:template match="/" mode="sub"> <xsl:for-each select="/dsQueryResponse/Rows/Row[count(. | key('pictures-by-productid', @ProductId)[1]) = 1]"> <xsl:for-each select="key('pictures-by-productid', @ProductId)"> <xsl:sort select="@PictureType" /> <div style="float:left; margin:2px;"> <img src="{@ThumbNailUrl}" width="58" /> <br /> Download <xsl:number value="position()" format="1. " /> <xsl:value-of select="." /> </div> </xsl:for-each> </xsl:for-each> </xsl:template> Thanks Chris

    Read the article

  • ListBox Items Not Visible after DataBinding

    - by SidC
    Good Evening All, I am writing a page that allows users to search a parts table, select quantities and a listbox is to be populated with gridview values. Here's a snippet of my aspx page: <asp:ListBox runat="server" ID="lbItems" Width="155px"> <asp:ListItem></asp:ListItem> <asp:ListItem></asp:ListItem> <asp:ListItem></asp:ListItem> <asp:ListItem></asp:ListItem> <asp:ListItem></asp:ListItem> </asp:ListBox> Here's the relevant contents of codebehind: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'Define DataTable Columns as incoming gridview fields Dim dtSelParts As DataTable = New DataTable Dim dr As DataRow = dtSelParts.NewRow() dtSelParts.Columns.Add("PartNumber") dtSelParts.Columns.Add("NSN") dtSelParts.Columns.Add("PartName") dtSelParts.Columns.Add("Qty") 'Select those gridview rows that have txtQty <> 0 For Each row As GridViewRow In MySearch.Rows Dim textboxText As String = _ CType(row.FindControl("txtQty"), TextBox).Text If textboxText <> "0" Then 'Create the row dr = dtSelParts.NewRow() 'Fill the row with data dr("PartNumber") = MySearch.DataKeys(row.RowIndex)("PartNumber") dr("NSN") = MySearch.DataKeys(row.RowIndex)("NSN") dr("PartName") = MySearch.DataKeys(row.RowIndex)("PartName") 'Add the row to the table dtSelParts.Rows.Add(dr) End If Next 'Need to send items to Listbox control lbItems lbItems.DataSource = New DataView(dtSelParts) lbItems.DataValueField = "PartNumber" lbItems.DataValueField = "NSN" lbItems.DataValueField = "PartName" lbItems.DataBind() End Sub The page runs fine in that my search functiobnality is intact, and I can input quantity values into my gridview's textbox. When I click Add to Quote the Listbox receives focus, but no list items are visible. I've created several list items in the aspx page, however I don't know how to populate the contents of my datatable in the listbox. Can someone help a newbie with this, seemingly, easy issue? Thanks, Sid

    Read the article

  • QuadTrees - how to update when internal items are moving

    - by egarcia
    I've implemented a working QuadTree. It subdivides 2-d space in order to accomodate items, identified by their bounding box (x,y,width,height) on the smallest possible quad (up to a minimum area). My code is based on this implementation (mine is in Lua instead of C#) : http://www.codeproject.com/KB/recipes/QuadTree.aspx I've been able to successfully implement insertions and deletions successfully. I've turn now my attention to the update() function, since my items' position and dimensions change over time. My first implementation works, but it is quite naïve: function QuadTree:update(item) self:remove(item) return self.root:insert(item) end Yup, I basically remove and reinsert every item every time they move. This works, but I'd like to optimize it a bit more; after all, most of the time, moving items still remain on the same quadTree node most of the iterations. Is there any standard way to deal with this kind of update? In case it helps, my code is here: http://github.com/kikito/passion/blob/master/ai/QuadTree.lua I'm not looking for someone to implement it for me; pointers to an existing working implementation (even in other languages) would suffice.

    Read the article

  • Andriod Spinner not displaying list items.

    - by user300339
    I think I am going crazy right now. I am trying to create a spinner populated by a datatable but for some reason the dropdown list items text is not being displayed. I have looked all over and have seen other posts with people having this same problem. Can anyone help?? speciesList = (Spinner) findViewById(R.id.speciesList); spinnerCursor = nsfdb.fetchAllSpecies(); startManagingCursor(spinnerCursor); //String []cArrayList = new String[]{"dog", "cat", "horse", "other"}; String[] from = new String[]{"species"}; int[] to = new int[]{R.id.text1}; SimpleCursorAdapter locations = new SimpleCursorAdapter(this, R.layout.loc_row, spinnerCursor, from, to); locations.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); speciesList.setAdapter(locations); The spinner gets created just fine and is populated with 4 items but whenever I click on the spinner I see 4 items with no text and just radiobuttons. If I select any of them I am getting the correct selected item value but there is just no data displayed.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >