local router_ip = luci.sys.exec("uci get network.lan.ipaddr")
m=Map("haproxy",translate("HAProxy"),translate("HAProxy能够检测SS服务器的联通情况,从而实现负载均衡和高可用的功能") .. "
local state_msg = "" .. translate("Running") .. ""
m=Map("redsocks2",translate("Redsocks2 - General Settings"),
translatef("A modified version of redsocks.Beside the basic function of redsocks,it can redirect TCP connections which are blocked via proxy automatically without a blacklist.") .. "
状态 - " .. state_msg)
技巧六:在输入框的下面添加提示文字
只需要在声明空间的时候在第四个参数上使用translate就行了,如下
m=Map("redsocks2",translate("Redsocks2 - General Settings"),
translatef("A modified version of redsocks.Beside the basic function of redsocks,it can redirect TCP connections which are blocked via proxy automatically without a blacklist.") .. "
状态 - " .. state_msg)
s=m:section(TypedSection,"redsocks2_redirect",translate("Redirector Settings"))
o=s:option(Flag,"autoproxy",translate("Enable Auto Proxy"),translate("不推荐开启"))
module("luci.controller.项目名", package.seeall)
function index()
if not nixio.fs.access("/etc/config/项目名") then
return
end
entry({"admin", "services", "项目名"},alias("admin", "services", "项目名","page1"),_("项目名")).dependent = true
entry({"admin", "services", "项目名","page1"}, cbi("项目名/page1"),_("标签1标题"),10).leaf = true
entry({"admin", "services", "项目名","page2"}, cbi("项目名/page2"),_("标签2标题"),20).leaf = true
end
<%-
local sys = require "luci.sys"
local fs = require "nixio.fs"
local uci = require "luci.model.uci".cursor()
local ipkg = require "luci.model.ipkg"
local kcptun = "kcptun"
local enable_server = uci:get_first(kcptun, "general", "enable_server") == "1"
local enable_monitor = uci:get_first(kcptun, "general", "enable_monitor") == "1"
local enable_logging = uci:get_first(kcptun, "general", "enable_logging") == "1"
local client_file = (uci:get_first("kcptun", "general", "client_file") or ""):trim()
local package_info = ipkg.info("luci-app-kcptun") or ""
local client_version, server_version
if client_file ~= "" and fs.access(client_file, "rwx", "rx", "rx") then
client_version = sys.exec(client_file .. " -v | awk '{printf $3}'")
end
if not client_version or client_version == "" then
client_version = translate("Unknown")
end
if enable_server then
local server_file = (uci:get_first("kcptun", "general", "server_file") or ""):trim()
if server_file ~= "" and fs.access(server_file, "rwx", "rx", "rx") then
server_version = sys.exec(server_file .. " -v | awk '{printf $3}'")
end
if not server_version or server_version == "" then
server_version = translate("Unknown")
end
end
-%>
<% if enable_logging then -%>
local uci = require "luci.model.uci".cursor()
local sys = require "luci.sys"
local fs = require "nixio.fs"
local m, s, o
local kcptun = "kcptun"
m = SimpleForm(kcptun, "%s - %s" %{translate("Kcptun"), translate("Overview")})
m:append(Template("kcptun/overview"))
m.reset = false
m.submit = false
return m
spring
【控制反转(IOC)/依赖注入(DI)】:
由容器控制程序之间的关系,而非传统实现中,由程序代码直接操控。这也就是所谓“控制反转”的概念所在:控制权由应用代码中转到了外部容器,控制权的转移,是所谓反转。
简单的说:对象的创建又容器(比如spring容器)来执行,程序里不直接new对象。
Web
【单点登录(SSO)】:SSO的定义是在多个应用系统中,用户
Bellman-Ford算法(根据发明者 Richard Bellman 和 Lester Ford 命名)是求解单源最短路径问题的一种算法。单源点的最短路径问题是指:给定一个加权有向图G和源点s,对于图G中的任意一点v,求从s到v的最短路径。有时候这种算法也被称为 Moore-Bellman-Ford 算法,因为 Edward F. Moore zu 也为这个算法的发展做出了贡献。
与迪科
Microsoft .NET Framework 3.5 Service Pack 1(完整软件包)
http://www.microsoft.com/zh-cn/download/details.aspx?id=25150
Microsoft .NET Framework 3.5 Service Pack 1 是一个累积更新,包含很多基于 .NET Framewo
public final class ViewStub extends View
java.lang.Object
android.view.View
android.view.ViewStub
类摘要: ViewStub 是一个隐藏的,不占用内存空间的视图对象,它可以在运行时延迟加载布局资源文件。当 ViewSt