我需要在工作簿中找到第一个空行并将信息写入(row,1)和(row,2).我想我现在很困惑......
Function WriteToMaster(num, path) As Boolean
'Declare variables
Dim xlApp As Excel.Application
Dim wb As Workbook
Dim ws As Worksheet
Dim infoLoc As Integer
Set xlApp = New Excel.Application
Set wb = xlApp.Workbooks.Open("PATH OF THE DOC")
Set ws = wb.Worksheets("Sheet1")
'Loop through cells, looking for an empty one, and set that to the Num
Cells(1, 1).Select
For Each Cell In ws.UsedRange.Cells
If Cell.Value = "" Then Cell = Num
MsgBox "Checking cell " & Cell & " for value."
Next …Run Code Online (Sandbox Code Playgroud) 晚间!
我需要在Scheme中编写一个reduce函数,它就像Python中的内置reduce函数一样.在Scheme中编写reduce函数很容易:
(define (reduce fn lis identity)
(if (null? lis)
identity
(fn (car lis)
(reduce fn (cdr lis) identity))))
Run Code Online (Sandbox Code Playgroud)
但是,此代码与Python reduce不同,后者仅使用两个参数(函数和要减少的项列表).
任何人都可以帮我写一个这样工作的Scheme函数吗?
(>(reduce*'(2 4 5 5))=> 200,是我们教授的例子.)
非常感谢,伙计和女孩们.你是如此有帮助<3
ETA:对Levien先生和Jester-Young先生,非常感谢你.您提供了大量的信息,以帮助我自己解决问题.*拥抱