- Serene (Serenity Application Template)
https://marketplace.visualstudio.com/items?itemName=VolkanCeylan.SereneSerenityApplicationTemplate - EISK
https://marketplace.visualstudio.com/items?itemName=AshrafulAlam.EmployeeInfoStarterKitEISK-MVC - Property4U - Real Estate 2.0
https://marketplace.visualstudio.com/items?itemName=mfahim.Property4U-RealEstate20 - Simplify.Web.Templates
https://marketplace.visualstudio.com/items?itemName=Alexanderius.SimplifyWebTemplates - EntityFramework Reverse POCO Generator
https://marketplace.visualstudio.com/items?itemName=SimonHughes.EntityFrameworkReversePOCOGenerator
客戶需求:
一般使用者進入 Access 2007 只顯示表單(Form),將資料表隱藏起來,並且無法直接存取資料表(Table)。避免一般使用者直接更改資料表內容。
經過 Google 查詢國內外的資料,確認只要加上以下的 code 於VBA程式碼,再重新啟動就看不到表單之外的資料。那開發人員或是管理者呢?處理方式為開啟Access檔案時,按下 Shift 鍵就會跳過以下程序。
Sub SetStartupProperties()
Const DB_Text As Long = 10
Const DB_Boolean As Long = 1
ChangeProperty "StartupForm", DB_Text, "首頁" ‘修改為啟動表單頁
ChangeProperty "StartupShowDBWindow", DB_Boolean, False
ChangeProperty "StartupShowStatusBar", DB_Boolean, False
ChangeProperty "StartupMenuBar", DB_Boolean, False
ChangeProperty "AllowShortcutMenus", DB_Boolean, False
ChangeProperty "AllowBuiltInToolbars", DB_Boolean, False
ChangeProperty "AllowFullMenus", DB_Boolean, False
ChangeProperty "AllowBreakIntoCode", DB_Boolean, False
ChangeProperty "AllowSpecialKeys", DB_Boolean, True
ChangeProperty "AllowBypassKey", DB_Boolean, True
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.ShowToolbar "Status Bar", acToolbarNo
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
End Sub
Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270
Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True
Change_Bye:
Exit Function
Change_Err:
If Err = conPropNotFoundError Then ' 找不到屬性。
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' 未知的錯誤。
ChangeProperty = False
Resume Change_Bye
End If
End Function
今天開啟一個久違的專案,無奈VS2013出現一個錯誤訊息:
vs2013 failed to register URL 0x80070020。
疑…上個月開專案不是好好的嗎?我的乖乖呢?網路上查了一些解決方式,研判是port被佔住造成無法執行VS2013內建的 IIS Express。但 VS2013的web port可不是說改就改的哦,修改方式我也幫你準備好了,請看以下步驟二。
步驟一、找出是否真的有程式佔用了port,123456是port編號。
netstat -a -n -o | find "123456"
步驟二、修改以下二個檔案內有關 port 的連結,換另一個port
- C:\Users\[user name]\Documents\IISExpress\config\applicationhost.config
- 專案.sln
取出字串中的第一數字比較容易,那字串有好多組數字,想要取回字串的最後一組字串怎麼處理呢?
請出Google大神,竟然沒有什麼參考資料,只好自己來。
以下為範例,重點在那個 REVERSE 函數哦!
DECLARE @productname varchar(100);
set @productname = 'T20-5-2.12'
select
@productname,
cast(
reverse(
case PATINDEX('%[-,a-z,A-Z,~,@,#,$,%,&,*,(,),<,>]%',STUFF(REVERSE(@productname), 1,PATINDEX('%[0-9]%', REVERSE(@productname))-1,''))
when 0 then STUFF(REVERSE(@productname), 1,PATINDEX('%[0-9]%', REVERSE(@productname))-1,'')
else SUBSTRING(STUFF(REVERSE(@productname), 1,PATINDEX('%[0-9]%', REVERSE(@productname))-1,''),1,
PATINDEX('%[-,a-z,A-Z,~,@,#,$,%,&,*,(,),<,>]%',STUFF(REVERSE(@productname), 1,PATINDEX('%[0-9]%', REVERSE(@productname))-1,''))-1)
end) as decimal(18,2))