What is the difference between StyleCop and FxCopy? It is described here.
StyleCop and FxCop overlap in functionality. But StyleCop analyses source code whereas FxCop analyses binaries, so StyleCop is able to pick up on source code rules whereas FxCop cannot. FxCop tends to focus more on design rules and StyleCop is focusing on coding style (casing, white space, indents, etc).
Code Analysis in Visual Studio contains FxCop plus mode (code metrics etc).
StyleCop can be manually added to the project so that it runs as part of MSBuild. However there are issues about it sharing the same custom dictionary as Code Analysis.
Monday, 12 August 2013
Removing weekends from the TFS Sprint Burndown report
This blog describes how to remove weekends from the Sprint Burndown report in TFS.
Essentially:
Open the report in SQL Server 2012 Report Builder. Save As a new report filename in order to keep the original intact!
Right click outside of the white report canvas and select Report Properties.
Select the Code tab item.
Add the following function:
Click on the chart, Select Work_Item_Count from the Values fact table and edit the Expression.
Change it to:
Now the today line is out as it is not taking into account the weekends.
Turn on the Properties Tool Window if it is not already.
Select View menu tab and tick the Properties checkbox.
Click on the date axis.
In the Properties tool window find the Striplines property.
Edit the collection and the IntervalOffset property.
Enter the following value:
Save the report back to the server.
Essentially:
Open the report in SQL Server 2012 Report Builder. Save As a new report filename in order to keep the original intact!
Right click outside of the white report canvas and select Report Properties.
Select the Code tab item.
Add the following function:
Function NumberOfDaysToAdjustForWeekends(ByVal valNow as Date, ByVal startOfSprint as Date) AS Int32 Dim valCurrent As Date = startOfSprint Dim weekendDaysPassed As Int32 = 0 Do While valCurrent < valNow valCurrent = valCurrent.AddDays(1) If (valCurrent.DayOfWeek = DayOfWeek.Saturday Or valCurrent.DayOfWeek = DayOfWeek.Sunday) Then weekendDaysPassed = weekendDaysPassed + 1 End If Loop Return weekendDaysPassed End Function
Click on the chart, Select Work_Item_Count from the Values fact table and edit the Expression.
Change it to:
=Code.Burndown ( Sum(Fields!Remaining_Work.Value), Fields!DateValue.Value.AddDays(-Code.NumberOfDaysToAdjustForWeekends(Fields!DateValue.Value, Parameters!StartDateParam.Value)), Parameters!EndDateParam.Value.AddDays(-Code.NumberOfDaysToAdjustForWeekends(Parameters!EndDateParam.Value, Parameters!StartDateParam.Value)) )
Now the today line is out as it is not taking into account the weekends.
Turn on the Properties Tool Window if it is not already.
Select View menu tab and tick the Properties checkbox.
Click on the date axis.
In the Properties tool window find the Striplines property.
Edit the collection and the IntervalOffset property.
Enter the following value:
=CountDistinct(Fields!DateValue.Value, "dsBurndown") - DateDiff("d", Today(), Max(Fields!DateValue.Value, "dsBurndown")) - Code.NumberOfDaysToAdjustForWeekends(Today(), Parameters!StartDateParam.Value)
Save the report back to the server.
Wednesday, 31 July 2013
Monday, 17 June 2013
Removing bevel on radio button in Adobe Acrobat Forms
If you convert a PDF document into an editable PDF form using Adobe Acrobat, it creates a small solid border around the radio buttons.
However sometimes you have to add your own, in by default they come with a bevelled edge.
How do you remove this? At first it looks like you can't. However you can.
Choose a border colour and a fill colour. At this point the Line Style becomes enabled and is set to "Inset". Change this to solid, and then set the border colour and fill colour back to "No colour". Bingo!
However sometimes you have to add your own, in by default they come with a bevelled edge.
How do you remove this? At first it looks like you can't. However you can.
Choose a border colour and a fill colour. At this point the Line Style becomes enabled and is set to "Inset". Change this to solid, and then set the border colour and fill colour back to "No colour". Bingo!
Tuesday, 11 June 2013
Installing the Android Emulator
- Download the Android SDK and copy it into a folder, e.g. C:\Program Files (x86)\Android SDK
- Create a folder for your SDK home, e.g. C:\Android.
- Set the system environment variable ANDROID_SDK_HOME=C:\Android
- Run "SDK Manager.exe" and download any additional targets as required.
- Create a new Android Virtual Device (AVD). It will save to C:\Android\.android\avd.
- Open a new command prompt as administrator.
- Run C:\Program Files (x86)\Android SDK\sdk\tools\emulator -avd <My AVD Name> -http-proxy <server>:<port> -dns-server <DNS Server>
- Start the device.
- Go to settings->Wireless & networks->mobile networks->Access Point Names. Press menu button. an option menu will appear.
- From the option menu select New APN.
- Click on Name. provide name to apn say My APN.
- Click on APN. Enter www.
- Click on Proxy. enter your proxy server IP. you can get it from Internet Explorer's internet options menu.
- Click on Port. enter port number in my case it was 8080. you can get it from internet explorers internet options menu.
- Click on User-name. provide user-name in format domain\user-name. generally it is your systems login.
- Click on password. provide your systems password.
- press menu button again. an option menu will appear.
- Press save this and try to open your browser.
Tuesday, 4 June 2013
"Always Running" WCF Service
A WCF service hosted in IIS is activated whenever a message is received. It processes the message, and then the service implementation is available for garbage collection. If the application pool is idle for more than the timeout period (with a default of 20 minutes), then the worker processes serving the pool are terminated.
Some services may need to perform some pre-work before they begin accepting requests (like loading in some static data). They may want to activate the application pool before any requests are made to ensure there is no delay when the first request comes in. This can be done with the AlwaysRunning settings on the application pool.
But what about hosting a Service Bus application in IIS? A Service Bus client must create a connection to the server and keep it open for the duration of the lifetime of the application. The request-based activation does not work here.
This article describes how the application pool is automatically started, how an AutoStart Provider is used to invoke startup code to create a connection to the service bus, and how the service is restarted in the event of an application pool stopping.
References
Death to Windows Services - Long Live AppFabric
Some services may need to perform some pre-work before they begin accepting requests (like loading in some static data). They may want to activate the application pool before any requests are made to ensure there is no delay when the first request comes in. This can be done with the AlwaysRunning settings on the application pool.
But what about hosting a Service Bus application in IIS? A Service Bus client must create a connection to the server and keep it open for the duration of the lifetime of the application. The request-based activation does not work here.
This article describes how the application pool is automatically started, how an AutoStart Provider is used to invoke startup code to create a connection to the service bus, and how the service is restarted in the event of an application pool stopping.
References
Death to Windows Services - Long Live AppFabric
Tuesday, 7 May 2013
Minecraft Service
Download Minecraft Server
Download the latest Minecraft Server
Run it, and check that it is the correct version.
Download CraftBukkit
Download CraftBukkit
Edit the batch file RunServerWithMods.cmd:
@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -Xmx1024M -Xms1024M -jar craftbukkit-1.5.2-R0.2-20130608.060232-13.jar -nojline
Test the server
Test the server by running RunServerWithMods.cmd. Check that the latest client will work with the new server.
Install Summary - Download yajsw and extract to any folder.
- Open task manager and find the "java" pid under processes. This is most likely your minecraft server.
- Open a command prompt and browse to the "bat" folder under yajsw. (ex. D:\yajsw-beta-10.3\bat).
- Run genConfig.bat (ex. genConfig.bat 2467).
Note that the config writes the value
wrapper.java.app.jar = craftbukkit-1.5.2-R0.2-20130608.060232-13.jar
for future updates to Minecraft you just need to change this line entry pointing to the new bukkit version.
wrapper.conf
- Browse to "conf" folder (ex. D:\yajsw-beta-10.3\conf) and open wrapper.conf in a text editor.
- Set the working directory (wrapper.working.dir) to your minecraft .jar server file. (ex. \minecraftserver\ for D:\minecraftserver\).
- Uncomment wrapper.app.password and enter your admin account password. Make sure the username on the line above is correct (mine was MinecraftService).
- Fill in service name and descriptions (wrapper.ntservice.name)
Create/Install Service
- Run installService.bat from the bat directory. (ex. D:\yajsw-beta-10.3\bat)
- Open Services Manager through administration tools.
- Right click the server, properties.
- Browse to "Log On" tab.
- Change to "This Account" and use the same account in your wrapper.conf.
Start the service.
You may want to create a new user account for the service. In this scenario, go to Computer Management > User Rights Assignment and Configure for Logon as a Service. I also made my service account a member of the administrators service.
Download the latest Minecraft Server
Run it, and check that it is the correct version.
Download CraftBukkit
Download CraftBukkit
Edit the batch file RunServerWithMods.cmd:
@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -Xmx1024M -Xms1024M -jar craftbukkit-1.5.2-R0.2-20130608.060232-13.jar -nojline
Test the server
Test the server by running RunServerWithMods.cmd. Check that the latest client will work with the new server.
Install Summary - Download yajsw and extract to any folder.
- Open task manager and find the "java" pid under processes. This is most likely your minecraft server.
- Open a command prompt and browse to the "bat" folder under yajsw. (ex. D:\yajsw-beta-10.3\bat).
- Run genConfig.bat (ex. genConfig.bat 2467).
Note that the config writes the value
wrapper.java.app.jar = craftbukkit-1.5.2-R0.2-20130608.060232-13.jar
for future updates to Minecraft you just need to change this line entry pointing to the new bukkit version.
wrapper.conf
- Browse to "conf" folder (ex. D:\yajsw-beta-10.3\conf) and open wrapper.conf in a text editor.
- Set the working directory (wrapper.working.dir) to your minecraft .jar server file. (ex. \minecraftserver\ for D:\minecraftserver\).
- Uncomment wrapper.app.password and enter your admin account password. Make sure the username on the line above is correct (mine was MinecraftService).
- Fill in service name and descriptions (wrapper.ntservice.name)
Create/Install Service
- Run installService.bat from the bat directory. (ex. D:\yajsw-beta-10.3\bat)
- Open Services Manager through administration tools.
- Right click the server, properties.
- Browse to "Log On" tab.
- Change to "This Account" and use the same account in your wrapper.conf.
Start the service.
You may want to create a new user account for the service. In this scenario, go to Computer Management > User Rights Assignment and Configure for Logon as a Service. I also made my service account a member of the administrators service.
Subscribe to:
Posts (Atom)