2014年4月24日 星期四

以 regular expression 驗證 Email 格式

筆記用...

檢查字串
/^.+@.+\..+$/

C#
public bool CheckEmailFormat(string email)
{
    //c#裡要把前後的斜線拿掉
    string emailFormat = @"^.+@.+\..+$";
    System.Text.Reqex reg = new System.Text.Regex(emailFormat);
    return reg.IsMatch(email);
}

Javascript
function IsEmail(value) {
    var objRegExp = /^.+@.+\..+$/;

    if (!objRegExp.test(value))
        return false;
    return true;
}

2014年3月17日 星期一

Supercell-ヒーロー


2014年3月12日 星期三

Supercell-君の知らない物語


每回聽這首歌就會想到戰場原的告白,然後眼睛就流汗了啊!!

2014年3月6日 星期四

使用ODP.NET連線出現 "Connection must be open for this operation" 錯誤

但其實不是connection沒開的問題,ODP.NET根本在整人...

2014年2月28日 星期五

Epic Split

一切都起源於這個Volvo廣告


接著宇宙最強的男人在聖誕節前後發表了這個惡搞版

基於是宇宙最強的男人,我想這還是可能的

最新消息,尚克勞德范達美不甘示弱

宇宙最強的男人會怎麼回應呢?讓我們看下去...

Let It Go - Demi Lovato


"Let It Go"
Let it go, let it go
Can't hold it back anymore
Let it go, let it go
Turn my back and slam the door

The snow glows white on the mountain tonight,
Not a footprint to be seen.
A kingdom of isolation and it looks like I'm the queen.
The wind is howling like this swirling storm inside.
Couldn't keep it in, Heaven knows I tried.

Don't let them in, don't let them see,
Be the good girl you always had to be.
Conceal, don't feel, don't let them know.
Well, now they know.

Let it go, let it go
Can't hold it back anymore
Let it go, let it go
Turn my back and slam the door
And here I stand and here I'll stay
Let it go, let it go
The cold never bothered me anyway

It's funny how some distance makes everything seem small
And the fears that once controlled me can't get to me at all.
Up here in the cold thin air I finally can breathe.
I know I left a life behind but I'm too relieved to grieve.

Let it go, let it go
Can't hold it back anymore
Let it go, let it go
Turn my back and slam the door
And here I stand, and here I'll stay
Let it go, let it go
The cold never bothered me anyway

Standing frozen
In the life I've chosen.
You won't find me.
The past is all behind me
Buried in the snow.

Let it go, let it go
Can't hold it back anymore
Let it go, let it go
Turn my back and slam the door
And here I stand, and here I'll stay
Let it go, let it go
The cold never bothered me anyway, yeah, whoa
(Na na, na na, na na na na) [4x]
Let it go yeah
Na, na.
Here I stand.
Let it go, let it go, oh
Let it go.

Let It Go - Idina Menzel



Let It Go


The snow glows white on the mountain tonight
Not a footprint to be seen
A kingdom of isolation,
And it looks like I’m the Queen.

The wind is howling like this swirling storm inside
Couldn’t keep it in, heaven knows I tried

Don’t let them in, don’t let them see
Be the good girl you always have to be
Conceal, don’t feel, don’t let them know
Well, now they know

Let it go, let it go
Can’t hold it back anymore
Let it go, let it go
Turn away and slam the door

I don’t care
What they’re going to say
Let the storm rage on,
The cold never bothered me anyway

It’s funny how some distance
Makes everything seem small
And the fears that once controlled me
Can’t get to me at all

It’s time to see what I can do
To test the limits and break through
No right, no wrong, no rules for me
I’m free

Let it go, let it go
I am one with the wind and sky
Let it go, let it go
You’ll never see me cry

Here I stand
And here I'll stay
Let the storm rage on

My power flurries through the air into the ground
My soul is spiraling in frozen fractals all around
And one thought crystallizes like an icy blast
I’m never going back,
The past is in the past

Let it go, let it go
And I'll rise like the break of dawn
Let it go, let it go
That perfect girl is gone

Here I stand
In the light of day
Let the storm rage on,
The cold never bothered me anyway

這是內建中文翻譯版本