SDev.Pro - разработка на заказ

http://sdev.pro - это:

1) Разработка программного обеспечения

Мы используем платформы ASP.NET MVC, LAMP, Atmel, Android, iOS, DirectShow и базы данных MS SQL, Oracle, PostgreSQL, а также облака на MS Azure и Amazon AWS для реализации любых Ваших идей.

2)Внедрение программного обеспечения

Мы предлагаем настройку и доработку решений на базе систем электронного документооборота MS SharePoint Server, геоинформационных систем на GeoServer, систем отчетности на MS SQL Reporting Services, а также облачных решений на MS Office 365.

http://sdev.pro

Oct 25, 2012

Raphael: gravity model

Gravity model written on JavaScript. It uses Raphael lib.
If you have any additional ideas, you are welcome in comments.

Aug 31, 2012

WCF: How to ignore not valid certificate

WCF: How to ignore not valid certificate. Before calling webservice please add this line of code:
ServicePointManager.ServerCertificateValidationCallback +=
          ((sender, certificate, chain, sslPolicyErrors) =>true);

Dec 24, 2011

HTML5: Interference Demo

About 10 years ago I wrote this demo in Delphi using OpenGL. Using HTML5 we can generate interference scene of two coherent point sources more simpler. Please check out sources http://jsfiddle.net/JfdMn/19/.
How to use: click at the two different points of the image and enjoy the generated pictures.

Oct 21, 2011

.NET: One version file for all projects in solution

Glean a colleague the method of keeping the version info of all projects in solution:
  1. Create file VersionInfo.cs in solution root folder near .sln file.
  2. Put version info into the file:
    using System.Reflection;
    
    [assembly: AssemblyCompany("wonderu.com")]
    [assembly: AssemblyCopyright("Copyright © wonderu.com 2011")]
    [assembly: AssemblyTrademark("")]
    [assembly: AssemblyCulture("")]
    
    [assembly: AssemblyVersion("3.7.1.2")]
    [assembly: AssemblyFileVersion("3.7.1.2")]
    
  3.  Delete corresponding assembly attributes from all AssemblyInfo.cs files
  4. Link to VersionInfo.cs file in all projects: Project -> Add Existing Item... -> Add as a Link (down arrow near the "Add" button).

Oct 20, 2011

SVN: How to commit ("the true way")

Follow the simple rules then you commit to source control (SVN e.g.):
  1. Before committing the code please update ALL sources. Your code may have references to code in other folders.
  2. Build whole solution.
  3. Run unit-tests. You can use the minimal acceptance scenario for these purposes.
  4. (optional) Run check style utilities such as StyleCop or FxCop.
  5. (optional) Deploy solution locally and manually check changed cases and related functionality.
  6. Commit the code with log message:
    • Use notation:
      • "[+] something has been added (new functions, files etc.)"
      • "[*] something has been changed  (fix bugs, refactoring etc.)"
      • "[-] something has been deleted (delete files, unused classes etc.)"
    • Add Jira or other bugtracker issue number to comments. If you use integrated tools e.g. TortoiseSVN+CSharpTest.Net or Visual Studio+TFS you could select the issue number in the client tool.
    • Add an additional comments about the changes
  7. Check how your code builds on the build-server.
  8. Keep in mind that if your commit is the reason for the project to fail building or otherwise causes a severe bug, you will be taken out of wherever you are (bath, bar, bed whatever) and will be forced into your workplace to fix the problem ASAP ;)

Oct 19, 2011

Free SVN Hosting. Part 2

After 4 years of using hosted SVN I returned to http://assembla.com/ for private projects. It has free plans and very stable!

Oct 17, 2011

Jira: How to add comment from C# code

1. Add reference to web-service http://jiraserver.local/rpc/soap/jirasoapservice-v2?wsdl
2. Execute code:
using (var jira = new JiraSoapServiceService())
{
  var token = jira.login("user", "password");
  jira.addComment(token, "Project-2233", 
      new RemoteComment { body = "Comment from C# code" });
}

Oct 14, 2011

SVN: How to get SVN log with C#

using (SvnClient client = new SvnClient())
{
Collection<SvnLogEventArgs> logItems;

client.GetLog(new Uri("svn://svnserver/mainproject/trunk"), out logItems);
StringBuilder builder = new StringBuilder();
foreach (var item in logItems)
{
builder.AppendFormat("{0}\t{1}\t{2}\t{3}\n",
item.Revision, item.Time, item.Author, item.LogMessage.Replace('\r', ' ').Replace('\n', ' '));
}
File.WriteAllText("log.txt", builder.ToString(),Encoding.UTF8);
}
SharpSVN Project: http://sharpsvn.open.collab.net/

Apr 9, 2011

SharePoint: get/set lookup using JavaScript

Hi guys,
Sometimes we need to get/set values of lookup fields at the client using JavaScript. The main problem is that the SharePoint renders as "select" and as complex of "input", "img", "select" (then we have more than 20 items in lookup field). I have the reciept:


function setLookUpValue(fieldCaption, lookupId, lookupValue){
var selectField = $('select[title="'+fieldCaption+'"]');
if (selectField.length) {
selectField.val(lookupId);
}
else{
var inputField = $('input[title="'+fieldCaption+'"]');
inputField.val(lookupValue);
var hidden = inputField.attr('optHid');
if (hidden != null)
$('input[id='+ hidden +']').val(lookupId);
}
}

function getLookUpValue(fieldCaption){
var selectField = $('select[title="'+fieldCaption+'"]');
if (selectField.length) {
return {'lookupId': selectField.val(), 'lookupValue': $('select[title="'+fieldCaption+'" option:selected]').text()};
}
else{
var inputField = $('input[title="'+fieldCaption+'"]');
var hidden = inputField.attr('optHid');
var hiddenValue = null;
if (hidden != null)
hiddenValue = $('input[id='+ hidden +']').val();
return {'lookupId': hiddenValue, 'lookupValue': inputField.val()};
}
}

PS. Don't forget to reference to jQuery

Mar 29, 2011

SharePoint: Developer Dashboard

Для тех кто в танке: в SharePoint есть встроенная Developer Dashboard, которая выводит отладочную информацию об эвент ресиверах и прочем.
Выглядит так (красным обведена кнопка вызова панели):
Включается из командной строки:
stsadm.exe -o setproperty -pn developer-dashboard -pv OnDemand