2020年12月23日 星期三

dotnet core redirect

 1. Good

ref: https://www.dotnettricks.com/learn/mvc/return-view-vs-return-redirecttoaction-vs-return-redirect-vs-return-redirecttoroute

ASP.NET MVC - View() vs RedirectToAction() vs Redirect() Methods



The Redirect() Method

This method is used to redirect to specified URL instead of rendering HTML. In this case, the browser receives the redirect notification and make a new request for the specified URL. This also acts like Response.Redirect() in Asp.Net WebForm. In this case, you have to specify the full URL to redirect.


Moreover, Redirect also cause the browser to receive a 302 redirect within your application, but you have to construct the URLs yourself.


public ActionResult Index()

{

 return View();

}


[HttpPost]

public ActionResult Index(string Name)

{

 ViewBag.Message = "Hi, Dot Net Tricks";

 //Like Response.Redirect() in Asp.Net WebForm

 return Redirect("Home/MyIndex");

}


public ActionResult MyIndex()

{

 ViewBag.Msg = ViewBag.Message; // Assigned value : Null

 return View("MyIndex");

############################################################################

############################################################################

2. How to redirect a request in ASP.NET Core MVC


Redirect("/Author/Index");
RedirectPermanent("/Author/Index");
RedirectPermanentPreserveMethod("/Author/Index");
RedirectPreserveMethod("/Author/Index");

2020年12月1日 星期二

iptables

 http://163.20.160.24/~pc/modules/tadnews/index.php?nsn=58


https://stevenitlife.blogspot.com/2020/01/k8s-cluster.html


https://mileslin.github.io/2019/05/%E7%9E%AD%E8%A7%A3-Docker-%E7%9A%84%E9%A0%90%E8%A8%AD%E7%B6%B2%E8%B7%AF%E8%A8%AD%E7%BD%AE/


http://linux.vbird.org/linux_server/0250simple_firewall.php


https://blog.jangmt.com/2015/09/centos7-firewalld-iptables.html


https://www.itread01.com/content/1541339230.html


https://blog.gtwang.org/linux/centos-7-firewalld-command-setup-tutorial/


https://www.hwchiu.com/iptables-1.html


https://www.digitalocean.com/community/tutorials/how-to-list-and-delete-iptables-firewall-rules


2020年11月30日 星期一

cenos7 virubual box Add storage

 https://sam.liho.tw/2020/07/06/virtualbox-%E6%94%B9%E8%AE%8A-centos-7-%E7%A1%AC%E7%A2%9F%E5%A4%A7%E5%B0%8F-%E8%AE%8A%E5%A4%A7%E7%82%BA%E4%BE%8B/

2020年11月27日 星期五

mariadb command

 1. Show table schema

show create table TABLENAME;

describe TABLENAME;


2.  show db parameter

show status like '%max%';


3. show all table and databases;

show  tables;
show databases;


4. Show Indexs;

show indexes from TABLENAME;

ref 1


4.2 Index For Hash and B-Tree
https://dev.mysql.com/doc/refman/8.0/en/index-btree-hash.html
https://stackoverflow.com/questions/7306316/b-tree-vs-hash-table


4.3 Index type
https://mariadb.com/kb/en/getting-started-with-indexes/

5. Analysze sequence 

show table status where name = 'tablename';

explain select * from tablename where condition;

ref 1


6.  deadlock

https://blog.gslin.org/archives/2014/10/29/5226/mysql-innodb-%E9%81%87%E5%88%B0-deadlock-%E6%99%82%E7%9A%84%E5%88%A4%E8%AE%80/

https://t.codebug.vip/questions-776021.htm


7. maraidb foreigin key

select concat(fks.constraint_schema, '.', fks.table_name) as foreign_table, '->' as rel, concat(fks.unique_constraint_schema, '.', fks.referenced_table_name) as primary_table, fks.constraint_name, group_concat(kcu.column_name order by position_in_unique_constraint separator ', ') as fk_columns from information_schema.referential_constraints fks join information_schema.key_column_usage kcu on fks.constraint_schema = kcu.table_schema and fks.table_name = kcu.table_name and fks.constraint_name = kcu.constraint_name -- where fks.constraint_schema = 'database name' group by fks.constraint_schema, fks.table_name, fks.unique_constraint_schema, fks.referenced_table_name, fks.constraint_name order by fks.constraint_schema, fks.table_name;

https://dataedo.com/kb/query/mariadb/list-foreign-keys


8. Look the priviledge

SHOW GRANTS;

https://dba.stackexchange.com/questions/63404/how-to-grant-super-privilege-to-the-user


9. Bin Log

https://kknews.cc/zh-tw/code/8vx9vbn.html

https://www.tw511.com/18/139/4051.html

http://benjr.tw/102425


10. Foregin key problem

https://www.cnblogs.com/shishibuwan/p/10863347.html




2020年11月26日 星期四

video learning

 

[Media] 影音傳輸-基礎知識

https://pjchender.github.io/2019/06/24/media-%E5%BD%B1%E9%9F%B3%E5%82%B3%E8%BC%B8-%E5%9F%BA%E7%A4%8E%E7%9F%A5%E8%AD%98/

avinfo字段说明

https://wcs.chinanetcenter.com/document/API/Appendix/avinfo-description



2020年11月25日 星期三

FFmpeg install on centos 7 and learning

 


https://www.tecmint.com/install-ffmpeg-in-linux/



https://lnpcd.blogspot.com/2012/09/ffmpeg.html


https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats

2020年11月16日 星期一

case sensitivity in MySQL and MariaDB queries

 

#

https://mariadb.com/kb/en/insert-ignore/

#

https://mariadb.com/kb/en/supported-character-sets-and-collations/


#

https://uiop7890.pixnet.net/blog/post/22885702-%5B%E5%8E%9F%E5%89%B5%5D-utf8_unicode_ci-%E5%92%8C-utf8_bin-%E7%9A%84%E5%B7%AE%E7%95%B0

#

https://mariadb.com/kb/en/setting-character-sets-and-collations/

# office

https://mariadb.com/kb/en/setting-character-sets-and-collations/


# mb4

https://khiav223577.github.io/blog/2019/06/30/MySQL-%E7%B7%A8%E7%A2%BC%E6%8C%91%E9%81%B8%E8%88%87%E5%B7%AE%E7%95%B0%E6%AF%94%E8%BC%83/ 

#

https://exp.uniuni.space/she-ding-mariadb-bian-ma.html

#

https://federico-razzoli.com/case-sensitivity-in-mysql-and-mariadb-queries