субота, 10 квітня 2010 р.

Новые возможности C# 3.0



Вывод типа (Type Inference)
// Можно объявить переменную так:
var localVar = new MyLongFooClassWithTemplate<MyLongTypeParameter>();


Анонимные типы (Anonymous Type)
// Вот так выглядит объявление нового типа:
var anon = new { a = 3, b = 4.81, c = "string data" };


Расширяющие методы (Extension Methods)
// добавить this перед первым параметром метода
public static int ElementCount(this IEnumerable enumerable)
...
// и вызывать этот утилитный метод можно так
int count = array.ElementCount();


Лямбда-выражения (Lambda Expression
//old
var filtered = items.Filter(delegate(int i) { return i % 2 == 0; });
//new
var filtered = items.Filter(n => n % 2 == 0);


Auto Properties
public string Name { get; set; }


Ленивые вычисления (Lazy Evaluation)


Частичные методы (Partial Methods)

субота, 20 березня 2010 р.

Cистемные требования windows XP, Vista, 7

Win XP Professional:
- PC: 300 MHz; min: 233 MHz
- RAM: 128 MB; min: 64 MB
- HDD: 1.5 Gb

Win Vista:

- PC: 1 GHz; min: 800 MHz
- RAM: 1 GB; min: 512 MB
- HDD: 15 Gb
- Graphics: DirectX 9.0
- Video: 32Mb (Home Basic), 128Mb(other)

Win 7:
- PC: 1 GHz;
- RAM: 1 GB(x86); 2 GB(x64);
- HDD: 16 Gb(x86); 20 Gb(x64);
- Graphics: DirectX 9.0
- Video: 128Mb

вівторок, 16 березня 2010 р.

Закладки

Знайшов кілька закладок
http://www.searchlast.co.uk/blog/search-engine-optimisation/how-to-create-a-twitter-bookmark/

del.icio.us
<a href="http://del.icio.us/post?url=http://www.searchlast.
co.uk/blog/&title=Product+Price+Comparison+and+E-commerce
+News+Blog" >Del.icio.us</a>

Digg
<a href="http://digg.com/submit?url=http://www.searchlast.
co.uk/blog/&title=Product+Price+Comparison+and+E-commerce
+News+Blog" >Digg.com</a>

Reddit
<a href="http://reddit.com/submit?url=http://www.searchlast.
co.uk/blog/&title=Product+Price+Comparison+and+E-commerce+
News+Blog" >Reddit.com</a>

Facebook
<a href="http://www.facebook.com/sharer.php?u=http://www.
searchlast.co.uk/blog/">Facebook.com</a>

StumbleUpon
<a href="http://www.stumbleupon.com/submit?url=http://www.
searchlast.co.uk/blog/&title=Product+Price+Comparison+and
+E-commerce+News+Blog" >StumbleUpon.com</a>

Twitter
<a href="http://www.twitter.com/home?status=Currently+reading
+http://www.searchlast.co.uk/blog/" >Twitter.com</a>

Мій твіттер

Тепер і я в твіттері)))

http://twitter.com/khmurach

субота, 20 лютого 2010 р.

JavaScript: replace XML special characters


XmlHelper = {};

XmlHelper.getExp = function(str)
{
return new RegExp(str, 'g');
}

XmlHelper.encodeInvalidChars = function(str) {
return str
.replace(this.getExp('&'),'&amp;')
.replace(this.getExp('<'),'&lt;')
.replace(this.getExp('>'),'&gt;')
.replace(this.getExp('\''),'&apos;')
.replace(this.getExp('"'),'&quot;')
}
XmlHelper.decodeInvalidChars = function(str) {
return str
.replace(this.getExp('&amp;'),'&')
.replace(this.getExp('&lt;'),'<')
.replace(this.getExp('&gt;'),'>')
.replace(this.getExp('&apos;'),'\'')
.replace(this.getExp('&quot;'),'"')
}

четвер, 18 лютого 2010 р.

C#: replace XML special characters

System.Security.SecurityElement.Escape(string str);


  1. & - &amp;

  2. < - &lt;

  3. > - &gt;

  4. " - &quot;

  5. ' - &apos;