2014年1月1日 星期三

[Android Studio] 如何增加編輯器顯示行數和類別成員的區分

1. Open Settings Dialog in File\Settings...
2. Select IDE Settings\Editor\Appearance
3. Choose "Show line numbers" and "Show member separators"


[Android Studio] How to change the edit font in Android Studio

1. Open Settings Dialog in File\Settings...
2. Select IDE Settings\Editor\Colors & Fonts\Font
3. Press Save As...
4. Input name in popup dialog and Save
5. Remove Selected fonts and select new Available fonts
6. Press OK.


2013年7月28日 星期日

統一發票 102年05-06月中獎號碼


102年01-02月中獎號碼                                                                                  102年03-04月中獎號碼
獎別 中獎號碼
特別獎
1,000 萬元
40148354
同期統一發票收執聯8位數號碼與上列號碼相同者獎金1,000 萬元
特獎
200 萬元
64348046
同期統一發票收執聯8位數號碼與上列號碼相同者獎金200 萬元
頭獎
20 萬元
64782404、88904036、17250629
同期統一發票收執聯8位數號碼與上列號碼相同者獎金20 萬元
二獎
4 萬元
同期統一發票收執聯末7 位數號碼與頭獎中獎號碼末7 位相同者各得獎金4 萬元
三獎
1 萬元
同期統一發票收執聯末6 位數號碼與頭獎中獎號碼末6 位相同者各得獎金1 萬元
四獎
4 千元
同期統一發票收執聯末5 位數號碼與頭獎中獎號碼末5 位相同者各得獎金4 千元
五獎
1 千元
同期統一發票收執聯末4 位數號碼與頭獎中獎號碼末4 位相同者各得獎金1 千元
六獎
2 百元
同期統一發票收執聯末3 位數號碼與頭獎中獎號碼末3 位相同者各得獎金2 百元
增開六獎
2 百元
516
同期統一發票收執聯末3 位數號碼與上列號碼相同者各得獎金2 百元
領獎期間自102年08月6日起至102年11月5日止

2013年6月20日 星期四

[Windows 8] How to set TextBlock and TextBox to wrap in XAML

TextBlock and TextBox by setting TextWrapping = "Wrap" attribute to make the text exceeds the width of the control automatically wrap. The default is nowrap.
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top"/>


2013年6月18日 星期二

[Windows 8] How to check windows 8 UI modes by C#

Sample:

using Windows.UI.ViewManagement;

private void pageRoot_SizeChanged(object sender, SizeChangedEventArgs e)
{
    ApplicationViewState viewState = ApplicationView.Value;
    if (viewState == ApplicationViewState.Filled)
    {
        System.Diagnostics.Debug.WriteLine("viewState is Filled");
    }
    else if (viewState == ApplicationViewState.FullScreenLandscape)
    {
        System.Diagnostics.Debug.WriteLine("viewState is FullScreenLandscape");
    }
    else if (viewState == ApplicationViewState.Snapped)
    {
        System.Diagnostics.Debug.WriteLine("viewState is Snapped");
    }
    else if (viewState == ApplicationViewState.FullScreenPortrait)
    {
        System.Diagnostics.Debug.WriteLine("viewState is FullScreenPortrait");
    }
    else
    {
        System.Diagnostics.Debug.WriteLine("viewState is something unexpected");
    }
}

[Windows 8] How to create a circle mask image with XAML

The example creates an ImageBrush and sets the ImageSource to an image named people.png, which you must include as a resource in the app. The ImageBrush then paints the area defined by an Ellipse shape.
<Ellipse Height="200" Width="200"> 
    <Ellipse.Fill> 
        <ImageBrush ImageSource="people.png" /> 
    </Ellipse.Fill> 
</Ellipse>

Result:

Reference:
Quickstart: Using brushes (Windows Store apps using C#/VB/C++ and XAML)

2013年6月4日 星期二

[DirectX] Solution: Error code S1023 installing DirectX SDK on Windows 7

The solution:
1. Remove the Visual C++ 2010 Redistributable Package version 10.0.40219 (Service Pack 1) from the system (both x86 and x64 if applicable). This can be easily done via a command-line with administrator rights:
    MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
    MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}

2. Install the DirectX SDK (June 2010)

3. Reinstall the Visual C++ 2010 Redistributable Package version 10.0.40219 (Service Pack 1). On an x64 system, you should install both the x86 and x64 versions of the C++ REDIST. Be sure to install the most current version available, which at this point is the KB 2565063 with a security fix.

Reference:
Known Issue: DirectX SDK (June 2010) Setup and the S1023 error