2012年11月23日 星期五

Expression Encoder SDK Ex1

1. OS and Tools : Windows 8 + Expression 4 + VS2012
2. Sample code @
    C:\Program Files (x86)\Microsoft Expression\Encoder 4\SDK\Samples\Live
3. This program send a video (file) streaming into localhost:8080
4. Copy Wildlife.wmv into the same directory as live.exe
5. live Wildlie.wmv nd open the IE with url as mms://localhost:8080/

2012年10月26日 星期五

FileTracker:error FTK1011

Ref: http://www.dotblogs.com.tw/ricochen/archive/2010/06/15/15889.aspx

1. Download 3DTools souce code.
2. System: Mac Pro: VM : Windows 7 x64
    Tools: VS 2010
3. Open demo project with FileTracker error.
4. Solve problem by changing compiler from .net framework 3.0 to 4.0 as described in ref.

2012年10月23日 星期二

xbox controller test 2 (C#)

0-1 Hardware : ASUS A43S
0-2 OS: Windows 7 (x64)
0-3 Tools: VS 2010 (x86)
       - 1. XBox Controller Driver
              http://www.microsoft.com/hardware/en-us/d/xbox-360-wireless-controller-for-windows
       - 2. SlimDX x86 Runtime
              http://slimdx.org/download.php
1. using SlimDX.DLL (Downloadable)
2. Employ controls.cs from the example of the previous program.
3. using Xbox360Controller;
4. In the class of forms,

       GamepadState controls;
        Timer t1 = new Timer();
        private void Form1_Load(object sender, EventArgs e)
        {
            controls = new GamepadState(0);
            t1.Interval = 100;
            t1.Tick += new EventHandler(t1_Tick);
            t1.Start();
        }

        int i = 0;
        void t1_Tick(object sender, EventArgs e)
        {
            controls.Update();
            //this.Text = controls.LeftStick.Position.X.ToString() + ","
            //    + controls.LeftStick.Position.Y.ToString();
            //this.Text += (i++).ToString();
            if (controls.LeftStick.Position.X > 0.5) button1.Location = new Point(button1.Location.X + 10, button1.Location.Y);
            if (controls.LeftStick.Position.X < -0.5) button1.Location = new Point(button1.Location.X - 10, button1.Location.Y);
            if (controls.LeftStick.Position.Y > 0.5) button1.Location = new Point(button1.Location.X, button1.Location.Y-10);
            if (controls.LeftStick.Position.Y < -0.5) button1.Location = new Point(button1.Location.X, button1.Location.Y+10);
        }
5. All of the switches in the xbox controller can be read by a timer base event method();
6. Examples

XBOX360Controller Test

ref : http://visualcsharp.webs.com/projectdownloads.htm

1. Hardware: ASUS A43S, Microsoft wireless xbox controller
2. OS: Windows 8 (x64)
3. Tools: VS 2010(x86)

Download SlimDX (.NET4.0, x86) ** Notes x64 won't work.
http://slimdx.org/download.php


2012年9月30日 星期日

三球儀自轉公轉設定


三球儀公自轉設定(以WPF  3D Sphere 物件為例)
1.  腳本設定

<Grid.Triggers>
            <EventTrigger RoutedEvent="UserControl.Loaded" >
                <BeginStoryboard>
                    <Storyboard Name="myStoryBoard">
                        <DoubleAnimation
            Storyboard.TargetName="自轉"
            Storyboard.TargetProperty="Angle"
            From="0" To="360" Duration="0:0:1" RepeatBehavior="Forever"/>
                        <DoubleAnimation
            Storyboard.TargetName="公轉"
            Storyboard.TargetProperty="Angle"
            From="0" To="360" Duration="0:0:10" RepeatBehavior="Forever"/>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Grid.Triggers>
2.  自、公轉軸設定

<ModelVisual3D.Transform>
   <Transform3DGroup>
<!-- 先設定自轉軸  --!>
      <RotateTransform3D CenterX="0" CenterY="0" CenterZ="0">
                                    <RotateTransform3D.Rotation>
                                        <AxisAngleRotation3D  x:Name="自轉" Angle="0" Axis="0.3,1,0" />
                                    </RotateTransform3D.Rotation>
       </RotateTransform3D>
<!-- 平移公轉半徑 --!>
       <TranslateTransform3D OffsetX="3" OffsetY="0" OffsetZ="0"  />
<!-- 設定公轉軸--!>
       <RotateTransform3D>
                  <RotateTransform3D.Rotation>
                              <AxisAngleRotation3D  x:Name="公轉" Angle="0"   Axis="0,1,0" />
                   </RotateTransform3D.Rotation>
       </RotateTransform3D>
                            </Transform3DGroup>
 </ModelVisual3D.Transform>

2012年8月24日 星期五

VMM 2008 R2 PowerShell --- 1 (Domain Admin 權限)

1. 以網域管理者登入VMM主機,開啟PowerShell問題


載入延伸類型資料檔案時發生下列錯誤:
Microsoft.SystemCenter.VirtualMachineManager,C:\Program Files\Microsoft System
Center Virtual Machine Manager 2008 R2\bin\virtualmachinemanager.types.ps1xml :
檔案已因下列驗證例外狀況而被略過: C:\Program Files\Microsoft System Center Virtu
al Machine Manager 2008 R2\bin\virtualmachinemanager.types.ps1xml 檔案無法載入,
因為它的執行已遭軟體限制原則封鎖。如需詳細資訊,請連絡系統管理員。。

2. 問題
     Local administrator 登入,可以載入模組,但無法與VMM連線
     網域管理者可以連線,但無法載入模組
3. 重新建立網用使用者,加入網域管理者群組,工作正常。



2012年7月26日 星期四

Bootable USB

Ref:http://www.intowindows.com/bootable-usb/

1. Hardware: Transcend 8G USB
2. Target Windows 7 x64
3. CMD by role of administrator
4. diskpart/list disk/ Select Disk #/clean
5.create partition primary/select partition 1/active/format fs=ntfs
6. assign
7. exit
8. g: (Windows 7 @ Driver G:)
9. cd boot
10. Bootsect.exe /NT60 I:     (USB @ Driver I:)
11. cd\
12. xcopy *.* I: /s   (Change to root and copy all files into USB driver)