2017-10-29

Unity 2017.2 switch C# version


File -> Build Settings

Player Settings



From Inspector -> Other Settings -> Configuration -> Scripting Runtime Version



2017-06-20

Import downloaded aircrafts and relations

IMPORT


Downloaded aircrafts modules put into

//x-plane 11/Aircraft

You can create a custom folder for them for you to recognize (ex : MyAircrafts)


CHANGE PLANE NAME


If you want to change the plane name, open the .acf file with text-editor inside your aircraft folder

Search for P acf/_name to rename it, the text after P acf/_name is the plane name

ex: P acf/_name Boeing 737-800



LOST ICON


When you enter x-plane 11, you might not see the new-imported plane icon

New Flight -> select the plane -> Start Flight



After load into the game,

Menu ->Flight -> Flight Configuration


Click "Customize" of the lost-icon plane, then click "Generate Icons"


Wait for few seconds, the icon comes out



2017-04-12

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Reason 1 : Not install Office 2010

Solution  : Download and install Microsoft Access Database Engine 2010 Redistributable
https://www.microsoft.com/en-us/download/details.aspx?id=13255

Reason 2 : Your application was compile as AnyCPU, Your Windows is x64, Your Office 2010 is x86

Solution : Download and install Microsoft Access Database Engine 2010 Redistributable x64 version

HOWEVER, when you install x64 version, Windows might popup error message says you can't install x64 version unless uninstall x86 version

In this case, go to command mode to execute installation with parameter

C:/AccessDatabaseEngine_X64.exe /passive

So that both x64 and x86 installed on the same PC

2017-04-06

To transform a classical library project to a WPF library project

To transform a classical library project to a WPF library project (in order to add UserControls, Windows, ResourcesDictionaries, etc.) you can add the following XML in the .csproj file in the first PropertyGroup Node :

<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Full example :

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
    <PropertyGroup>
      <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
      <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
      <ProjectGuid>{50E8AAEA-5CED-46BE-AC9A-B7EEF9F5D4C9}</ProjectGuid>
      <OutputType>Library</OutputType>
      <AppDesignerFolder>Properties</AppDesignerFolder>
      <RootNamespace>WpfApplication2</RootNamespace>
      <AssemblyName>WpfApplication2</AssemblyName>
      <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
      <FileAlignment>512</FileAlignment>
      <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
      <WarningLevel>4</WarningLevel>
      <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
      <TargetFrameworkProfile />
    </PropertyGroup>
    <!-- ... -->  

2017-02-20

MS SQL 2012 Mirror Notes


Environment

Server A : Windows 2008 R2 Standard, SQL 2012 Enterprice, IP : nnn.nnn.nnn.nnn
Server B : Windows 2008 R2 Standard, SQL 2012 Enterprice, IP : xxx.xxx.xxx.xxx

Server A & B both switched SQL instance port from default 1433 to ZZZZ


Prepare

Server A & B both create one same window Account/Password 

SQL Server Configuration Manager
Server A & B both start SQL Server and SQL Server Agent with above account

SQL Server Management Studio
Sercurity -> Logins, Make sure above account with Server Roles "public" & "sysadmin"

Firewall
Make sure the mirror port has passed (default is 5022)



Start

Backup the database from Server A, SSMS : Tasks->Back Up






Copy the backup file to Server B

Restore the database in Server B

Select the backup file

Make sure Recovery state is "RESTORE WITH NORECOVERY"

Restore DONE
P.S Also backup & restore transaction logs if necessary

Back to Server A, SSMS : Tasks ->Mirror

Click "Confirure Security"

Configure Database Mirroring Security Wizard

I don't use Witness Server, so I select "No" here

Enter Listener port(default is 5022, I use 5023 in the demo) and Endpoint name

Click "Connect" to connect to MSSQL instance of Server B, note that due to I use another port for SQL instance(default is 1433), so you can see additional port number here

Leave them empty

Complete the wizard



















Setup succeed

















After closing the wizard, this message popup, I click "Do Not Start Mirroring" here, because there are still something need to finish
















If click "Start Mirroring" above, it's highly possibility to see this error















In my case, because I use my custom port for SQL Instance, so I will need to remove it here






































Then click "Start Mirroring", succeed










































Server B























Other Notes

Remove a mirrored database
master -> alter database [database] set partner off
Then drop

While Principal DB is down, switch Mirror to Principal database
master -> alter database [DB Name] set partner force_service_allow_data_loss

Remove a restoring database
master -> restore database [DB Name] with recovery
Then drop

Manually create endpoint
master ->
CREATE ENDPOINT [endpoint name] STATE = STARTED
AS TCP (
      LISTENER_PORT = 5022
      ,LISTENER_IP = ALL
)
FOR DATABASE_MIRRORING (
      ENCRYPTION = REQUIRED ALGORITHM AES
      , ROLE = ALL
   )

Manually set partner
master -> alter database [db name] set partner = 'TCP://xxx.xxx.xxx.xxx:5022'

Mirror GUI of SSMS actually does following setup for us
1. Create Endpoints on Server A & B
2. Set Partner of Principal DB of Server A to Server B
3. Set Partner of Mirror DB of Server B to Server A


In Database Mirroring Monitor or when we need to resume mirroring might see the situation
































































Solution :