Format:
Recent snippets matching tags of Convert
public class MatchConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo c) { if (value == null && Match == null) return Then; // convert Match to the value's type if (Match != null && value != null)
84 Views
no comments
public static class TimeZoneInfoHelper { public static TimeSpan FindUtcOffsetByTimeZone(TimeZoneInfo timeZone) { var converted = FindCurrentDateTimeByTimeZoneInfo(timeZone); return converted.HasValue ? timeZone.GetUtcOffset(converted.Value) : TimeSpan.Zero; }
83 Views
no comments
using System; using System.Windows.Controls; using System.Windows.Data; namespace ContosoSales { /// <summary> /// Step down the opacity of something based on the length of the /// text entered into the TextBox for which this watermark is used. /// </summary>
229 Views
no comments
using System; using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { //ავიღოთ რაიმე სტრინგი string s = "me miyvars samyaro imitom rom mze amodis da natels fens yovels"; //გადავიყვანოთ ბაიტების მასივში, რადგან Convert.ToBase64String ბაიტის მასივს იღებს პარამეტრად byte[] strBytes = Encoding.ASCII.GetBytes(s);//თუ გაქვთ უნიკოდური ტექსტი უნდა გამოიყენოთ შესაბამისი კლასი. მაგ Encoding.Unicode
279 Views
no comments
#!/bin/python
# -*- coding: utf-8 -*-
from xml.dom import minidom
def nhm2keymaps(layout):
layout = minidom.parse(layout)
Maps = layout.getElementsByTagName("Map")
keymaps = []
for map in Maps:
char = map.childNodes[3].firstChild.data
168 Views
no comments
public static T EnumConverter<T>(string value) { return (T)Enum.Parse(typeof(T), value); }
266 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
