2025年5月5日 星期一

visual studio code keymap

 [
    {
        "key": "alt+oem_2",
        "command": "editor.action.triggerSuggest",
        "when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly"
    },
    {
        "key": "ctrl+space",
        "command": "-editor.action.triggerSuggest",
        "when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly"
    },
    {
        "key": "ctrl+backspace",
        "command": "-deleteWordLeft",
        "when": "textInputFocus && !editorReadonly"
    },
    {
        "key": "ctrl+space",
        "command": "-toggleSuggestionDetails",
        "when": "suggestWidgetVisible && textInputFocus"
    }
]

2025年4月25日 星期五

目标

 1 

取得蓝图的方法

view内部简易事件的传递

keepAlive view(OnInitedSope)

waitElement

2.state

(defaultData: callback

若沒指定外部資料時,則使用)???

3.Service(data 與資料庫的溝通,可以預設)


4.template 

viewSwitch 

2025年4月19日 星期六

vue tutorial

 https://www.runoob.com/vue3/vue3-tutorial.html

 

https://www.runoob.com/vue3/vue3-tutorial.html

2025年4月15日 星期二

visual studio code 文字大小

 Custom Css and JS Loader

"file:///C:/Users/user/vsc/custom.css" 


Enable Custom Css and JS

Reload Custom Css and JS

-------------------------------------------------

/*
.monaco-workbench .part>.content {
  font-size: 16px !important;
}
*/
div.explorer-viewlet {
  font-size: 14.5px !important;
}

2025年3月30日 星期日

Disable Windows Defender

 Windows Registry Editor Version 5.00

; Disable Windows Defender registry
; Generated by RegFiles.net
; https://www.regfiles.net/registry/disable-windows-defender-registry

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender]
"DisableAntiSpyware"=dword:00000001
"DisableRealtimeMonitoring"=dword:00000001
"DisableAntiVirus"=dword:00000001
"DisableSpecialRunningModes"=dword:00000001
"DisableRoutinelyTakingAction"=dword:00000001
"ServiceKeepAlive"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection]
"DisableBehaviorMonitoring"=dword:00000001
"DisableOnAccessProtection"=dword:00000001
"DisableRealtimeMonitoring"=dword:00000001
"DisableScanOnRealtimeEnable"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Signature Updates]
"ForceUpdateFromMU"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet]
"DisableBlockAtFirstSeen"=dword:00000001

2025年3月7日 星期五

atom style

@font-size-1: 10px; // style the background color of the tree view
@font-size-2: 11.5px;

.tree-view {
  // background-color: whitesmoke;
  font-size: @font-size-2 !important;
}
// style the background and foreground colors on the atom-text-editor-element itself

atom-text-editor {
  // color: rgb(200,200,200);
  background-color: rgb(40,40,40);
  font-size: 11.6px !important;
}
// style UI elements inside atom-text-editor

atom-text-editor .cursor {
  // border-color: red;
}

.status-bar {
  font-size: 10px !important;
}

atom-panel.panel-bottom {
  font-size: @font-size-1 !important;
}

.preview-pane {
  font-size: @font-size-1 !important;
}
//-----------------------

atom-panel.modal.from-top {
  top: 10px !important;
}

.select-list ol.list-group {
  max-height: 752px !important;
}
//-----------------------

====================================

'atom-text-editor':
  "ctrl-space": "unset!"
  'alt-/': 'autocomplete-plus:activate'

'.platform-linux atom-text-editor, .platform-win32 atom-text-editor':
  'ctrl-i': 'regex-railroad-diagram:show' 

====================================


@font-size-1: 10px; // style the background color of the tree view
@font-size-2: 11.5px;

.tree-view {
  // background-color: whitesmoke;
  font-size: @font-size-2 !important;
}
// style the background and foreground colors on the atom-text-editor-element itself

atom-text-editor {
  // color: rgb(200,200,200);
  background-color: rgb(40,40,40);
  font-size: 13.6px !important;
}
// style UI elements inside atom-text-editor

atom-text-editor .cursor {
  // border-color: red;
}

status-bar.status-bar {
  font-size: 10px !important;
}

div.status-bar-left > * {
  margin-right: 20px;
  margin-left: 20px;
}
//-----------------------

cursor.cursor-position {

}

atom-panel.panel-bottom {
  font-size: @font-size-1 !important;
}

.preview-pane {
  font-size: @font-size-1 !important;
}
//-----------------------

atom-panel.modal.from-top {
  // symbol
  top: 0 !important;
}

.select-list ol.list-group {
  // symbol
  max-height: 580px !important;
}

.select-list ol.list-group li.two-lines {
  // symbol item
  padding: 0 !important;
}
//-----------------------

2024年10月18日 星期五

python 路徑

 import os
import sys

dir = os.path.dirname(__file__)

os.path.abspath(...) 

rootPath = os.getcwd().replace('\\','/')

2024年10月12日 星期六

Javascript開新視窗Tips

 

張貼者: Caesar Chi
開發網站介面的時候,常常會遇到空間不足的問題。瀏覽器大小就這樣,要放進網頁的資訊卻那麼多,該怎麼辦呢?

如果只是單純顯示資料,用AJAX呼叫回傳,顯示在select tag或div裡面就可以了。這樣介面簡潔,操作也不複雜。可是,如果需要更多互動的話,用AJAX,開發人員辛苦之外,介面太複雜維護不易,用戶用起來也不見得舒服。

這時候,開個小視窗另外操作,必要時也可以回傳結果到母網頁,對開發人員和用戶來說,應該都可以是權宜的好辦法。

window.open很常用也很簡單,本篇分基本型、完整型、遙控型三方面介紹,接下來就直接進範例嚕:

1.基本型
window.open ('page.html');

這是給只是想丟資料出來的人用的,或是想要強制另外開視窗。不過,真是這樣的話,用Yahoo!會更好。當然有時也會,需要用程式來判斷網頁方向也說不定。簡而言之,這個是方便記憶用的。

2.完整型
window.open ('page.html', '_blank', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no');

應該大部分會用到的是這行吧!先給目標URL,其次是開啟的目標,等同a tag的target屬性。第三個參數,就是給被開啟的瀏覽器設定,設定參數在上面的範例應該都有了,如果有缺漏請跟我說喔^__^。

3.遙控型
var new_window=window.open( ... );
if( new_window.opener == null ){ new_window.opener=window; }

這裡展示的是開啟新視窗之後,還想要繼續對新開的視窗做操作時,我們就可以用一個變數接收window.open()的回傳,如此就可以追蹤新開的視窗。新視窗也可以透過window.opener,將特定的資訊回傳給母視窗。

例如:在新視窗裡用:
window.opener.document.getElementById('obj').innerHTML="XXX";
或者
window.opener.location = 'http://......';
就可以從新視窗控制母視窗的網頁,執行如訊息回傳,重導網址,或是其他功能。

但是,有些舊版的browser不會自動建立新視窗和母視窗之間的關連,也就是new_window.opener這個屬性。所以後面的這個 if 敘述,就能確保opener保持在正確的設定。新視窗和母視窗溝通時,才不會發生找不到媽媽(opener)的問題。

這個 if 很重要喔!雖然新版的瀏覽器多都有支援 opener ,但為了確保安全,還是請記得加上去。

以上,謝謝收看。

2023年12月1日 星期五

javascript, python

package的入口>>

js:

index.js

py:

__init__.py
-------------------------------------------
import 的差異>>

js:

impot {...} from '...'

import XX as XX from '...'

py:

import package as nickName

import dir.package

from package import component

-------------------------------------------

 檔案當前路徑>>

py:

os.getcwd() 

php:

$_SERVER['PHP_SELF'], __FILE__

-------------------------------------------

專案當前路徑>>

-------------------------------------------

數值類型>>

js:

typeof(...)

py:

type(...)

php:

gettype()

-------------------------------------------

undefined, null>>

js:

... == null

typeof(...) == 'undefined'

py:

... is None

php:

isset(...), empty(...), is_null(...)

-------------------------------------------