Affichage des articles dont le libellé est vbnet. Afficher tous les articles
Affichage des articles dont le libellé est vbnet. Afficher tous les articles

mercredi 27 mai 2009

Comment trouver toutes les partitions d'un entier en n termes?

PART2K
PART2K is a DOS BASIC program to find partitions of a number n into all the integer parts that add up to that sum, with the optional constraints that all partitions have just m parts, that all parts are unique, and that all parts be <= p. It computes P(n), Q(n), P(n,m), and Q(n,m). I wrote this program to solve a problem that arises with with magic squares and other recreational math stumpers: what are all the ways in which m different numbers can add up to n, without regard to order? Partitioning is a bit like factoring in that it decomposes a number, but it uses addition rather than multiplication. This was a fun programming challenge that uses recursive functions.
Last update: 9 Jan 2000
View README.TXT
Download PART2K.ZIP (50K)

samedi 1 novembre 2008

Coloriser du code en HTML

Un outil en ligne sur http://tools.codes-sources.com/ pour coloriser son code avant de le mettre en ligne. Un exemple de ce que cela donne à partir d'un post d'Armin Zingler sur les news de Microsoft en réponse à un problème concernant la génération de nombres aléatoires.

Public Shared Function GenArrayNbres2( _
ByVal Lower As Integer, ByVal Upper As Integer, _
Optional ByVal HowMany As Integer = 1, _
Optional ByVal Unique As Boolean = True) _
As List(Of Integer)

Dim rnd As New Random
Dim Result As New List(Of Integer)

Do
Dim Value = rnd.Next(Lower, Upper)
If Not Unique OrElse Not Result.Contains(Value) Then
Result.Add(Value)
End If
Loop Until Result.Count = HowMany

Return Result

End Function

A universal comparer class (vbnet)

A universal comparer class
-->by Francesco Balena
The definitive comparer enables you to sort arrays and collections of objects of any kind.
Un autre article intéressant :
By default, the .NET Framework sorts elements in ascending order and perform a case-sensitive comparison. Learn how you can work around these limitations, both in .NET 1.1 and 2.0.

dimanche 31 août 2008

Créateur de répertoires automatique / Automatic Directories Creator


Ce logiciel permet de construire rapidement une arborescence de répertoires dont la liste est contenu dans un fichier au format txt.


This "ADC" software allows you to quickly build a directory tree whose list is contained in a file format txt.



EXEMPLE D'UTILISATION A L'ECOLE

Ce logiciel permet de construire rapidement l'arborescence des "dossiers-élèves" sur le serveur de fichiers de l'école. Vous devez au préalable récupérer les données de "base élèves" par exemple, afin de constituer les listes d'élèves par "classe". Sauvegarder ces listes au format texte : par exemple en utilisant le nom de l'enseignant comme nom de fichier. Suivez ensuite les étapes indiquées par le logiciel. Une fois le dossier-cible choisi, il suffit de répéter autant de fois l'opération qu'il y a de fichiers "classe".


This software allows you to build quickly, the folder tree pupils on the file server of the school. You must first establish lists of students per class. Save these lists in text format: for example using the name of the teacher as filename. Then follow the steps outlined by the software. Once the parent folder has been chosen, just repeat as many times the operation as there are files class.