EXCEL宏编程纪念

EXCEL宏编程纪念       不久前被叫去编写宏,这EXCEL宏真是麻烦! 可能以后不会再遇到有编写宏的经历了,故而贴出来以做个纪念: Subdirect_Price()query_dir_volume宏由颜清国编写,时间:2007-4-9定义变量DimcRowsAsInteger总行数DimcColumnsAsInteger总列数DimHEADERCOLORINDE

大家好,又见面了,我是你们的朋友全栈君。

        不久前被叫去编写宏,这EXCEL宏真是麻烦! 可能以后不会再遇到有编写宏的经历了,故而贴出来以做个纪念:

 Sub direct_Price()

‘query_dir_volume
‘宏由 颜清国编写,时间: 2007-4-9

”定义变量
Dim cRows As Integer ‘总行数
Dim cColumns As Integer ‘总列数
Dim HEADERCOLORINDEX As Integer  ‘表头的背景色
Dim cTemp As Integer  ‘临时计数
Dim sTempString As String  ‘临时字符串变量
Dim i As Integer  ‘临时计数
Dim j As Integer  ‘临时计数
Dim rowIndex As Integer  ‘临时指示处理到哪里
Dim colIndex As Integer  ‘临时指示处理到哪里
Dim tempRndColor As Integer  ‘临时生成的颜色
Dim TABLENAME As String  ‘待处理的表名

Dim colorIndex As String  ‘颜色索引名字

”””””””””””””””””””””””

‘表头的背景色
HEADERCOLORINDEX = 15

colorIndex = 36 ‘颜色从33开始是比较浅的颜色

TABLENAME = “direct_Price”
‘关闭所有弹出的警告消息
Application.DisplayAlerts = False

‘设置需要处理的单元表
Sheets(TABLENAME).Select

 ‘取单元表的总列数与总行数
cRows = Sheets(TABLENAME).UsedRange.Rows.Count
cColumns = Sheets(TABLENAME).UsedRange.Columns.Count
   
”””””””””””””””””””””””

   
     ‘选择所有的单元格
 Range(Cells(1, 1), Cells(cRows, cColumns)).Select
 
   ‘设置该表中所有单元行高为11.25
 Selection.RowHeight = 11.25
 

   
‘设置该表中所有单元行高为11.25
 Selection.RowHeight = 11.25
 
 ‘设置所有的边框
 Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
   
   ‘并且拆分所有的单元格
 With Selection
        .MergeCells = False ‘拆分单格
 End With
 
 Columns(“C:C”).Select
 Selection.Insert Shift:=xlToRight
 
  ‘删除第一列,注意这里必须先拆分单格,再删除第一列,否则一次就会把合并单元格所在列全部删除
 Range(Cells(1, 1), Cells(1, 1)).Select
 Selection.EntireColumn.Delete
 ‘Selection.EntireColumn.Delete
 
   ‘向表头添加一行
  Rows(“1:1”).Select
  Selection.Insert
 
 
Columns(“A:A”).Select
Selection.ColumnWidth = 9.29

Columns(“B:B”).Select
Selection.ColumnWidth = 6.71

Columns(“C:C”).Select
Selection.ColumnWidth = 15.29

Columns(“D:D”).Select
Selection.ColumnWidth = 29.86

Columns(“E:E”).Select
Selection.ColumnWidth = 12.29

Columns(“F:F”).Select
Selection.ColumnWidth = 12.29

   
    ”””””””””””””””””’设定单元格A1:A2””””””””””
     ‘合并A1:A2单元格
    Range(“A1:A2”).Select
   
    ‘将数据写回
     With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = True
    End With
   
    ‘往该单元格中写入Usage_Var
    ActiveCell.FormulaR1C1 = “Price”
   
   
    ‘设置该单元格字体格式
    With ActiveCell.Characters(Start:=1, Length:=5).Font
        .Name = “Arial”
        .FontStyle = “加粗 倾斜”
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .colorIndex = 2
    End With
   
    ‘单元格设定边框
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeTop).LineStyle = xlNone
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = 56
    End With
    Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
   
    With Selection.Interior
        .colorIndex = 5
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
   
  ””””””””””””””’设定头两行的内部样式”””””””””””’
    
     Range(“B1:B2”).Select
     Selection.Merge
   
     Range(“C1:C2”).Select
    Selection.Merge
    
     Range(“D1:D2”).Select
     Selection.Merge
    
    
    Range(“B1:D2”).Select
   
  ‘设置头两行行高为11.25
   Selection.RowHeight = 14.25
  
    With Selection.Font
        .Name = “Arial”
        .FontStyle = “加粗”
        .Size = 8
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .colorIndex = xlAutomatic
    End With
   
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .WrapText = True
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
    End With
   
    With Selection.Interior
        .colorIndex = HEADERCOLORINDEX
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
   
   
    Range(“B1:B2”).Select
    ActiveCell.FormulaR1C1 = “Type”
    With ActiveCell.Characters(Start:=1, Length:=4).Font
        .Name = “Arial”
        .FontStyle = “加粗”
        .Size = 8
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .colorIndex = 5
    End With
   
   
     Range(“E1:F1”).Select
         With Selection.Font
        .Name = “Arial”
        .FontStyle = “加粗”
        .Size = 8
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .colorIndex = 5
    End With
   With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .WrapText = True
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = True
    End With
   
    With Selection.Interior
        .colorIndex = HEADERCOLORINDEX
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
     ActiveCell.FormulaR1C1 = “Price”
    
    Range(“E2:F2”).Select
   
  ‘设置头两行行高为11.25
   Selection.RowHeight = 14.25
  
    With Selection.Font
        .Name = “Arial”
        .FontStyle = “加粗”
        .Size = 8
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .colorIndex = xlAutomatic
    End With
   
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .WrapText = True
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
   
    With Selection.Interior
        .colorIndex = HEADERCOLORINDEX
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
   
   
    ‘加第一二行边框
    Range(“A1:F2”).Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
  
  
    ‘去掉第三行的:号
    ‘sTempString = Right(Cells(3, 1), Len(Cells(3, 1)) – 3)
    ‘ActiveCell.FormulaR1C1 = sTempString
   
    i = 2
    j = 1
    
   ‘外层循环判断是否都合并完成,这里插入了一行,加1
   While i <= cRows
   ‘ i = i + 1
   
     Range(Cells(i + 1, j), Cells(i + 1, j)).Select
    
    ‘去掉分类行中的:号
    If (Len(Cells(i + 1, j)) >= 3) Then
      ”””””””如果是分格的界限””””””””””””””””””
      If (Left(Cells(i + 1, j), 3) = ” : “) Then
     
          Range(Cells(i + 1, j), Cells(i + 1, cColumns)).Select
         
        ‘对第三行进行设定
        ‘设置头两行行高为11.25
        Selection.RowHeight = 18
      With Selection.Interior
         .colorIndex = 2
         .Pattern = xlSolid
         .PatternColorIndex = xlAutomatic
       End With
       ‘合并前两格
       ‘先将其合并
      With Selection
        .HorizontalAlignment = xlLeft ‘靠左对齐
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
       End With
    ‘合并
     Selection.Merge
    
    ‘对其设定字体风格
    With Selection.Font
        .Name = “Arial”
        .FontStyle = “加粗 倾斜”
        .Size = 9
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .colorIndex = 3
    End With
   
    With Selection
        .HorizontalAlignment = xlLeft
        .VerticalAlignment = xlCenter
        .WrapText = True
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = True
    End With
   
        sTempString = Right(Cells(i + 1, j), Len(Cells(i + 1, j)) – 3)
        ActiveCell.FormulaR1C1 = sTempString
        i = i + 1
      End If
    End If
 
 
    i = i + 1
   
    ‘加1后判断是否到了表尾,没有继续合并处理
    ‘If (i <= cRows + 1) Then
   
     rowIndex = i
     ‘取出Cells(i, j)的内容
    sTempString = Cells(i, j)
   
    ‘循环判断下一个单元格是否和上一个单元格相等,不是则表示到此该合并
   While sTempString = Cells(i + 1, j) And i <= cRows
     i = i + 1
   Wend
  
  
   ””””””””””””””””””设置第一列””””””””””””””””””””
   ‘跳出循环表示已经到此该将rowIndex 和 i行合并
   Range(Cells(rowIndex, j), Cells(i, j)).Select
   Selection.Merge
 
    ‘将原来内容填充进来
    ActiveCell.FormulaR1C1 = sTempString
   ‘设合并后的单元格的边框
    With Selection
    .HorizontalAlignment = xlCenter
    .VerticalAlignment = xlCenter
    .WrapText = True
    .Orientation = 0
    .AddIndent = False
    .IndentLevel = 0
    .ShrinkToFit = False
    .ReadingOrder = xlContext
    .MergeCells = True
    End With
    Selection.Font.FontStyle = “加粗”
        
     ””””””””””””””””””设置第一列结束””””””””””””””””””””

     ”””””””””””””””””””’设置第二列””””””””””””””””””””””’
     Range(Cells(rowIndex, j + 1), Cells(i, j + 1)).Select
          ‘设置字体
    
     With Selection.Font
     .Name = “Arial”
     .FontStyle = “加粗”
     .Size = 8
     .Strikethrough = False
     .Superscript = False
     .Subscript = False
     .OutlineFont = False
     .Shadow = False
     .Underline = xlUnderlineStyleNone
     .colorIndex = 5
     End With
   
    With Selection
    .HorizontalAlignment = xlCenter
    .VerticalAlignment = xlCenter
    .WrapText = True
    .Orientation = 0
    .AddIndent = False
    .IndentLevel = 0
    .ShrinkToFit = False
    .ReadingOrder = xlContext
    .MergeCells = False
    End With
   
     Selection.Borders(xlDiagonalDown).LineStyle = xlNone
     Selection.Borders(xlDiagonalUp).LineStyle = xlNone
     With Selection.Borders(xlEdgeLeft)
         .LineStyle = xlContinuous
         .Weight = xlThin
         .colorIndex = 56
     End With
     With Selection.Borders(xlEdgeTop)
         .LineStyle = xlContinuous
         .Weight = xlThin
         .colorIndex = 56
     End With
     With Selection.Borders(xlEdgeBottom)
         .LineStyle = xlContinuous
         .Weight = xlThin
         .colorIndex = 56
     End With
     With Selection.Borders(xlEdgeRight)
         .LineStyle = xlContinuous
         .Weight = xlThin
         .colorIndex = 56
     End With
     Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
    
    
    
””””””””””””””’设置第二列结束””””””””””””””””””””””’
  
””””””””””””’修改原来单元格的数据格式””””””””””””””””
””””””””””””首先向任一无用的单元格写入数据
   Range(Cells(cRows + 2, cColumns), Cells(cRows + 2, cColumns)).Select
   ActiveCell.FormulaR1C1 = “1”
   ‘将其格式拷贝
   Selection.Copy
  ‘复制格式
   Range(Cells(rowIndex, j + 4), Cells(i, cColumns)).Select
   Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
   SkipBlanks:=False, Transpose:=False
   Selection.NumberFormatLocal = “_*#,##0.00000”
   ‘清除原来内容
   Range(Cells(cRows + 2, cColumns), Cells(cRows + 2, cColumns)).Select
   Selection.ClearContents

””””””””””””设定数据格式完成”””””””””””””””””””””””

 ”””””””””””””””””””’统一设置该区域的颜色”””””””””””””””””””””””
     ‘设置内部填充
     Range(Cells(rowIndex, j), Cells(i, cColumns)).Select
    
     colorIndex = colorIndex + 1
     If colorIndex > 39 Then
        colorIndex = 33
    End If
   
     With Selection.Interior
             .colorIndex = colorIndex ‘颜色
             .Pattern = xlSolid
             .PatternColorIndex = xlAutomatic
     End With
 ”””””””””””””””””统一设置该区域的颜色结束”””””””””””””””””””””””
 

””””””””””””””’设置剩余的列””””””””””””””””””””””’
    Range(Cells(rowIndex, j + 2), Cells(i, cColumns)).Select
   
    ‘设置字体
   With Selection.Font
      .Name = “Arial”
      .FontStyle = “常规”
      .Size = 8
      .Strikethrough = False
       .Superscript = False
      .Subscript = False
     .OutlineFont = False
       .Shadow = False
     .Underline = xlUnderlineStyleNone
     .colorIndex = xlAutomatic
     End With
    
    ‘设置第6列
    Range(Cells(rowIndex, j + 4), Cells(i, j + 5)).Select
          ‘设置字体
     With Selection.Font
      .Name = “Arial”
      .FontStyle = “常规”
      .Size = 8
      .Strikethrough = False
       .Superscript = False
      .Subscript = False
     .OutlineFont = False
       .Shadow = False
     .Underline = xlUnderlineStyleNone
     .colorIndex = 3
     End With
    
    
         
    ””””””””””””””’设置全部的边框””””””””””””””””””””””’
    Range(Cells(rowIndex, j), Cells(i, cColumns)).Select
    ‘设置边框
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlInsideHorizontal)
      ‘  .LineStyle = xlContinuous
        .Weight = xlThin
       ‘ .colorIndex = xlAutomatic
    End With
Wend

 Range(Cells(rowIndex – 1, 1), Cells(rowIndex – 1, cColumns)).Select
 Selection.MergeCells = False
 
 
 Range(Cells(rowIndex – 1, cColumns – 1), Cells(rowIndex – 1, cColumns – 1)).Select
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .WrapText = True
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    With Selection.Font
        .Name = “Arial”
        .FontStyle = “加粗”
        .Size = 8
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .colorIndex = xlAutomatic
    End With
    With Selection.Interior
        .colorIndex = 15
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
    ActiveCell.FormulaR1C1 = “Average”
    With ActiveCell.Characters(Start:=1, Length:=7).Font
        .Name = “Arial”
        .FontStyle = “加粗”
        .Size = 8
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .colorIndex = xlAutomatic
    End With
   
    Range(Cells(rowIndex – 1, cColumns), Cells(rowIndex – 1, cColumns)).Select
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .WrapText = True
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    With Selection.Font
        .Name = “Arial”
        .FontStyle = “加粗”
        .Size = 8
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .colorIndex = xlAutomatic
    End With
    With Selection.Interior
        .colorIndex = 15
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
    End With
    ActiveCell.FormulaR1C1 = “Average”
    With ActiveCell.Characters(Start:=1, Length:=7).Font
        .Name = “Arial”
        .FontStyle = “加粗”
        .Size = 8
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .colorIndex = xlAutomatic
    End With
    
    
    Range(Cells(rowIndex – 1, cColumns – 1), Cells(rowIndex – 1, cColumns)).Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .colorIndex = xlAutomatic
    End With
    With Selection.Borders(xlInsideHorizontal)
       ‘ .LineStyle = xlContinuous
        .Weight = xlThin
       ‘ .colorIndex = xlAutomatic
    End With
   
End Sub

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/137753.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • vscode前端插件配置[通俗易懂]

    vscode前端插件配置[通俗易懂]vscode前端最佳插件配置

  • linux fork函数浅析

    linux fork函数浅析

    2021年11月28日
  • man jps「建议收藏」

    man jps「建议收藏」manjpsjps(1)                                                                                                             jps(1)Name      jps-JavaVirtualMachineProcessStatusTool

  • Java精选笔试题

    Java精选笔试题1,volatile关键字是否能保证线程安全?()>>>>答案:否volatile关键字用在多线程同步中,可保证读取的可见性,JVM只是保证从主内存加载到线程工作内存的值是最新的读取值,而非cache中。但多个线程对volatile的写操作,无法保证线程安全。假如线程1,线程2在进行read,load操作中,发现主内存中co…

  • 永久免费内网穿透软件_不限速内网穿透

    永久免费内网穿透软件_不限速内网穿透三种永久免费内网穿透傻瓜式使用教程方法一(使用qydev)方法二(使用飞鸽内网穿透)方法三使用(神卓互联内网穿透)教程方法一(使用qydev)官网:点击访问1、官网页面:找到客户端下载2、找到自己电脑或者运行平台对应的版本(我的是windows64位)3、下载完成后解压到自己熟悉的文件内保存,解压后,暂时不管她,继续第4步4、登录官网后台:新增隧道点击隧道管理–>开通隧道只需要填写这4项:隧道协议选择:http隧道名称: 取一个独一无二的名字

  • 智能优化算法:海鸥优化算法-附代码

    智能优化算法:海鸥优化算法-附代码2019智能算法:海鸥优化算法-附代码摘要:本文简单介绍智能优化算法-海鸥优化算法1.原理海鸥是遍布全球的海鸟,海鸥种类繁多且大小和身长各不相同。海鸥是杂食动物,吃昆虫、鱼、爬行动物、两栖动物和蚯蚓等。大多数海鸥的身体覆盖着白色的羽毛,经常用面包屑来吸引鱼群,用脚发出雨水落下的声音来吸引藏在地下的蚯蚓。海鸥可以喝淡水和盐水,通过眼睛上方的一对特殊腺体,将盐从它们的体内排出。海鸥以群居式生活,利用智慧来寻找和攻击猎物。海鸥最重要特征是迁徙和攻击行为,迁徙是动物从一个地方到另一个地方根据季节更替

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号