前题


  • 硬件:路由器,刷入OpenWrt
  • 一些背景知识和动手能力

目标效果图


步骤


  1. 使用SSH 登陆路由器。I.e. ssh root@192.168.2.1
  2. 运行/usr/bin/duobo。日志类似:
    1. sh: : unknown operand
    2. Killed
    3. Warning: Unable to locate ipset utility, disabling ipset support
    4. * Flushing IPv4 filter table
    5. * Flushing IPv4 nat table
    6. * Flushing IPv4 mangle table
    7. * Flushing IPv4 raw table
    8. * Flushing conntrack table ...
    9. * Populating IPv4 filter table
    10. * Zone 'lan'
    11. * Zone 'wan'
    12. * Rule 'Allow-DHCP-Renew'
    13. * Rule 'Allow-Ping'
    14. * Rule ''
    15. * Rule ''
    16. * Rule ''
    17. * Rule ''
    18. * Forward 'lan' -> 'wan'
    19. * Populating IPv4 nat table
    20. * Zone 'lan'
    21. * Zone 'wan'
    22. * Populating IPv4 mangle table
    23. * Zone 'lan'
    24. * Zone 'wan'
    25. * Populating IPv4 raw table
    26. * Zone 'lan'
    27. * Zone 'wan'
    28. * Set tcp_ecn to off
    29. * Set tcp_syncookies to on
    30. * Set tcp_window_scaling to on
    31. * Running script '/etc/firewall.user'
    32. * Running script '/usr/share/miniupnpd/firewall.include'
    33. * Running script '/usr/share/qos_gargoyle/firewall.include'
    34. ! Failed with exit code
    35.  
    36. ___________________________________________________
    37. 开始第1次拔号...........
    38. 正在并发拔号中.............
    39. 等待3秒.............
    40. []拔[]拔成功, 小于设定的[]拔,将重新拔号...
    41.  
    42. _________________________
  3. 如果没有成功并发多播,根据提示信息调整duobo的内部参数设置,重新运行。分享一些技巧:
    1. number=10 #number是重拔次数,本脚本启动后一共尝试的次数
    2. n=7 #n是几拔,同时发出几拨,理论上设置越大成功概率越大!
    3. ok=2 #ok是拔上几次后退出拔号, 要实现的预期目标
    4. wait=5 #wait time 每次单线多拨失败后,重试的等待时间
    • 原则:失败多次以后,建议冷重启路由器,多个运行中的脚本会互相冲突,把问题复杂化。
    • 多拨失败以后,耐心等上1分钟;很多次的多播成功都是脚本完成以后退出,然后60秒内获取了超过预期的多条链接。
    • 把n调到7,这样会虚拟出很多wan接口,根据硬件性能,理论上设置越大成功概率越大!
    • 将ok调低一点,比如2。我觉得别太贪心,如果能稳定多播2个ADSL的IP,那其实概率上更折中了稳定性和高负载下的带宽均衡。
    • wait的时间我感觉5秒-8秒差不多,这个要看运行日志,做相应调整。
    • 看懂程序的原理,根据实际情况调整脚本程序。比如:这个版本的程序是这么多播的,ifup $prefix$i

遗留问题


  1. 开始第3次拔号...........
  2. 正在并发拔号中.............
  3. 等待10秒.............
  4. pppoe-wan Link encap:Point-to-Point Protocol
  5. pppoe-wan3 Link encap:Point-to-Point Protocol
  6. []拔[]拔成功, 大于或等于设定的[]拨,退出拔号...
  7. Error: an inet address is expected rather than "dev".
  8. iptables v1.4.10: Couldn't load target `zone_wan_notrack':File not found
  9.  
  10. Try `iptables -h' or 'iptables --help' for more information.
  11. iptables v1.4.10: Couldn't load target `zone_wan_nat':File not found
  12.  
  13. Try `iptables -h' or 'iptables --help' for more information.
  14. iptables: No chain/target/match by that name.
  15. iptables v1.4.10: Couldn't load target `zone_wan':File not found
  16.  
  17. Try `iptables -h' or 'iptables --help' for more information.
  18. iptables: No chain/target/match by that name.
  19. iptables: No chain/target/match by that name.
  20. iptables: No chain/target/match by that name.
  21. iptables: No chain/target/match by that name.
  22. iptables: No chain/target/match by that name.
  23. iptables: No chain/target/match by that name.
  24. iptables: No chain/target/match by that name.
  25. Error: an inet address is expected rather than "dev".
  26. iptables v1.4.10: Couldn't load target `zone_wan_notrack':File not found
  27.  
  28. Try `iptables -h' or 'iptables --help' for more information.
  29. iptables v1.4.10: Couldn't load target `zone_wan_nat':File not found
  30.  
  31. Try `iptables -h' or 'iptables --help' for more information.
  32. iptables: No chain/target/match by that name.
  33. iptables v1.4.10: Couldn't load target `zone_wan':File not found
  34.  
  35. Try `iptables -h' or 'iptables --help' for more information.
  36. iptables: No chain/target/match by that name.
  37. iptables: No chain/target/match by that name.
  38. iptables: No chain/target/match by that name.
  39. iptables: No chain/target/match by that name.
  40. iptables: No chain/target/match by that name.
  41. iptables: No chain/target/match by that name.
  42. iptables: No chain/target/match by that name.
  43. Error: an IP address is expected rather than "dev"
  44. 192.168.2.0/ dev br-lan proto kernel scope link src 192.168.2.1
  45. 221.218.232.1 dev pppoe-wan3 proto kernel scope link src 123.112.248.148
  46. 221.218.232.1 dev pppoe-wan proto kernel scope link src 221.218.236.51
  47. Kernel IP routing table
  48. Destination Gateway Genmask Flags Metric Ref Use Iface
  49. 192.168.2.0 0.0.0.0 255.255.255.0 U br-lan
  50. 221.218.232.1 0.0.0.0 255.255.255.255 UH pppoe-wan3
  51. 221.218.232.1 0.0.0.0 255.255.255.255 UH pppoe-wan

View Error Code

显然这个0.3版本的脚本不完全适用于我的路由器,有时间我需要查查原因。

估计都是关于iptables

有没有大侠探讨一下?

修正了下面版本中的一个错误

line 19:if [ $j -ge $ok ] ;

多拨代码(V0.3)


  1. #!/bin/sh
  2. #modified by muziling v0.
  3. #并发多拨脚本
  4.  
  5. #number是重拔次数
  6. #n是几拔
  7. #ok是拔上几次后退出拔号
  8. #wait time
  9.  
  10. number=
  11. n=
  12. ok=
  13. wait=
  14. # avoid same with feixiang's N-WAN naming and must start with "wan"
  15. prefix=wan
  16. vthprefix=vth
  17.  
  18. j=$(ifconfig | grep pppoe-wan | wc -l)
  19. if [ "$j" >= "$ok" ] ;
  20. then
  21. echo 已经是[$j]拔了,退出拔号...
  22. exit
  23. fi
  24.  
  25. if [ -f /etc/config/nwannumset ] ;
  26. then
  27. uci set nwannumset.@macvlan_numset[].macvlan_num=
  28. uci commit nwannumset
  29. fi
  30. for i in $( seq $(($n-)))
  31. do
  32. ifname=$prefix$i
  33. ifvth=$vthprefix$i
  34. #ifwan=$(uci get network.wan.ifname)
  35. pppoe_name=$(uci get network.wan.username)
  36. pppoe_pw=$(uci get network.wan.password)
  37.  
  38. if [ $(ip link | grep " ${ifvth}@eth0.2:" | wc -l) == "" ] ;
  39. then
  40. macfac=$(ifconfig | grep eth0. | tr -s " " | cut -d " " -f5 | cut -b -)
  41. mac="$macfac:"$(md5sum /proc/sys/kernel/random/uuid | sed 's/\(..\)/&:/g' | cut -b - | tr [a-f] [A-F])
  42. ip link add link eth0. $ifvth type macvlan
  43. ifconfig $ifvth hw ether $mac
  44. fi
  45.  
  46. # add /etc/config/network
  47. uci delete network.$ifname
  48. uci set network.$ifname=interface
  49. uci set network.$ifname.ifname=$ifvth
  50. #uci set network.$ifname._orig_ifname=eth0.
  51. #uci set network.$ifname._orig_bridge=false
  52. uci set network.$ifname.proto=pppoe
  53. uci set network.$ifname.username=$pppoe_name
  54. uci set network.$ifname.password=$pppoe_pw
  55. uci set network.$ifname.auto=
  56. uci set network.$ifname.defaultroute=
  57. uci set network.$ifname.peerdns=
  58. uci set network.$ifname.pppd_options="plugin rp-pppoe.so syncppp $n"
  59.  
  60. # add /etc/config/dhcp
  61. uci delete dhcp.$ifvth
  62. uci set dhcp.$ifvth=dhcp
  63. uci set dhcp.$ifvth.interface=$ifname
  64. uci set dhcp.$ifvth.ignore=
  65.  
  66. if [ -f /etc/config/nwan ] ;
  67. then
  68. uci delete nwan.$ifname
  69. uci set nwan.$ifname=interface
  70. uci set nwan.$ifname.name=telecom
  71. uci set nwan.$ifname.route=balance
  72. uci set nwan.$ifname.weight=
  73. uci set nwan.$ifname.uptime=0day,0hour,0min
  74. uci commit nwan
  75. fi
  76. done
  77. uci set network.wan.defaultroute=
  78. uci set network.wan.peerdns=
  79. uci set network.wan.pppd_options="plugin rp-pppoe.so syncppp $n"
  80. uci commit network
  81. uci commit dhcp
  82.  
  83. fw_wan_list=$(uci show network |grep =interface |grep -v lan|grep -v loopback |cut -d"." -f2 | awk -F "=" '{printf $1" "}')
  84. uci set firewall.@zone[].network="$fw_wan_list"
  85. uci commit firewall
  86. /etc/init.d/firewall restart
  87.  
  88. for q in $( seq $number )
  89. do
  90. echo
  91. echo ___________________________________________________
  92. echo 开始第$q次拔号...........
  93. killall -q -SIG pppd
  94. if [ "$q" == "" ] ;
  95. then
  96. for i in $( seq $(($n-)))
  97. do
  98. ifup $prefix$i
  99. done
  100. fi
  101.  
  102. echo 正在并发拔号中.............
  103. echo 等待$wait秒.............
  104. sleep $wait
  105.  
  106. j=$(ps | grep pppd | wc -l)
  107. ! [ "$j" -ge "$n" ] && ifup ${prefix}
  108.  
  109. ifconfig|grep pppoe
  110. j=$(ifconfig | grep pppoe-wan | wc -l)
  111.  
  112. ! [ "$j" -ge "$ok" ] && echo [$n]拔[$j]拔成功, 小于设定的[$ok]拔,将重新拔号...
  113. [ "$j" -ge "$ok" ] && echo [$n]拔[$j]拔成功, 大于或等于设定的[$ok]拨,退出拔号...
  114.  
  115. if [ "$j" -ge "$ok" ] ;
  116. then
  117. for i in $( seq $(($n-)))
  118. do
  119. if [ "$i" == "" ] ;
  120. then
  121. interface=wan
  122. else
  123. interface=$prefix$i
  124. fi
  125. if [ $(ifconfig | grep "pppoe-$interface " | wc -l) == "" ] ;
  126. then
  127. ifdown $interface
  128. fi
  129. done
  130. break
  131. fi
  132. done
  133. # kill ddns sleep and re-check wan ip change
  134. killall sleep
  135.  
  136. j=$(ifconfig | grep pppoe-wan | wc -l)
  137. ! [ "$j" -ge ] && reboot
  138.  
  139. #ppoename=$(ifconfig |grep 'ppoe-' |awk '{print substr($1,7)}'|tr '\n' ' ')
  140. ppoename=$(ifconfig |grep 'ppoe-' |awk '{print $1}'|tr '\n' ' ')
  141. i=
  142. vias=""
  143. for wan_ifname in $ppoename
  144. do
  145. vias="$vias nexthop via $wan_ip dev $wan_ifname weight 1 "
  146. let "rt=100+$i"
  147. i=$(($i+))
  148. ip route flush table $rt
  149. ip route add default via $wan_ip dev $wan_ifname table $rt
  150. ip route add table $rt to $(ip route | grep br-lan)
  151.  
  152. if [ $(iptables -t nat -vxnL POSTROUTING | grep -c " $wan_ifname ") == "" ] ;
  153. then
  154. iptables -t raw -A PREROUTING -i $wan_ifname -j zone_wan_notrack
  155. iptables -t nat -A PREROUTING -i $wan_ifname -j zone_wan_prerouting
  156. iptables -t nat -A POSTROUTING -o $wan_ifname -j zone_wan_nat
  157. iptables -t filter -A forward -i $wan_ifname -j zone_wan_forward
  158. iptables -t filter -A input -i $wan_ifname -j zone_wan
  159. iptables -t filter -A zone_wan_ACCEPT -o $wan_ifname -j ACCEPT
  160. iptables -t filter -A zone_wan_ACCEPT -i $wan_ifname -j ACCEPT
  161. iptables -t filter -A zone_wan_DROP -o $wan_ifname -j DROP
  162. iptables -t filter -A zone_wan_DROP -i $wan_ifname -j DROP
  163. iptables -t filter -A zone_wan_REJECT -o $wan_ifname -j reject
  164. iptables -t filter -A zone_wan_REJECT -i $wan_ifname -j reject
  165. fi
  166. iptables -A PREROUTING -t mangle -i $wan_ifname -j MARK --set-mark $rt
  167. iptables -t mangle -A zone_wan_MSSFIX -o $wan_ifname -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
  168. ip rule add fwmark $rt table $rt prio $rt
  169. done
  170. ip route del default
  171. ip route add default scope global $vias
  172. ip route flush cache
  173. ip route list
  174. route -n
  175. root@OpenWrt:~#

(duobo)

修订版(V0.3.1)

  1. #!/bin/sh
  2. #modified by muziling v0.
  3. #并发多拨脚本
  4. #modified by carl v0.3.1 (修正一处bug,改善友好提示信息)
  5.  
  6. #number是重拔次数,本脚本启动后一共尝试的次数
  7. #n是几拔,同时发出几拨,理论上设置越大成功概率越大!
  8. #ok是拔上几次后退出拔号, 要实现的预期目标
  9. #wait time 每次单线多拨失败后,重试的等待时间
  10.  
  11. number=
  12. n=
  13. ok=
  14. wait=
  15. # avoid same with feixiang's N-WAN naming and must start with "wan"
  16. prefix=wan
  17. vthprefix=vth
  18.  
  19. j=$(ifconfig | grep pppoe-wan | wc -l)
  20. if [ $j -ge $ok ] ;
  21. then
  22. echo 已经是[$j]拔了,退出拔号程序。
  23. exit
  24. fi
  25.  
  26. if [ -f /etc/config/nwannumset ] ;
  27. then
  28. uci set nwannumset.@macvlan_numset[].macvlan_num=
  29. uci commit nwannumset
  30. fi
  31.  
  32. for i in $( seq $(($n-)))
  33. do
  34. ifname=$prefix$i
  35. ifvth=$vthprefix$i
  36. #ifwan=$(uci get network.wan.ifname)
  37. pppoe_name=$(uci get network.wan.username)
  38. pppoe_pw=$(uci get network.wan.password)
  39.  
  40. if [ $(ip link | grep " ${ifvth}@eth0.2:" | wc -l) == "" ] ;
  41. then
  42. macfac=$(ifconfig | grep eth0. | tr -s " " | cut -d " " -f5 | cut -b -)
  43. mac="$macfac:"$(md5sum /proc/sys/kernel/random/uuid | sed 's/\(..\)/&:/g' | cut -b - | tr [a-f] [A-F])
  44. ip link add link eth0. $ifvth type macvlan
  45. ifconfig $ifvth hw ether $mac
  46. echo 更换MAC完毕$ifvth.
  47. fi
  48.  
  49. # add /etc/config/network
  50. uci delete network.$ifname
  51. uci set network.$ifname=interface
  52. uci set network.$ifname.ifname=$ifvth
  53. #uci set network.$ifname._orig_ifname=eth0.
  54. #uci set network.$ifname._orig_bridge=false
  55. uci set network.$ifname.proto=pppoe
  56. uci set network.$ifname.username=$pppoe_name
  57. uci set network.$ifname.password=$pppoe_pw
  58. uci set network.$ifname.auto=
  59. uci set network.$ifname.defaultroute=
  60. uci set network.$ifname.peerdns=
  61. uci set network.$ifname.pppd_options="plugin rp-pppoe.so syncppp $n"
  62.  
  63. # add /etc/config/dhcp
  64. uci delete dhcp.$ifvth
  65. uci set dhcp.$ifvth=dhcp
  66. uci set dhcp.$ifvth.interface=$ifname
  67. uci set dhcp.$ifvth.ignore=
  68.  
  69. if [ -f /etc/config/nwan ] ;
  70. then
  71. uci delete nwan.$ifname
  72. uci set nwan.$ifname=interface
  73. uci set nwan.$ifname.name=unicom
  74. uci set nwan.$ifname.route=balance
  75. uci set nwan.$ifname.weight=
  76. uci set nwan.$ifname.uptime=0day,0hour,0min
  77. uci commit nwan
  78. fi
  79. done
  80.  
  81. uci set network.wan.defaultroute=
  82. uci set network.wan.peerdns=
  83. uci set network.wan.pppd_options="plugin rp-pppoe.so syncppp $n"
  84. uci commit network
  85. uci commit dhcp
  86.  
  87. fw_wan_list=$(uci show network |grep =interface |grep -v lan|grep -v loopback |cut -d"." -f2 | awk -F "=" '{printf $1" "}')
  88. uci set firewall.@zone[].network="$fw_wan_list"
  89. uci commit firewall
  90. /etc/init.d/firewall restart
  91.  
  92. for q in $( seq $number )
  93. do
  94. echo
  95. echo ___________________________________________________
  96. echo 开始第$q次拔号...........
  97. killall -q -SIG pppd
  98. if [ "$q" == "" ] ;
  99. then
  100. for i in $( seq $(($n-)))
  101. do
  102. ifup $prefix$i
  103. done
  104. fi
  105.  
  106. echo 正在并发拔号中.............
  107. echo 等待$wait秒.............
  108. sleep $wait
  109.  
  110. j=$(ps | grep pppd | wc -l)
  111. ! [ "$j" -ge "$n" ] && ifup ${prefix}
  112.  
  113. ifconfig | grep pppoe
  114. j=$(ifconfig | grep pppoe-wan | wc -l)
  115.  
  116. ! [ "$j" -ge "$ok" ] && echo [$n]拔[$j]拔成功, 小于设定的[$ok]拔,将重新拔号...
  117. [ "$j" -ge "$ok" ] && echo [$n]拔[$j]拔成功, 大于或等于设定的[$ok]拨,退出拔号...
  118.  
  119. if [ "$j" -ge "$ok" ] ;
  120. then
  121. for i in $( seq $(($n-)))
  122. do
  123. if [ "$i" == "" ] ;
  124. then
  125. interface=wan
  126. else
  127. interface=$prefix$i
  128. fi
  129. if [ $(ifconfig | grep "pppoe-$interface " | wc -l) == "" ] ;
  130. then
  131. ifdown $interface
  132. fi
  133. done
  134. break
  135. fi
  136. done # done/tried all tring times $number
  137.  
  138. # kill ddns sleep and re-check wan ip change
  139. killall sleep
  140.  
  141. # reboot the machine if failed tried times
  142. #sleep $wait
  143. j=$(ifconfig | grep pppoe-wan | wc -l)
  144. ! [ "$j" -gt ] && reboot
  145.  
  146. echo ___________________________________________________
  147. echo 开始N-WAN负载均衡功能...
  148. #ppoename=$(ifconfig |grep 'ppoe-' |awk '{print substr($1,7)}'|tr '\n' ' ')
  149. ppoename=$(ifconfig|grep 'ppoe-' |awk '{print $1}'|tr '\n' ' ')
  150. i=
  151. vias=""
  152. for wan_ifname in $ppoename
  153. do
  154. vias="$vias nexthop via $wan_ip dev $wan_ifname weight 1 "
  155. let "rt=100+$i"
  156. i=$(($i+))
  157. ip route flush table $rt
  158. #REMOVE ERROR
  159. ip route add default via $wan_ip dev $wan_ifname table $rt
  160. ip route add table $rt to $(ip route | grep br-lan)
  161.  
  162. if [ $(iptables -t nat -vxnL POSTROUTING | grep -c " $wan_ifname ") == "" ] ;
  163. then
  164. #REMOVE ERROR
  165. iptables -t raw -A PREROUTING -i $wan_ifname -j zone_wan_notrack
  166. iptables -t nat -A PREROUTING -i $wan_ifname -j zone_wan_prerouting
  167. #REMOVE ERROR
  168. iptables -t nat -A POSTROUTING -o $wan_ifname -j zone_wan_nat
  169. iptables -t filter -A forward -i $wan_ifname -j zone_wan_forward
  170. #REMOVE ERROR
  171. iptables -t filter -A input -i $wan_ifname -j zone_wan
  172. iptables -t filter -A zone_wan_ACCEPT -o $wan_ifname -j ACCEPT
  173. iptables -t filter -A zone_wan_ACCEPT -i $wan_ifname -j ACCEPT
  174. iptables -t filter -A zone_wan_DROP -o $wan_ifname -j DROP
  175. iptables -t filter -A zone_wan_DROP -i $wan_ifname -j DROP
  176. iptables -t filter -A zone_wan_REJECT -o $wan_ifname -j reject
  177. iptables -t filter -A zone_wan_REJECT -i $wan_ifname -j reject
  178. fi
  179.  
  180. iptables -A PREROUTING -t mangle -i $wan_ifname -j MARK --set-mark $rt
  181. iptables -t mangle -A zone_wan_MSSFIX -o $wan_ifname -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
  182. ip rule add fwmark $rt table $rt prio $rt
  183. done
  184.  
  185. ip route del default
  186.  
  187. echo ___________________________________________________
  188. echo 下面执行ip route add default scope global $vias
  189. ip route add default scope global $vias
  190.  
  191. ip route flush cache
  192.  
  193. echo ___________________________________________________
  194. echo 下面输出ip route list
  195. ip route list
  196.  
  197. echo ___________________________________________________
  198. echo 下面输出route -n
  199. route -n

参考文献


OpenWrt For AR71xx系列 ar2 Tr 脱机 N-WAN r48549

自己动手 4530R 脱机 Samba U-BOOT 多拨(11-04更新部分问题说明,请看2楼)

[0916更新]WR703N WR720N 及其他各类 OpenWRT类路由实现一号多拨带宽叠加教程

OpenWrt > ADSL单线多拨,负载均衡(仅供参考)的更多相关文章

  1. Unity上一页下一页切换功能实现源码(仅供参考)

    在做项目时我们有时需要实现切换上一页下一页图片,切换上一首下一首歌曲等等类似的功能.这里写了个简单的实现源码(仅供参考),要是有更好的方法欢迎提出来,共同进步~ 以切换上一页下一页图片为例: usin ...

  2. Ubuntu 12.04 分区方案(仅供参考)

    Ubuntu 12.04 分区方案(仅供参考)   总空间大小:50G 目录 建议大小 实际大小 格式 描述 / 10G~20G 10G ext4 根目录 swap <2048M 1G swap ...

  3. VSS的运用小内容(针对于vs2008版本)(小的问题都是,仅供参考--只针对于菜鸟级的)

    自己开始接触vss 的时候有些小的习惯没有很好的养成,下面的有关VSS内容都是简单的迁入迁出的问题,(仅供参考) 1.文件的迁入迁出:(.txt..xlsx..doc) a:文件的覆盖问题: 对于文件 ...

  4. mysql 千万级数据查询效率实践,分析 mysql查询优化实践--本文只做了一部分,仅供参考

    数据量, 1300万的表加上112万的表 注意: 本文只做了部分优化,并不全面,仅供参考, 欢迎指点.   请移步tim查看,因为写的时候在tim写的,粘贴过来截图有问题,就直接上链接了. https ...

  5. jdk1.8+SpringAOP注解报java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut select错误的不知原因的解决办法[仅供参考]

    先说办法:如果Aspectweaver-1.*.*jar这三个包版本比较低, 比如1.5.0这一层次的,可以找版本高一点的包替换低版本的包,问题可以得到解决 jar包的下载地址:https://mvn ...

  6. normalizr实践使用(个人总结,仅供参考)

    # normalizr实践使用 原数据 (自编数据,本数据仅供参考) var aaaObj ={ "id" : "0000000000000000000000000000 ...

  7. 第二步 (仅供参考) sencha touch 使用cmd打包apk

    最新版本的cmd可以直接将sencha touch项目打包成本地应用,不过还有很多不足,本文仅供参考 通过sencha app build native命令可以直接将项目打包成本地应用,不过在命令运行 ...

  8. 2019第十届蓝桥杯C++B组题解(赛后重写的,不确保答案正确性,仅供参考)

    先说一下这次的感受吧,我们考场比较乱,开始比赛了,还有的电脑有故障,(向这些人发出同情),第一次认真参加比赛,真正比赛的时候感觉没有那么正式,很乱,各种小问题,(例如博主就没找到题目在哪里,找到后又不 ...

  9. 分享分享JavaScript100例-仅供参考

    最近一直在做项目,分享下以前收集的Javascript100例,仅供参考. http://files.cnblogs.com/52net/JavaScript100例.zip

随机推荐

  1. sublime通用快捷键 汉化 安装 插件

    Ctrl+Alt+P     切换项目 1.Ctrl+Shift+P     打开Package Control     Ctrl + Shift + P ,输入View, 选择Toogle Tabs ...

  2. C#面试(2016年4月)

    1.WebForm和MVC的区别 MVC: 1)通过model.view.controller将处理后台逻辑代码与前台展示逻辑代码进行了很好的分离: 2)通过修改路由规则,可以控制生成自定义的url, ...

  3. 关于jsp的总结

    第一章:jsp技术不仅是开发web应用的先进技术,而且是进一步学习相关技术的基础.jsp引擎是支持jsp程序的web容器,负责运行jsp,并将有关结果发送到客户端.目前流行的jsp引擎之一是tomca ...

  4. sql rank()函数

    RANK() OVER([<partiton_by_clause>]) partition_by_clause 将from子句生成的结果集划分为应用到RANK函数的分区.  Order_b ...

  5. SqlServer try catch 捕获不到的一些错误及解决方法(转载)

    测试注意 :①假如系统能捕获异常 ,并且我们自己开启了事务.系统会自动 回滚事务的,但是 我们还是要在catch里面加上 rollback tran的习惯,这样也不会提示重复rollback的错误,这 ...

  6. LDAP的Schema

    Schema是LDAP的一个重要组成部分,类似于数据库的模式定义,LDAP的Schema定义了LDAP目录所应遵循的结构和规则,比如一个 objectclass会有哪些属性,这些属性又是什么结构等等, ...

  7. struts2 jquery ajaxFileUpload 异步上传文件

    网上搜集的,整理一下. 一.ajaxFileUpload 实现异步上传文件利用到了ajaxFileUpload.js这个文件,这是别人开发的一个jquery的插件,可以实现文件的上传并能够和strut ...

  8. Python 多线程教程:并发与并行

    转载于: https://my.oschina.net/leejun2005/blog/398826 在批评Python的讨论中,常常说起Python多线程是多么的难用.还有人对 global int ...

  9. Hdu 2845 Beans

    Beans Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submi ...

  10. 关于ES6的 模块功能 Module 中export import的用法和注意之处

    export default 的用法 export default命令用于指定模块的默认输出.显然,一个模块只能有一个默认输出,因此export deault命令只能使用一次.所以,import命令后 ...