Skip to content

Instantly share code, notes, and snippets.

View rousso's full-sized avatar

Yannis Rousochatzakis rousso

View GitHub Profile
@rousso
rousso / Resources.XML
Created March 9, 2011 11:30
XML CV: Resources.XML
<?xml version="1.0" encoding="windows-1253" ?>
<resources>
<strings>
<string key="CV">
<translation language="Greek">Βιογραφικό Σημείωμα</translation>
<translation language="English">Curriculum Vitae</translation>
</string>
</strings>
</resources>
@rousso
rousso / My Resume.XSL
Created March 9, 2011 12:46
XML CV: My Resume.XSL
<?xml version="1.0" encoding="windows-1253" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="greek" indent="yes"/>
<xsl:key name="lookup-string" match="string"use="@key"/>
<xsl:variable name="string-resources" select="document('http://rousso.gr/CV/resources.xml')//resources/strings"/>
<xsl:template name="root" match="/">
<xsl:param name="target" select="'freelancer'"/>
<xsl:param name="language" select="'Greek'"/>
<div id="myResume">
</div>
@rousso
rousso / My Resume.Greek.XSL
Created March 9, 2011 12:55
XML CV: My Resume.Greek.XSL
<?xml version="1.0" encoding="windows-1253" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="greek" indent="yes"/>
<xsl:variable name="language" select="'Greek'"/>
<xsl:include href="http://rousso.gr/CV/My Resume.xsl"/>
<xsl:template match="/">
<xsl:call-template name="root">
<xsl:with-param name="language" select="$language"/>
</xsl:call-template>
</xsl:template>
@rousso
rousso / gist:862165
Last active September 25, 2015 04:18
This gist is part of the code used in this article: http://rousso.blogspot.com/2008/03/xml-cv.html XML CV: How to include it in a Word Document
{ INCLUDETEXT http://rousso.gr/CV/My Resume.English.xml
\c XML
\t "http://rousso.gr/CV/My Resume.Word.English.xsl" }
@rousso
rousso / gist:3932563
Created October 22, 2012 17:00
PageState: You can use PageState much like you use ViewState
SomeClass SomePoperty
{
get
{
return PageState["SOME_PROPERTY_NAME"] ??
(PageState["SOME_PROPERTY_NAME"] = default(SomeClass)) as SomeClass;
}
set
{
@rousso
rousso / Resources.XML
Created November 19, 2012 19:58
XML CV: Resources.XML
<?xml version="1.0" encoding="windows-1253" ?><resources>
<strings>
<string key="CV">
<translation language="Greek">Βιογραφικό Σημείωμα</translation>
<translation language="English">Curriculum Vitae</translation>
</string>
</strings>
</resources>
@rousso
rousso / BindsTwoWayByDefault.cs
Last active December 13, 2015 22:49
I was creating a WPF UserControl today which (among other things) was exposing a DependencyProperty for use in data binding. The problem I came across was that it didn't bind two-way by default and for a while I couldn't figure out either why nor what was the most slick way to go about it. So here is the trick in case anyone stumbles upon this p…
public const string myPropertyName = "myProperty";
public static readonly DependencyProperty myDependencyProperty =
DependencyProperty.Register(myPropertyName,
typeof(myPropertyType),
typeof(myUSerControl),
new FrameworkPropertyMetadata() { BindsTwoWayByDefault = true });
public myPropertyType myProperty
{
get { return (myPropertyType)GetValue(myDependencyProperty); }
<location path="get_aspx_ver.aspx">
<system.web>
<customErrors mode="Off" />
</system.web>
</location>
using System;
using System.Text.RegularExpressions;
namespace rousso
{
/// <summary>
/// GreekEuroVerbalizer is a class that cannot be instanciated (all its members are static).
/// It exposes the GetVerbal() static overloaded method that gets the Greek Verbal for a given decimal value.
/// </summary>
using System;
using System.Collections.Generic;
using System.Text;
namespace TestGenerics
{
class Program
{
static void Main(string[] args)
{