duangsues.is_a? SaltedFish
这里是 Functional 的草稿
Functional Toolbox
开源
ViewPager Animations RippleLayout MaterializedDialog FloatingActionButton
InScript ApkBundlerScheme tChar(NativeAccess)
FullNetworking SDCard InstallShortCut ViewNetConnections
SplashActivity
1 title hcenter vcenter
2 subtitle ( k refesh rate) hcenter
3 bg
&cfg escape animation
MainActivity
mainscheme green
t s [btns] [opt]
pager
-
plugin view
t title
s subtitle k refresh rate cfg show?
btns plugin ext actionbar buttons
opt menu
pager: cfg show icon? show text?
main plugin:
ovf <- / -> Add view
[search] list view mode
[icon] text
description
faviorite mode
[pinned list]
a | b
b | c
cfg widget pinned
column
widget placement
show icon?
longclick pluginlistitem
+ add to faviorite
remove from faviorite
pin
unpin
create desktop entry
category view mode
category
list item
category 2
开源
ViewPager Animations RippleLayout MaterializedDialog FloatingActionButton
InScript ApkBundlerScheme tChar(NativeAccess)
FullNetworking SDCard InstallShortCut ViewNetConnections
SplashActivity
1 title hcenter vcenter
2 subtitle ( k refesh rate) hcenter
3 bg
&cfg escape animation
MainActivity
mainscheme green
t s [btns] [opt]
pager
-
plugin view
t title
s subtitle k refresh rate cfg show?
btns plugin ext actionbar buttons
opt menu
pager: cfg show icon? show text?
main plugin:
ovf <- / -> Add view
[search] list view mode
[icon] text
description
faviorite mode
[pinned list]
a | b
b | c
cfg widget pinned
column
widget placement
show icon?
longclick pluginlistitem
+ add to faviorite
remove from faviorite
pin
unpin
create desktop entry
category view mode
category
list item
category 2
PluginActivity
PluginInstall [view source] [download only]
fab -> accept
icon hcenter vcenter
name
version reversion
summary
author githubUser
readme
ToolShow
toolbar
view
AboutActivity
card ::=
[title] [star it]
graph bg
icon center
name ( version )
tit
card
description
authors
oss libs
engine version
changelog
faq
SettingsActivity
cate
set item [title] [value] [desc]
bool color string number
DebuggerActivity
tChar InScript ABS Catcher
TextEditActivity
code highlight saveresult complete
FileSelectActivity
colored root detail
PluginInstall [view source] [download only]
fab -> accept
icon hcenter vcenter
name
version reversion
summary
author githubUser
readme
ToolShow
toolbar
view
AboutActivity
card ::=
[title] [star it]
graph bg
icon center
name ( version )
tit
card
description
authors
oss libs
engine version
changelog
faq
SettingsActivity
cate
set item [title] [value] [desc]
bool color string number
DebuggerActivity
tChar InScript ABS Catcher
TextEditActivity
code highlight saveresult complete
FileSelectActivity
colored root detail
Forwarded from duangsuse Throws
; MoudleID = 'autumn.ll'
source_filename = "autumn.ll"
@autumn = private constant [10 x i8] c"中秋节\00", align 1
@happy = private constant [11 x i8] c"快乐!\0a\00", align 1
; Function Attrs: noinline nounwind optnone
define i32 @main(i32 %argc, i8** %argv) #0 {
%retval = alloca i32, align 4
%argc.addr = alloca i32, align 4
%argv.addr = alloca i8**, align 8
store i32 0, i32* %retval, align 4
store i32 %argc, i32* %argc.addr, align 4
store i8** %argv, i8*** %argv.addr, align 8
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @autumn, i32 0, i32 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @happy, i32 0, i32 0))
call void @exit(i32 1) #2
unreachable
%4 = load i32, i32* %retval, align 4
ret i32 %4
}
attributes #0 = { noinline nounwind optnone uwtable }
attributes #1 = { noreturn }
declare i32 @printf(i8*, ...)
; Function Attrs: noreturn
declare void @exit(i32) #1
Forwarded from dnaugsuz
你可以使用参数默认值来解决
def fibonacci(n, a = 1, b = 2):
result = a + b
if n <= 0:
return result
else:
return fibonacci(n - 1, b, a + b)
print(fibonacci(0))
print(fibonacci(1))
print(fibonacci(5))
Forwarded from dnaugsuz
万恶的 Python 3 不支持尾递归优化... 😶
我刻意使用尾递归的版本
JavaScript ES6 就不会出这种问题...
我刻意使用尾递归的版本
JavaScript ES6 就不会出这种问题...
"use strict";
function fibonacci(n, a = 1, b = 2) {
let result = a + b;
if (n <= 0) return result;
else return fibonacci(n - 1, b, a + b);
}
dnaugsuz
万恶的 Python 3 不支持尾递归优化... 😶 我刻意使用尾递归的版本 JavaScript ES6 就不会出这种问题... "use strict"; function fibonacci(n, a = 1, b = 2) { let result = a + b; if (n <= 0) return result; else return fibonacci(n - 1, b, a + b); }
JavaScript Number 数值一大就要溢出(划掉)损失精度,气死
还有我的 NodeJS v8 上居然没有 Integer 类,这是为何,而且 "use strict" 了尾递归优化也不能生效...
还有我的 NodeJS v8 上居然没有 Integer 类,这是为何,而且 "use strict" 了尾递归优化也不能生效...