The task. We have 3 separated text files, for example, web server logs. For more comfortable analyze we want to join them into one file. Below my simple solution for this task in C#.
The main steps of script are: (more...)
The task. We have 3 separated text files, for example, web server logs. For more comfortable analyze we want to join them into one file. Below my simple solution for this task in C#.
The main steps of script are: (more...)
Most of all I use PowerShell for administration of SharePoint portal. But also I use it when I need to make some actions with SharePoint lists – get items, update items, remove items (link how to remove items) or to make report based on lists on SharePoint. (more...)
Source: A date in string format, for example, "2015-04-21".
The task: To find a date minus 1 day from the source.
Solution:
(more...)
It’s a little example, or may be template, of correct code for work with MSSQL server using OleDbConnection. There are two parts you should remember about - connection string and OleDB commands. The most difficult part of this is the connection string. It took me a lot of my time until I studied how to write this string easily. (more...)
Create empty file and call it "test.udl". In Windows it be with the icon like in Figure 1. UDL means "Universal data link" and open this file. This post is for registered users only. (more...)
We have array of int and want to write it to a variable or to show on display. It's not so easy to do in one string as you can think at first. Below I wrote one of ways to do it. (more...)
Regular expressions is one of the best ways to work with text. One popular task for Regexp is to get a part of word or expression.Let’s try to get first part from word "Heli-copter", the part that before character "-". (more...)
Tables with at least 20 rows are more readable when its rows look like stripes – even row in one color, odd one in another. Before jQuery we used to add class to each row of table, we made "<tr class="even"> …</tr>" and "<tr class="odd"> …</tr>". Now it’s much easier to do using jQuery. (more...)
Using "System.Text.RegularExpressions" in C# you have a lot of abilities to work with text. One of practice of using System.Text.RegularExpressions is working with IP addresses. (more...)
There’re no associative arrays (hash) in common sense. There are Dictionaries for this. It’s a very good tool if you want to use link "key-value". Using Dictionaries, keys and values can be different types. (more...)