Search Results

Search found 10991 results on 440 pages for 'stable sort'.

Page 9/440 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to sort a ListView control by a column in Visual C#

    - by bconlon
    Microsoft provide an article of the same name (previously published as Q319401) and it shows a nice class 'ListViewColumnSorter ' for sorting a standard ListView when the user clicks the column header. This is very useful for String values, however for Numeric or DateTime data it gives odd results. E.g. 100 would come before 99 in an ascending sort as the string compare sees 1 < 9. So my challenge was to allow other types to be sorted. This turned out to be fairly simple as I just needed to create an inner class in ListViewColumnSorter which extends the .Net CaseInsensitiveComparer class, and then use this as the ObjectCompare member's type. Note: Ideally we would be able to use IComparer as the member's type, but the Compare method is not virtual in CaseInsensitiveComparer , so we have to create an exact type: public class ListViewColumnSorter : IComparer {     private CaseInsensitiveComparer ObjectCompare;     private MyComparer ObjectCompare;     ... rest of Microsofts class implementation... } Here is my private inner comparer class, note the 'new int Compare' as Compare is not virtual, and also note we pass the values to the base compare as the correct type (e.g. Decimal, DateTime) so they compare correctly: private class MyComparer : CaseInsensitiveComparer {     public new int Compare(object x, object y)     {         try         {             string s1 = x.ToString();             string s2 = y.ToString();               // check for a numeric column             decimal n1, n2 = 0;             if (Decimal.TryParse(s1, out n1) && Decimal.TryParse(s2, out n2))                 return base.Compare(n1, n2);             else             {                 // check for a date column                 DateTime d1, d2;                 if (DateTime.TryParse(s1, out d1) && DateTime.TryParse(s2, out d2))                     return base.Compare(d1, d2);             }         }         catch (ArgumentException) { }           // just use base string compare         return base.Compare(x, y);     } } You could extend this for other types, even custom classes as long as they support ICompare. Microsoft also have another article How to: Sort a GridView Column When a Header Is Clicked that shows this for WPF, which looks conceptually very similar. I need to test it out to see if it handles non-string types. #

    Read the article

  • Virtualisation : Microsoft sort la RC d'Hyper-V Server 2012 qui supporte jusqu'à 4 téraoctets de RAM

    Virtualisation : Microsoft sort la RC d'Hyper-V Server 2012 Disponible en téléchargement gratuit La conférence TechEd North-America a été cette semaine l'occasion pour Microsoft de présenter Hyper-V Server 2012 et d'annoncer la disponibilité de sa Release Candidate en téléchargement gratuit. C'était aussi l'occasion pour Jeff Woolsey, Microsoft Principal Program Manager, d'offrir plus de détails sur les nouveautés de ce moteur de virtualisation (hyperviseur), en dehors de ce que l'on savait sur son intégration avec Windows Server 2012 (ex. Windows Server 8)...

    Read the article

  • Alternatives for 'egrep -o "success|error|fail" <filename> | sort | uniq -c'

    - by Wolfy
    I sometime need to check some logs and I do this with this command: egrep -o "success|error|fail" <filename> | sort | uniq -c Sample input: test error on line 10 test connect success test insert success test started at 00:00 test delete fail Sample output: 1 error 1 fail 2 success I would like to know if someone knows a way to do this with a shorter command? Before you ask why I would like to do this with an different command... No special reason, I'm just curious :)

    Read the article

  • Oracle sort VirtualBox 3.2, des performances accrues et plus d'OS supportés pour la nouvelle version

    Mise à jour du 25/05/10 Oracle sort VirtualBox 3.2 Des performances accrues et plus d'OS supportés pour la nouvelle version de l'ex-outil de virtualisation de Sun VirtualBox 3.2.0 est la première version de l'outil de virtualisation de Sun à porter le logo d'Oracle. Le géant du logiciel en profite au passage pour rebaptiser le produit « Oracle VM VirtualBox ». [IMG]http://ftp-developpez.com/gordon-fowler/VBox%20Nouveau%20Logo.png[/IMG] Les améliorations concernent principalement les performances et les nouveaux systèmes d'exploitations pris en charge. VirtualBox 3.2.0 peut à présent...

    Read the article

  • Microsoft sort Windows Server AppFabric en RC et BizTalk en beta pour simplifier le développement d'

    Mise à jour du 25/05/10 Microsoft sort Windows Server AppFabric en RC et BizTalk en beta Pour simplifier le développement d'applications webs et composites Microsoft vient de sortir la Release Candidate de Windows Server AppFabric (le code finalisé est lui attendu pour Juin). Microsoft a également annoncé la disponibilité de la première béta de BizTalk Server 2010, la "solution serveur d'intégration d'entreprise et de connectivité" qui vise à "intégrer efficacement des systèmes hétérogènes, améliorer la connectivité de l'entreprise et échanger plus rapidement des données au travers des plateformes multiples&qu...

    Read the article

  • How to change FAT32 sort order on drive?

    - by Chad--24216
    I use a USB drive to play music in my car. Unfortunately, the car does not sort the music alphabetically and relies on how the music is sorted on the FAT32 drive. This Windows software here solves the problem. Anything comparable available for me on Ubuntu? PS: at first I thought it was a file creation date problem askubuntu question. But although I figured out the answer to that question, it didn't solve the problem like I thought it would.

    Read the article

  • Microsoft classé parmi les entreprises les plus éthiques par Ethisphere Institut, Google sort de cette liste

    Microsoft classé parmi les entreprises les plus éthiques Par Ethisphere Institut, Google sort de cette liste En collaboration avec Hinault Romaric Microsoft fait à présent partie des entreprises les plus éthiques du monde selon le classement annuel 2011 que vient de publier l'Institut Ethisphere. Pour la première fois depuis sa création, l'éditeur apparaît dans cette liste des 110 sociétés les plus vertueuses de la planète. Ethisphere s'appuie sur une analyse du code éthique, de l'historique des litiges, des infractions réglementaires, des investissements dans l'innovation et des méthodes de gouvernance des d'entreprises a...

    Read the article

  • Looking for an open source JavaScript table sort function with multiple column sorting and filters [closed]

    - by Wikis
    I have an HTML table that I'd like to add sorting to. I've already used sorttable but I've found that, with our current installation, the default sorting works in Firefox and Chrome but not Internet Explorer. So I'm looking for a new tool. I'm working my way through this list of 33 sorters but I'm wondering whether anyone has solved this? The requirements are: open source (free to use) can sort one or more columns (like tablesorter) can filter columns (like this from the javascript toolbox) easy to use

    Read the article

  • IBM sort Rational Engineering Lifecycle Manager et SmartCloud Continuous Delivery pour réduire la complexité des applications

    IBM sort Rational Engineering Lifecycle Manager et SmartCloud Continuous Delivery des nouveaux outils pou réduire la complexité des applications Le portefeuille d'outils de développement d'IBM vient de s'enrichir de Rational Engineering Lifecycle Manager et SmartCloud Continuous Delivery, deux nouvelles solutions pour répondre aux besoins des développeurs. Ces outils ont été conçus pour résoudre des problèmes rencontrés dans les projets d'envergure comme ceux qu'on trouve dans des systèmes pour l'industrie automobile, la robotique ou de petits changements dans le système qui peuvent avoir des effets plus importants que prévu initialement. La solution Rational Engineering L...

    Read the article

  • Sorting objects in Python

    - by Curious2learn
    I want to sort objects using by one of their attributes. As of now, I am doing it in the following way USpeople.sort(key=lambda person: person.utility[chosenCar],reverse=True) This works fine, but I have read that using operator.attrgetter() might be a faster way to achieve this sort. First, is this correct? Assuming that it is correct, how do I use operator.attrgetter() to achieve this sort? I tried, keyFunc=operator.attrgetter('utility[chosenCar]') USpeople.sort(key=keyFunc,reverse=True) However, I get an error saying that there is no attribute 'utility[chosenCar]'. The problem is that the attribute by which I want to sort is in a dictionary. For example, the utility attribute is in the following form: utility={chosenCar:25000,anotherCar:24000,yetAnotherCar:24500} I want to sort by the utility of the chosenCar using operator.attrgetter(). How could I do this? Thanks in advance.

    Read the article

  • Form to sort an index in rails

    - by shmichael
    I'm a newcomer to Rails. I want to build a simple form that determines the sort order of a list. I've implemented a form in the likes of - <%= radio_button_tag :sort, "rating" %> <%= label_tag :sort_rating, "order by rating" %> <%= radio_button_tag :sort, "name" %> <%= label_tag :sort_name, "order by name" %> And now I am unsure how to implement the sort at the controller/model level. The aspects I am puzzled about are: Where should the sort be performed How could the sort parameter be persisted How could the code be reused Right now, I can't even get the selected sort method to remain selected after a submit. I would most appreciate any guidance or reference to an example.

    Read the article

  • Stable random color algorithm

    - by Olmo
    Here we have an interesting real-world algorithm requirement involving colors. 1) Nice random colors: In ordeeing to draw a beautifull chart (i.e: pie chart) we need to pick a random set of Colors that: a) are different enought b) Play nicely Doesnt Look hard. For example u fix bright and saturation and divide hue in steps of 360/Num_sectors 2) Stable: given Pie1 with sectors with labes ('A','B','C') and Pie2 with sector with labels ('B','C','D'), will be nice if color('B',pie1)= color('B',pie2) and the same for 'C' and so on, so people don't get crazy when seeing similar updated charts, even if some sectors appear some dissapeared or the number of sectors changed. The label is the only stable thing. 3) hard-coded colors: the algorithm allows hardcoded label-color relationships as an input but stills doing a good work (1 & 2) for the rest of free labels. I think this algorithm, even if it looks quite ad-hoc, will be usefull in more then one situation. Any ideas?

    Read the article

  • Jquery toggle functions

    - by ozsenegal
    I've a code to sort table using Jquery.I use toggle function to alternate clicks,and toggle beetween 'ascend' and 'descend' sort.Once you click header's table it should sort it contents. However,there's a bug: I click once,it sorts,then when i click again,nothing happens.I need to click again (second time) to execute the second function,and sort again. Toggle should switch functions with single clicks,not double,am i right? Here is the code: firstRow.toggle(function() { $(this).find("th:first").removeClass("ascendFirst").addClass("descendFirst"); $(this).find("th:not(first)").removeClass("ascend").addClass("descend"); sorted = $.makeArray($("td:eq(0)", "tr")).sort().reverse(); sorted2 = $.makeArray($("td:eq(1)", "tr")).sort().reverse(); sorted3 = $.makeArray($("td:eq(2)", "tr")).sort().reverse(); for (var i = 0; i < sorted.length; i++) { $("td", "tr:eq(" + (i + 1) + ")").remove(); $("tr:eq(" + (i + 1) + ")").append($("<td></td>").text($(sorted[i]).text())); $("tr:eq(" + (i + 1) + ")").append($("<td></td>").text($(sorted2[i]).text())); $("tr:eq(" + (i + 1) + ")").append($("<td></td>").text($(sorted3[i]).text())); } }, function() { $(this).find("th:first").removeClass("descendFirst").addClass("ascendFirst"); $(this).find("th:not(first)").removeClass("descend").addClass("ascend"); sorted = $.makeArray($("td:eq(0)", "tr")).sort(); sorted2 = $.makeArray($("td:eq(1)", "tr")).sort(); sorted3 = $.makeArray($("td:eq(2)", "tr")).sort(); for (var i = 0; i < sorted.length; i++) { $("td", "tr:eq(" + (i + 1) + ")").remove(); $("tr:eq(" + (i + 1) + ")").append($("<td></td>").text($(sorted[i]).text())); $("tr:eq(" + (i + 1) + ")").append($("<td></td>").text($(sorted2[i]).text())); $("tr:eq(" + (i + 1) + ")").append($("<td></td>").text($(sorted3[i]).text())); } });

    Read the article

  • Stable Scala 2.8 plugin

    - by Felix
    Does anyone know if there exists a stable version of the Scala plugin for eclipse, running with Scala 2.8 (any version of scala 2.8...RC or beta or whatever). I like the fact that it compiles 10 times faster than the netbeans plugin, but it is very unstable, and auto-imports doesnt work. Also, sometimes it cant find classes when I hit "run", then I have to clean it again. This is with some random nightly build of the 2.8 eclipse scala plugin. Is there a stable version? If so, can you link me to it? Thanks in advance :)

    Read the article

  • Sorting Custom Objects with Parameter in .NET?

    - by Jeffrey Kern
    Let's say I have a custom object of Foo Is there anyway I can sort through a list of these objects, like list<of foo>.sort() and also be able to sort this list with a passable parameter. which will influence the sort? list<of foo>.sort(pValue) I'm guessing I'll need to define two separate sorts, but I am not sure.

    Read the article

  • SSRS - Sort table based on column value

    - by Ehsan
    I am trying to sort the following table: hYear hSale ------------------------------------ [year] =Count(Fields!sale.Value) The table only has one row group (year) and no column group. I'd like to: -initially sort the table based on the calculated value; is it possible? -add interactive sort to calculated column based on the value. I assume I should sort 'Detail rows', but what will be the sort expression?

    Read the article

  • Sorting Custom Objects with Parameter in VB.Net/C#

    - by Jeffrey Kern
    Let's say I have a custom object of Foo Is there anyway I can sort through a list of these objects, like list<of foo>.sort() and also be able to sort this list with a passable parameter. which will influence the sort? list<of foo>.sort(pValue) I'm guessing I'll need to define two separate sorts, but I am not sure. Thanks!

    Read the article

  • VMware sort VMware Go Pro sa solution de virtualisation Cloud pour PME, passerelle vers VMware vSphere

    VMware sort VMware Go Pro Sa solution de virtualisation Cloud pour PME, passerelle vers VMware vSphere VMware vient d'annoncer la sortie de sa solution de virtualisation Cloud pour les PME : VMware Go Pro. VMware Go Pro a pour principal objectif de faciliter les efforts de virtualisation des petites et moyennes entreprises en leur proposant un outil ergonomique, qui simplifie la gestion des systèmes d'information et qui veut améliorer la productivité. L'outil intègre une console centrale unique, pour fédérer et simplifier l'administration des infrastructures physiques et virtuelles. Une console qui permet de « libérer les équipes des tâches récurrentes afin de se consacr...

    Read the article

  • Google sort « Artic Sea », un SDK pour faire tourner du code natif dans Chrome

    Google sort « Artic Sea » Un SDK pour faire tourner du code natif dans Chrome Google voit le futur des applications en 100 % Cloud, ou presque. C'est donc tout naturellement qu'il décide de promouvoir une technologie que d'autres (Mozilla ou Opera) goutent assez peu : permettre d'exécuter du code natif (lié à une machine donnée donc), à travers le navigateur. L'intérêt pour Google est assez clair. Les applications Web ou une partie des applications) peuvent par exemple être écrites en C (mixant ainsi JavaScript et d'autres langages). En sortant son Native Client (dit « NaCl »), bapt...

    Read the article

  • Help with algorithmic complexity in custom merge sort implementation

    - by bitcycle
    I've got an implementation of the merge sort in C++ using a custom doubly linked list. I'm coming up with a big O complexity of n^2, based on the merge_sort() slice operation. But, from what I've read, this algorithm should be n*log(n), where the log has a base of two. Can someone help me determine if I'm just determining the complexity incorrectly, or if the implementation can/should be improved to achieve n*log(n) complexity? If you would like some background on my goals for this project, see my blog. I've added comments in the code outlining what I understand the complexity of each method to be. Clarification - I'm focusing on the C++ implementation with this question. I've got another implementation written in Python, but that was something that was added in addition to my original goal(s).

    Read the article

  • Symbian sort un kit d'outils pour les développeurs d'application sous Symbian^3, simple d'utilisatio

    Mise à jour du 03.05.2010 par Katleen Symbian sort un kit d'outils pour les développeurs d'application sous Symbian^3, simple d'utilisation et compatible Windows, Mac et Linux « Si vous savez créer une page web, vous êtes un développeur Symbian^3 ». Le nouveau slogan de Symbian destiné à promouvoir ses derniers outils de développement d'applications tout juste disponibles pour Windows, Mac et Linux est on ne peut plus clair. Leur maniement sera facile. L'écriture se fera en HTML, CSS et JavaScript. De plus, des API JavaScript spécifiques permettront de travailler sur des fonctions particulières telles que le répertoire, l'appareil photo, l'accéléromètre, le GPS, etc.

    Read the article

  • Data structure: sort and search effectively

    - by Jiten Shah
    I need to have a data structure with say 4 keys . I can sort on any of these keys. What data structure can I opt for? Sorting time should be very little. I thought of a tree, but it will be only help searching on one key. For other keys I'll have to remake the tree on that particular key and then find it. Is there any data structure that can take care of all 4 keys at the same time? these 4 fields are of total 12 bytes and total size for each record - 40 bytes.. have memory constraints too... operations are : insertion, deletion, sorting on different keys.

    Read the article

  • Apple sort la bêta d'iOS 6.1 pour les développeurs, ainsi que la bêta de Xcode 4.6

    Apple sort la bêta d'iOS 6.1 pour les développeurs ainsi que la bêta de Xcode 4.6 À peine avoir propulsé la mise à jour mineure iOS 6.0.1 de son système d'exploitation mobile aux consommateurs, Apple met à la disposition des développeurs la prochaine évolution de sa plateforme. Ceux-ci peuvent dès aujourd'hui télécharger la mise à jour iOS 6.1, afin de découvrir les nouveautés de l'OS et préparer leurs applications avant la sortie grand public de la mouture. iOS 6.1 beta apporte quelques améliorations, surtout à son application native de cartographie Plans, très critiquée dans la version précédente. Il faut noter qu'Apple a mis avant un bouton permettant de soumettre un problème s...

    Read the article

  • La fondation Eclipse sort Eclipse Juno 3.8 /4.2, une double version de l'EDI riche en nouveautés

    La fondation Eclipse sort Eclipse Juno 3.8 /4.2 La fondation Eclipse vient de sortir la version Juno d'Eclipse. Une nouvelle version d'Eclipse est disponible. Elle porte le nom de Juno. Cette version est en fait une double version, puisque nous avons droit à la fois à la version 3.8 ainsi qu'à la version 4.2. Il faut savoir que la version 3.8 est la dernière "version" pour Eclipse 3.XX. Des versions de maintenance sont prévue pour la 3.8, mais aucune version majeure supérieure n'est prévue dans les 3.XX. Cela tient d'une volonté de la fondation Eclipse de basculer majoritairement sur les versions 4.XX. La version 4 (précédemment baptisé e4) d'Eclipse est en développement depuis 4 ans et const...

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >