background preloader

Gal

Facebook Twitter

Principes avancés de conception objet. En matière de développement logiciel, on constate aujourd'hui que la conception reste principalement une affaire de style personnel et d'expérience : Les principes de base de l'objet que sont l'encapsulation, l'héritage et le polymorphisme ne suffisent pas à guider la conception au quotidien.

Principes avancés de conception objet

Les Design Patterns définissent des référentiels de plus haut niveau, mais ils ne forment pas un tout suffisamment cohérent pour guider clairement la construction de designs complets. Il existe pourtant des principes extrêmement utiles en matière de conception. Ces principes ont été définis par des "hommes de l'art" tels que Bertrand Meyer et Robert Martin. Standard Numeric Format Strings.

A standard numeric format string can be used to define the formatting of a numeric value in one of two ways: The following sections provide detailed information about each of the standard numeric format strings.

Standard Numeric Format Strings

The "C" (or currency) format specifier converts a number to a string that represents a currency amount. The precision specifier indicates the desired number of decimal places in the result string. If the precision specifier is omitted, the default precision is defined by the NumberFormatInfo.CurrencyDecimalDigits property. If the value to be formatted has more than the specified or default number of decimal places, the fractional value is rounded in the result string. The "D" (or decimal) format specifier converts a number to a string of decimal digits (0-9), prefixed by a minus sign if the number is negative. The precision specifier indicates the minimum number of digits desired in the resulting string. The precision specifier indicates the desired number of decimal places.

Threading in C# - Part 3 - Using Threads. Threading in C# Joseph Albahari Last updated: 2011-4-27 Translations: Chinese | Czech | Persian | Russian | Japanese Download PDF Part 3: Using Threads The event-based asynchronous pattern (EAP) provides a simple means by which classes can offer multithreading capability without consumers needing to explicitly start or manage threads.

Threading in C# - Part 3 - Using Threads

A cooperative cancellation model The ability to safely update WPF or Windows Forms controls when the worker completes Forwarding of exceptions to the completion event The EAP is just a pattern, so these features must be written by the implementer. Public byte[] DownloadData (Uri address); public void DownloadDataAsync (Uri address);public void DownloadDataAsync (Uri address, object userToken);public event DownloadDataCompletedEventHandler DownloadDataCompleted; public void CancelAsync (object userState); public bool IsBusy { get; } Here’s how we can use WebClient’s EAP members to download a web page: Write LINQ queries in a fraction of the time LINQPad.

What VB Devs Should Know About C# Programming. C# Corner What VB Devs Should Know About C# Programming Chances are C# is not your first programming language.

What VB Devs Should Know About C# Programming

Here are several tips that can help you leverage C# better if you already know VB.NET. The VB and C# languages have a lot in common, and developers who specialize in one often find themselves having to write or manipulate code written in the other. Kathleen Dollard -- author of VSM's Ask Kathleen Q&A-based column -- wrote a blog entry recently that laid out many of the challenges that arise when working with both C# and VB.NET, which led to an interesting discussion between us about developers who find themselves switching between C# and VB.NET. Our discussion also covered the need for developers to get out of their comfort zones and learn something new. One of the more important points for a VB developer using C# to keep in mind is that iterator methods using yield return and yield break make it easy to create methods that generate, examine, or modify sequences.

AreaProg. Data Structures/All Chapters. This page shall be included in any copy of the Data Structures book.

Data Structures/All Chapters

Any source code included if not bearing a different statement shall be considered under the public domain. Images used have their own copyright status, specified in their respective repositories (en.wikibooks.org or at commons.wikimedia.org). Acknowledgment is given for using some contents from Wikipedia. Computers can store and process vast amounts of data. Formal data structures enable a programmer to mentally structure large amounts of data into conceptually manageable relationships.

Sometimes we use data structures to allow us to do more: for example, to accomplish fast searching or sorting of data. Because data structures are higher-level abstractions, they present to us operations on groups of data, such as adding an item to a list, or looking up the highest-priority item in a queue. Let c := sqrt(a * a + b * b) Two useful and related concepts are at play here: The Node[edit] Node<Element> Operations . .

Numbers". Utilisation des expressions régulières en .Net. Les expressions régulières (également appelées Regex ou Regexp) sont une traduction contreversée de "regular expressions" que les puristes appeleront les expressions rationnelles.

Utilisation des expressions régulières en .Net

Par la suite, nous utiliserons donc le terme "Regex" afin de rester neutre :) 1.1. Leur utilisation▲ Les Regex sont un outil (ou plutôt un système) très puissant permettant de vérifier la syntaxe d'une chaîne de caractères. Plus précisément, c'est vérifier que la chaîne de caractères à examiner respecte un motif ou une série de motifs (notre Regex) désignant la syntaxe attendue de la phrase.