Friday, February 10, 2012

Выход в свет Entity Framework 4.3 - поддержка миграции

What Changed Between EF 4.2 and EF 4.3

The notable changes between EF 4.2 and EF 4.3 include:

New Code First Migrations Feature. This is the primary new feature in EF 4.3 and allows a database created by Code First to be incrementally changed as your Code First model evolves.

Removal of EdmMetadata table. If you allow Code First to create a database by simply running your application (i.e. without explicitly enabling Migrations) the creation will now take advantage of improvements to database schema generation we have implemented as part of Migrations.

Bug fix for GetDatabaseValues. In earlier releases this method would fail if your entity classes and context were in different namespaces. This issue is now fixed and the classes don’t need to be in the same namespace to use GetDatabaseValues.

Bug fix to support Unicode DbSet names. In earlier releases you would get an exception when running a query against a DbSet that contained some Unicode characters. This issue is now fixed.

Data Annotations on non-public properties. Code First will not include private, protected, or internal properties by default. Even if you manually included these members in your model, using the Fluent API in previous versions of Code First would ignore any Data Annotations on these members. This is now fixed and Code First will process the Data Annotations once the private, protected, or internal properties are manually included in the model.

More configuration file settings. We’ve enabled more Code First related settings to be specified in the App/Web.config file. This gives you the ability to set the default connection factory and database initializers from the config file. You can also specify constructor arguments to be used when constructing these objects. More details are available in the EF 4.3 Configuration File Settings blog post.

читать оригинал

Tuesday, February 7, 2012

SVN pre-commit hook

Как установить SVN pre-commit hook.

Хочется использовать интеграцию с StyleCop для автоматической проверки кода на соответствие Coding Guidelines.

http://wordaligned.org/articles/a-subversion-pre-commit-hook

http://svnbook.red-bean.com/en/1.2/svn.reposadmin.create.html#svn.reposadmin.create.hooks

http://www.petefreitag.com/item/244.cfm

Для Windows есть:
http://svnstylecop.codeplex.com/

Для Linux:
https://github.com/inorton/StyleCopCmd

Go Mobile!

Millions more people are using mobile devices to get online every day. Does your business have a mobile-friendly site? If not—or if you're not sure—you've come to the right place to get started.

Ready to go MO?

Project Management

Клуб Успешных Менеджеров Программистов

Чего хотят директора от менеджеров?

Алистэр Коуберн
Люди как нелинейные и наиболее важные компоненты в создании программного обеспечения

Качество кода

Как не дать программисту написать плохой код

Многовариантное тестирование и A/B testing

Многовариантное тестирование 101: научные методы оптимального дизайна


Widemile and Microsoft Multivariate Testing Case Study

Monday, February 6, 2012

Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms

Как использовать Dinamic Data с Business Logic Layer
http://channel9.msdn.com/Events/MIX/MIX09/T47F

В этой презентации длительностью 60 мин David Ebbo показывает как можно использовать возможности DomainDataSource для создания Domain service layer.

Интеграция с Entity Framework.

Показаны возможности по кастомизации темлейтов.

Для примера понадобится установить WCF RIA Services.

К сожалению не удалось найти DomainModelProvider.

Thursday, February 2, 2012

Mp3split - как разбить mp3 файл на равные интервалы

Слушая запись вебинара столкнулся с тем что мой автомобильный плейер не запоминает позиции в треке, а только номер трека. Возможности перемотки не позволяют быстро вернуться к нужному участку. Поэтому я задался поиском утилиты для разделения одного длинного mp3 на несколько мелких.

Погуглив немного нашел Mp3splt Project.

Перечислю несколько основных возможностей:


-t TIME
Time mode. This option will create an indefinite number of smaller files with a fixed time length specified by TIME (which has the same format described above). It is useful to split long files into smaller (for example with the time length of a CD). Adjust option (-a) can be used to adjust splitpoints with silence detection.

-S SPLIT_NUMBER
Equal time tracks mode. Split in SPLIT_NUMBER files.

-r
Trim using silence detection, to trim using silence detection. To trim using silence detection we need to decode files, so this option can be really slow if used with big files. It accepts some parameters with -p option (see below for a detailed description): threshold level (th) which is the sound level to be considered silence. This feature is new and probably still needs tweaking; please report any bugs, suggestions, ...

-s
Silence mode, to split with silence detection

-a
Auto-Adjust splitpoints with silence detection.

Я разбил на 10 минутные интервалы
mp3splt.exe -t 10.00 source.mp3.


Для того чтобы разбить все файлы в папке на равные интервалы времени можно воспользоваться bat файлом.

@echo off

set mp3split="D:\work\programs\mp3splt_2.4.1_i386\mp3splt.exe"
set outfolder="split10"
set timesplit=10.00

for %%X in (*.mp3) do (%mp3split% -t %timesplit% -d %outfolder% -a "%%X")


  1. Создайте текстовый файл split.bat в папке с mp3 файлами и скопируйте в него приведенный выше текст. 
  2. Измените путь к mp3splt.exe. 
  3. Установите папку в которую хотите сохранить результаты (в скрипте это папка split10, которая будет создана в текущей папке скрипта)
  4. Измените интервал времени (переменная timesplit)
  5. Сохраните и запустите созданный файл.
 Обратите внимание что при разбиении указыватся ключ -a чтобы разрезать по участкам тишины.