Tuesday, 29 November 2011

Online Project Management tools.

Here is the list of online web tools that can help you to organize the project of software development:


  1. Assembla provides a free SVN or GIT storage. More than one user is available.
  2. Aceproject provides a free package of services for project management, bug tracker, etc. 5 users are available, 5 projects, 250 mg of space.
  3. Google docs provides free and almost unlimited services for online documents composing and sharing.
  4. Zoho provides some free services for project management and bug tracking (not free!). Not much is available for free. Has some nice primitive ToDo list.
  5. Applications Manager provides monitoring services for Servers - DB servers, web servers, FTP/mail/telnet/etc. services, cloud applications, etc. It's installed as a web application and free for less than 20 nodes. Can send alerts about servers down via e-mail/sms/twitter.

Friday, 25 November 2011

Programmatically configure the connection string of the Dataset.

Technologies used: Microsoft Visual Studio, c#.

The conditions are:
1) We have a MS Visual Studio project. The DataSet with tables drag'n'dropped on it. The tables were dropped from server explorer.
2) When dataset was initialized Settings.settings file was created. The DB Connection string is stored in it.
3) We need to change the value of the connection string programmatically when the application is run.
4) Main difficulty is that ConnectionString property of Settings class has no setter. Which means we can not set it - only manually from the settings designer.

The salvation solution is:
1) Create class in the Properties folder of the project. Name it for example Settings.Override.cs.
2) Class should extend Settings class. It is easy to do since Settings class is partial one. So the new class should be defined like following: partial class Settings (inside the Settings.Override.cs file)
3) Create a setter property in the new class:
        public string GgstatisticsConnectionString
        {
            set { this["ggstatisticsConnectionString"] = value; }//the name of the connection string in the Settings.
        }
4) In the beginning of the program (in some kind of initialization section) initialize the connections string:
Settings.Default.GgstatisticsConnectionString = "POLETIM-PC\POLETIMSERVER;Trusted_Connection=yes;database=statisticsdb; connection timeout=0";
5) Now the dataset will use the set connection string when it will be initialized.
??????????
6) PROFIT


Tuesday, 4 October 2011

Select all data for MAX date column just once MSSQL.

Technologies used: MS SQL Server 10.

The conditions are:
1) We have a table with 'email' text field, 'timestamp' field and many other columns.
2) There can be many equal emails and timestamps.
3) We need to query all table columns for all the (most recent) (distinct) emails. In other words for each unique email select max timestamp and all other correspondent columns.
4) Main difficulty is if we have equal emails and time stamps we will have more than 1 returned record  per email, which is wrong.

The salvation solution is:


SELECT *
FROM (SELECT *,
    RANK() OVER (PARTITION BY email ORDER BY time_stamp DESC) number
    FROM My_Table
)sorted_table WHERE number = 1


The Explanations are:
1) The subquery groups the table by email and then orders by the timestamp
2) An extra column 'number' is added to number the grouped emails, 1 is for the most recent one(MAX DATE). It is done using RANK() OVER.
3) The outer main query just selects everything with number 1 (most recent).
??????????
4) PROFIT

Thursday, 14 July 2011

Trac + SVN SetUp for Windows

Technologies used:
VisualSVN - can be downloaded for free from the official site and also руTрацкер.

Installation:

  1. Install SVN server. It is pretty simple just follow the instructions from the official web-site.
  2. Add User for the SVN in the settings of Visual SVN.
  3. Install Trac. Follow http://www.visualsvn.com/server/trac/ instructions.
  4. To bind SVN and Trac set <repository_type = svn> in trac.ini.
  5. The users that were added for Visual SVN are the users of Trac.
  6. Make the user of Trac an admin: $trac-admin /path/to/projenv permission add <svn_user_name> TRAC_ADMIN It is described here: http://trac.edgewall.org/wiki/TracPermissions
  7. There is no way for user to logout. It is a known bug of Trac.
  8. If a standard port for Trac is busy with something else  http://localhost/trac/ link may not work after all. The port (:80 it seems to me) can be busy with other web server (IIS e.g.). So I think another port can be set somewhere in the VisualSvn settings. I used :81 port, so in the end of the day the Trac link was http://localhost:81/trac in my case.
There is another link I came across, but didn't use it for the installation, it seems useful though: http://geekswithblogs.net/twickers/archive/2010/02/08/137853.aspx