Thursday, February 23, 2017

多伦多更新护照

  • +1 上星期去的总领馆,有投币照相的。 
    • ○  That will be great! Thanks. I also find one close by as backup(537 Bloor St W, Toronto). 
 240 St George St, Toronto, ON M5R 2N5
所需材料 
  2、近期正面免冠、白色背景彩色半身证件照片3(请务必点击查看照片具体要求)。 
  3、护照原件及复印件(包括带照片资料页、曾办理过加注或延期页、来加签证相关页); 
  4、在加拿大的有效居留证件原件和复印件,如枫叶卡、学习许可或工作许可; 

办证时间 
  由于驻加拿大使馆及各领馆受理的护照需由制证中心统一制作,从各馆自受理申请之日开始计算,需15个工作日。


证件组语音电话: 416-964-8861;人工接听:周一至周五下午3:00-5:00(负责护照、签证、公证、认证等有关证件问题咨询和服务。因咨询来电过多,请优先发电邮或传真咨询

\










Wednesday, February 22, 2017

Pragramming ASP.NET web pages

1. Use WebMatrix3
Easy to use, can only access from localhost, not my laptop hostname, replaced by Visual Studio Code (hard to use)
2. Use Visual Studio 2010
Need install ASP.NET MVC 4 as this article (Programming ASP.NET Web Pages (Razor) Using Visual Studio) shows
https://docs.microsoft.com/en-us/aspnet/web-pages/overview/getting-started/program-asp-net-web-pages-in-visual-studio
Accessisble from the laptop hostname


ASP.NET Web Forms (.aspx pages)
The Web Forms framework targets developers who prefer declarative and control-based programming, such as Microsoft Windows Forms (WinForms) and WPF/XAML/Silverlight.
you can quickly build a web application without having expertise in HTML and JavaScript.

ASP.NET MVC
By dividing the application into the model (M), views (V), and controllers (C), ASP.NET MVC can make it easier to manage complexity in larger applications.

ASP.NET Web Pages (.cshtml and .vbhtml files)
ASP.NET Web Pages targets developers who want a simple web development story, along the lines of PHP. In the Web Pages model, you create HTML pages and then add server-based code to the page in order to dynamically control how that markup is rendered.
Like Web Forms, Web Pages is oriented toward rapid development.

the three frameworks are not entirely independent, and choosing one does not preclude also using another.
ASP.NET Core was released in 2016.
ASP.NET Core merges ASP.NET MVC, ASP.NET Web API, and ASP.NET Web Pages into one application framework.

@RenderPage("header.cshtml")
@RenderBody()
@RenderPage("footer.cshtml")
With ASP.NET, files with a name that starts with an underscore cannot be browsed from the web:
_header.cshtml, _footer.cshtml, _Layout.cshtml
With ASP.NET, the common way to hide sensitive information (database passwords, email passwords, etc.) is to keep the information in a separate file named "_AppStart"
To specify the virtual root in programming code, use the ~ operator.
The Server.MapPath method converts a virtual path (/default.cshtml) to a physical path that the server can understand
The Href method converts a path used in the code to a path that the browser can understand

Note for Microsoft SQL Server T-SQL

Book: SQL Server 2012 T-SQL Fundamentals
Each instance of SQL Server can contain multiple databases like System databases master, model, tempdb, msdb and Resource.
model: The model database is used as a template for new databases. Every new database
that you create is initially created as a copy of model
tempdb: this database is destroyed and recreated as a copy of the model database every time
you restart the instance of SQL Server.
You can define a property called collation at the database level that will determine language
support, case sensitivity, and sort order for character data in that database.
In terms of security, to be able to connect to a SQL Server instance, the database administrator
(DBA) must create a logon for you. The DBA needs to map your logon to a database user in each database that you are supposed to
have access to.
Although SQL Server can write to multiple data files in parallel, it can write to only one log file at a
time, in a sequential manner. Therefore, unlike with data files, having multiple log files does not result
in a performance benefit.
a database contains schemas, and schemas contain objects. You can think of a schema as a
container of objects such as tables, views, stored procedures, and others.
Microsoft recommends that when you refer to objects in your code you always use the twopart
object names.


DECLARE @empname AS NVARCHAR(31);--or DECLARE @empname AS NVARCHAR(31); SET @empname = 'Peter';
SET @empname='Peter';
select @empname as empname;



select user_name()
select @@VERSION
select * FROM sys.tables;
select * FROM sys.columns
select * FROM INFORMATION_SCHEMA.TABLES
select * FROM INFORMATION_SCHEMA.COLUMNS
select *
  from information_schema.routines
 where routine_type = 'PROCEDURE'
The sp_tables stored procedure returns a list of objects (such as tables and views) that can be queried in the current database:
EXEC sys.sp_tables;
The sp_help procedure accepts an object name as input and returns multiple result sets with
general information about the object, and also information about columns, indexes, constraints, and more:
EXEC sys.sp_help
@objname = 'Queue.WorkItemSessions';
EXEC sys.sp_columns
@table_name = N'Orders',
@table_owner = N'Sales';
EXEC sys.sp_helpconstraint
@objname = N'Sales.Orders';
SELECT TOP (5) WITH TIES orderid, orderdate, custid, empid
FROM Sales.Orders
ORDER BY orderdate DESC;

From SQL server 2012 (For Oracle 12c):
SELECT orderid, orderdate, custid, empid
FROM Sales.Orders
ORDER BY orderdate, orderid
OFFSET 50 ROWS FETCH NEXT 25 ROWS ONLY;

Tuesday, February 21, 2017

DUAL table for Oracle, DB2 and SQL server

For SQL server:
select 3*2
For DB2:
SELECT 3*2 FROM SYSIBM.SYSDUMMY1
For Oracle:
select 3*2 from dual;

Saturday, February 18, 2017

iPhone7 Slow motion

1. The test is to take a 60 seconds slow motion for the clock in the computer
From 10 seconds, it enters into slow motion. And it takes about 6 minutes to play the whole video. So when it takes the video, it uses the normal velocity like takes 24 photos every seconds, but when it's played, it only play like 4 photos ever seconds.

Thursday, February 16, 2017

Pragramming ASP.NET web pages

1. Use WebMatrix3
Easy to use, can only access from localhost, not my laptop hostname, replaced by Visual Studio Code (hard to use)
2. Use Visual Studio 2010
Need install ASP.NET MVC 4 as this article (Programming ASP.NET Web Pages (Razor) Using Visual Studio) shows
https://docs.microsoft.com/en-us/aspnet/web-pages/overview/getting-started/program-asp-net-web-pages-in-visual-studio
Accessisble from the laptop hostname

Tuesday, February 14, 2017

Telephone

-Hello, is this Mr. Smith?
-Yes, who is this?
-This is John Willson