10/20/2021

Entity Framework Core Notes

Revert Migration to beginning

https://newbedev.com/entity-framework-start-over-undo-rollback-all-migrations

Update-Database -Migration:0 

Remove-Migration

10/10/2021

ASP.Net Core Data Grid Reference

 

Using DataTables Grid With ASP.NET MVC

Using jQuery DataTables Grid With ASP.NET CORE MVC

https://www.jqwidgets.com/asp.net-core-mvc-tag-helpers/


Datatables

https://datatables.net/


List some free MVC Grid, but out of date

https://forums.asp.net/t/2071027.aspx?Best+and+free+grid+list+in+MVC


.NET Core Datagrid

https://www.codeproject.com/Articles/1166225/NET-Core-Datagrid


GridView from scratch

https://www.yogihosting.com/crud-operations-entity-framework/


ASP.Net Core Grid, looks like no editing feature

https://aspnet-core-grid.azurewebsites.net/

5/15/2021

Ubuntu 21.04 - Chrome Remote Desktop cannot config

Reference URL:
 
https://askubuntu.com/questions/1265668/how-can-i-turn-on-chrome-remote-desktop-in-ubuntu-20-04

Its a bug for the chrome remote desktop installer not creating its own config folder. So simply create it via mkdir ~/.config/chrome-remote-desktop, refresh your chrome, and the "turn on" section will show up.

8/29/2020

VS Code Autocomplete for Unity not working on Ubuntu 20.04

Visual Source Code 在開 Unity 專案時, 出現了類似的訊息

OmniSharp...
... Target Framework 4.7.1 not found ....

然後專案無法 Load 進來

原因是因為電腦中 Mono 的版本還不夠高, 沒支援到 .Net Framework 4.7.1

請參考這篇解決


解決步驟如下

1. 先到 https://www.mono-project.com/download/stable/ 安裝最新版的 Mono

2. 在自己的 Home 底下, 找到 .bashrc, 加入下面這列

    export FrameworkPathOverride=/lib/mono/4.5

3. Logout 再 Login


7/24/2020

PHP on Visual Studio Code

Ubuntu 20.04

Install XDebug
https://xdebug.org/docs/install

PHP Debug Adapter for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug

$ cd /etc/php/7.4/mods-available

$ gedit xdebug.ini

zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1

$ phpenmod xdebug

$ sudo service apache2 start

In Visual Studio Code, launch.json

{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000,
"runtimeExecutable": "/usr/bin/php"
}
]
}

4/10/2020

Migrate PrestaShop 1.7.x to another hosting with different domain

最近一個 Project 是用 PrestaShop + Template 做的,但是發現 PrestaShop 沒有像 Wordpress 有很多 Free 的 Addon 可以用, 也沒找到免費的 Migrate Tool, 所以就是手動搬了.

Step 如下

  1. Backup 整個 PrestaShop 的 Folder
  2. 用 phpAdmin 把整個 DB Export 出來
  3. 到新的 Hosting 上先安裝一份 PrestaShop, 確定可以 work, 然後把 Files copy 到另一個 Directory 將來可以參考
  4. 把 Backup 起來的 Files upload 並且 overwrite 整個 folder
  5. Create DB, 把資料 Import 進來
  6. 如果有必要, 修改一下 DB Connection 的部份, 在 [webroot]/app/config/parameters.php
  7. 用 phpAmdin, 找到 [pfx]_shop_url, 修改裡面相對應的資料
  8. 把 [webroot]/var/cache/prod 刪掉

9/07/2019

How to install Node.js on Ubuntu

Installing the Distro-Stable Version for Ubuntu

  • sudo apt update
  • sudo apt install nodejs
  • sudo apt install npm
  • nodejs -v


How to Install Latest Node.js and NPM on Ubuntu with PPA
  • sudo apt-get install curl
  • curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
  • sudo apt-get install nodejs
  • node -v
  • npm -v