__初窺Shader: 從內建Normal Shader Family認識Unity Shader__
本投影片初步介紹Unity 3D的內建Shader: Normal Shader Family,這一家族的渲染需要使用基礎貼圖、法向量貼圖、反光貼圖、視差貼圖。
Glimpse of Shader in Unity 3D, starting from built-in shaders: Normal Shader Family by using the basic maps of diffuse map, normal map, specular map, and height map.
__初窺Shader: 從內建Normal Shader Family認識Unity Shader__
本投影片初步介紹Unity 3D的內建Shader: Normal Shader Family,這一家族的渲染需要使用基礎貼圖、法向量貼圖、反光貼圖、視差貼圖。
Glimpse of Shader in Unity 3D, starting from built-in shaders: Normal Shader Family by using the basic maps of diffuse map, normal map, specular map, and height map.
Overview of UDP protocol.
UDP (User Datagram Protocol) is a simple extension of the Internet Protocol services. It basically provides simple packet transport service without any quality of service functions.
Unlike TCP, UDP is connection-less and packet-based. Application PDUs (application packets) sent over a UDP socket are delivered to the receiving host application as is without fragmentation.
UDP is mostly used by applications with simple request-response communication patterns like DNS, DHCP, RADIUS, RIP or RPC.
Since UDP does provide any error recovery such as retransmission of lost packets, the application protocols have to take care of these situations.
Overview of UDP protocol.
UDP (User Datagram Protocol) is a simple extension of the Internet Protocol services. It basically provides simple packet transport service without any quality of service functions.
Unlike TCP, UDP is connection-less and packet-based. Application PDUs (application packets) sent over a UDP socket are delivered to the receiving host application as is without fragmentation.
UDP is mostly used by applications with simple request-response communication patterns like DNS, DHCP, RADIUS, RIP or RPC.
Since UDP does provide any error recovery such as retransmission of lost packets, the application protocols have to take care of these situations.
Vlog02 [eng sub]什麼是controller和如何在asp.net核心中創建controller?-what is controller ...SernHao TV
您好,我是SernHao Tv 的Sern Hao, 今天我想要跟您分享的是"關於ASP.Net Core 里的 Controller"。
Hi, I'm Sern Hao from SernHao Tv, the topic I want to share with you is "About Controller in ASP.Net Core".
在這裡,我將深入淺出的為您解說幾個關於ASP.Net Core 裡的 Controller 的幾個要點:
1)什麼是Controller?
- 是在MVC裡的一個互動的Class。
- 在MVC裡,View是用來顯示資訊。 Model是用來鏈接資料庫。而Controller則是負責在View與Model之間接收和傳遞數據。
- 連接Model (或數據)和View。
2) Controller的基本用法。 (demo)
- Controller 處理 Http-Post (route data) and Http-Get (query-string)
- 接收從View得到的用戶輸入的資料,然後給予特定的反應。
- 執行business rule和functions。
3) 如何在ASP.Net Core裡創建 Controller。 (demo)
- 在影片裡,我會講解有關Controller如何被創建,以及一些主要的用途。
- 同時也會帶過Controller在ASP.net Core 裡的生命週期。
- 默認模板: "{controller=Home}/{action=Index}/{id?}") 【“/[Controller]/[ActionName]/[Parameters]”】
- 在 Solution Explorer里, 在“Controllers”的文件夹点击右键 , “Add” , “New Item...“ , 选择”MVC Controller Class“
- “Index”是在“Controller”上默認調用的方法,
附加的:
1) ASP.Net Core 是個.Net Framework,它使用.Net Framework 4.6. .Net Core 也可以算是C# 和MVC 1- 6 系列的一個很大的進步。而這裡的ASP.Net Core 會使用的開發工具是visual studio 2015。
2)在Visual Studio 2015中,您可以在更改程序並保存代碼後通過刷新瀏覽器以達到重新運行應用程序,而不用進行debugging(Ctrl + F5)。
希望我的解说能帮到您。
----------------------------------------------------------------------------
如果您喜欢我的影片,或是我的影片对您有所帮助,
请帮忙点击”喜欢“或“分享”给需要的人哦~
-------------------------------------------------------------------------------------------
如果您对影片有什么建议,或是想看到什么科技与程序编写的教学,
请”留言”给我哦~
-------------------------------------------------------------------------------------------
如果您还想接受到更多关于科技与程序编写的教学,
也请帮忙”订阅“我哦~
----------------------------------------------------------------------------
Hi, how are you? I'm Sern Hao from SernHao Tv, the topic I want to share with you is "About Controller in ASP.Net Core".
Here, I will explain in simple terms for you to explain a few on the ASP.Net Core about Controller in a few key points:
1) What is the Controller?
- is an interactive Class in the MVC.
- In MVC, View is used to display information. Model is used to link the database. The Controller is responsible for receiving and transferring data between View a
JavaScript is a client-side script language, but we can use it on server side programming now. However, it is still difficult to write server-side application for front-end developer.
Here we try to find a solution to write server-side script that developer only need to understand and have client-side experience.
9. 建立必要類別
建立2個class 作為伺服器主體 Application 和 與客戶端連結的Peer
這裡我使用ExerciseApplication 和 ExercisePeer
首先建立ExerciseApplication
要using以下命名空間
using ExitGames.Logging;
using ExitGames.Logging.Log4Net;
using log4net.Config;
using Photon.SocketServer;
using System.IO;
10. ExerciseApplication
把類別設成public 並繼承
public class ExerciseApplication : ApplicationBase
實作抽象類別(可以用VS的自動完成)
會有3個方法
CreatePeer:新Client建立連線的時候會被呼叫 用來創建Peer
Setup:伺服器程式啟動的時候會執行的部分
TearDown:伺服器程式關閉的時候會執行的部分
接下來換ExercisePeer
11. ExercisePeer
使用命名空間:
using System;
using Photon.SocketServer;
using PhotonHostRuntimeInterfaces;
方法:
public ExercisePeer(InitRequest initRequest) : base(initRequest) { } Constructor
protected override void OnDisconnect(DisconnectReason reasonCode, string reasonDetail) Client斷線的時候要做的事
{
throw new NotImplementedException();
}
protected override void OnOperationRequest(OperationRequest operationRequest, SendParameters sendParameters) Client發Operation過來的時候要做的事
{
throw new NotImplementedException();
}