background preloader

Html Agility Pack - Home

Html Agility Pack - Home

How do U get the index of the current iteration of a foreach loop NuGet Package Manager extension Sign in to write a review Sort by: One time trial use and having it installed would frequently cause visual studio 2012 to crash with random error messages recording the NuGet package manager as the cause in an App log Xml file. by JayG | February 24 2014 This product is really bad it consistently locks up Visual Studio with no way to recover. This fails with "cannot access file because it is in use by another process." When will this be fixed ? IE9 is reporting a virus on this version (2.7.41101.299) I also have NOD32 installed. Essential tool for other tools. when will command-line 2.7.1 be included since package restore is better supported in that version? we've got the same issue when updating MOQ from 4.1.1308.2321 to 4.1.1309.919, restore packages doesn't work.But it only fails on some computers, on mine it works. Overall still a superb tool of course, so i'm giving it the 5 stars it clearly deserves.

Implémentation du Pattern Singleton en C# Il y a de nombreuses façons d'implémenter le pattern singleton en C#. Je les présenterai ici dans l'ordre inverse d'élégance, en commençant avec le plus communément vu (qui n'est pas « thread-safe ») et j'exposerai ensuite des versions avec chargement différé total, thread-safe, simple et hautement performante. Toutes ces implémentations partagent quatre caractéristiques communes : un constructeur unique, qui est privé et sans paramètre. Ceci empêche d'autres classes de l'instancier (ce qui serait une violation du pattern). Notez que toutes ces implémentations utilisent aussi une propriété publique statique nommée Instance comme moyen d'accéder à l'instance. public sealed class Singleton { private static Singleton instance=null; private Singleton() { } public static Singleton Instance { get { if (instance==null) { instance = new Singleton(); } return instance; } }} Comme expliqué précédemment, l'exemple ci-dessus n'est pas thread-safe. Cette implémentation est thread-safe.

Tx (LINQ to Logs and Traces) - Home Error VFW AFORGE dll Warning Target x86 see Forum AForge.NET :: Connect C# to MySQL Introduction The purpose of this article is to show in a step by step manner how to use and connect C# with MySql using MySql Connect/NET. I will create simple examples about the DML (Insert, Update, Select, Delete) throughout the article to show how to query the database using C#, and in the end I will show you how to backup your database and save it in a .sql file from our application, and how to restore it back. Getting Started Downloading Connector/Net First make sure you have downloaded and installed the MySQL Connector/NET from the MySQL official website. Creating the Database Now let's create the database, and the table that we are going to query from our application later on. From the command line, we start by creating the database: Hide Copy Code create database ConnectCsharpToMysql; Then we select the database to use before creating the table: use ConnectCsharpToMysql; And we create the table that we will query from our application: Using the Code Then we choose MySql.Data from the list:

générateur de chaîne aléatoire c# générateur de chaîne aléatoire c# J'ai mis au point un générateur de chaîne aléatoire, mais il ne se comporte pas tout à fait que je suis l'espoir. Mon but est de pouvoir exécuter ce deux fois et générer deux quatre chaînes aléatoires de caractères distincts. Cependant, il génère simplement une chaîne aléatoire de quatre caractères deux fois. Voici le code et un exemple de sa sortie : private string RandomString(int size) { StringBuilder builder = new StringBuilder(); Random random = new Random(); char ch; for (int i = 0; i < size; i++) { ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))); builder.Append(ch); } return builder.ToString(); } // get 1st random string string Rand1 = RandomString(4); // get 2nd random string string Rand2 = RandomString(4); // creat full rand stringstring docNum = Rand1 + "-" + Rand2; .. .et la sortie ressemble à ceci : UNTE-UNTE.. .mais il doit ressembler à ce UNTE-FWNU Comment puis-je m'assurer deux chaînes aléatoires distincts ?

Create a Remote Process using WMI in C# Download source - 16.53 KB Introduction This is a simple introduction for those who are looking at WMI as an option for remotely executing the process. I believe this is in no way the first of its kind article on The Code Project and I know there may be dozens of better articles. Background This is not something I have conceptualized on my own and came up with this article here. Using the Code If you have already downloaded the sample code, you must have noticed that this is a trivial command line application. Hide Copy Code sBatFile = @"\\" + remoteMachine + " So if we create the file using this variable (while you have admin access on the server), the file will be created on the remote server's Windows directory. Next, the program receives the remote command to execute and write into this file. Here comes the interesting part. if (remoteMachine ! The interesting part is the WMI section. Points of Interest History 21st November, 2008: Initial post

Silent Installation Of Applications Using C# There will be situations where you will need to install applications silently without any human intervention. This is a pretty normal use case for System Administrators and they love to automate their tasks. In fact knowledge of this subject may be handy for any technology worker in various circumstances. In this article we will silently install FileZilla on to the computer. Before we proceed further, here are a few things to keep in mind: To install an application silently using the installer exe/package, you must use the Silent Switch for silent installation as described by the Vendor of the Software. Scenario: In my case here I have the installer exes in "ApplicationRepository" folder in C drive as shown below. We will only be installing FileZilla as of now but you can extend it for any number of applications as you wish. Also let us make sure that FileZilla is not installed by looking at installed applications in Control Panel. Deploying/ Installing Application Thank You.

Related: