镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ 1 code name=['燃灯古佛','释迦摩尼佛','弥勒佛'] for item in name: print(item) 2 show ------------------------------------------博文的精髓,在技术部分,更在镇场一诗.Python是优秀的语言,值得努
比如我将string作为CNN 文本处理输入: float [] input = new float[maxLength]; // 1 sentence by maxLenWords // int[] input = new int[batchSize * maxLength]; // 1 sentence by maxLenWords int i = 0; final int length = subdomain.length(); for (int offset = 0; offset <
1. 拼接结果如下的字符串 1,2,3,4,5,6,7,8,9,10,11,12,12,12,12,34,234,2134,1234,1324,1234,123 2. 以前是这样想的,但是从效率,速度的方面来说这样做是低效率的 public class StringTest { public static void main(String[] args) { StringBuilder sb = new StringBuilder(); for (
1:编写for循环,利用索引遍历出每一个字符 msg = 'hello egon 666' msg = 'hello egon 666' i = 0 for i in range(0, len(msg)): print(msg[i], end=',') i += 1 2:编写while循环,利用索引遍历出每一个字符 msg = 'hello egon 666' msg = 'hello egon 666' i = 0 while i < len(msg): print(msg[i], end='
\(给出a,b,l,r,求在区间[l,r]内有多少x满足x%a%b!=x%b%a\) \(--------------------分割!!~----------------------------\) \(打个表很快发现规律,以a*b为循环节,每个循环节内满足条件的数都相同,那直接前缀和查询\) \(算出[1,r]满足条件的数,算出[1,l-1]满足条件的数,相减即可\) #include <bits/stdc++.h> using namespace std; typedef long lo
本章主要介绍RF的循环,判断以及关键字Evaluate. 1. for循环 在RF中通过 :FOR 编写循环 :FOR ${i} in range 10 log ${i} @{list} create list a b c :FOR ${i} IN @{list} \ Exit For Loop If '${i}'=='b' log ${i} 2. if判断 通过"run keyword if" 关键字可以编写if分支语句,还有很多其他的if判断,如Return From Keywor