- 博客(25)
- 收藏
- 关注
原创 XSS_Cheat_Sheet_2020_Edition
'}alert(1);{'{//a=reader<<!alert(1);alert(1);alert`1`(alert)(1)</script>%2Bxml;
2023-04-19 09:29:59
236
转载 看我如何绕过类似PRO这样的XSS过滤器(XSS高级方法)
该漏洞可以允许攻击者实现账户接管,并将低危的XSS漏洞提升为高危漏洞,而该漏洞也拿到了1000美金的漏洞奖励。
2023-04-18 22:11:25
293
原创 数据结构处算法python--第四章课后练习题
#4.1# 时间复杂度和空间复杂度都是O(n)# def search_bigvalue(s,n):# if n==1:# #这其实就是m的值,s[n-1]是上一个值,当每一次调用函数一直被悬挂,直到最后n==1,说明其中只有一个元素# # 就返回这个值,然后s[n-1] if s[n-1]>m else m在这里进行比较,返回大的,又回到上一级的函数# # 进行比较,直至比完所有元素。# return s[0]# m=search_bigvalue(.
2022-05-11 18:05:19
631
原创 数据结构与算法python--第二章面向对象做题总结
# 2.4# 前后没有下划线的是公有方法,## 前单下划线例如: _data# 这种其实就是为了告诉程序员,这个为内部使用的变量,不要再外部使用,仅在内部使用# ,就是为了设置一个提示,但是外部还是可以用。只是告诉程序员最好不要再外部使用,# 如果是函数,也是同样的道理。# ## 前边有两个下划线的# 前双下划线例如: __data# 这种就更简单了,其实就是私有的变量和函数,子类不能用,一用就报错。# 一般是为了避免于子类属性或者方法名冲突,无法在外部直接访问。## 前后都有双.
2022-05-04 20:29:02
235
原创 Equal Sides Of An Array--codewar刷题总结
You are going to be given an array of integers. Your job is to take that array and find an index N where the sum of the integers to the left of N is equal to the sum of the integers to the right of N. If there is no index that would make this happen, retur
2022-04-29 23:10:10
241
原创 Take a Ten Minutes Walk--codewar刷题总结
You live in the city of Cartesia where all roads are laid out in a perfect grid. You arrived ten minutes too early to an appointment, so you decided to take the opportunity to go for a short walk. The city provides its citizens with a Walk Generating App o
2022-04-29 21:05:19
270
原创 Simple Encryption #1 - Alternating Split--codewar刷题总结
Implement a pseudo-encryption algorithm which given a stringSand an integerNconcatenates all the odd-indexed characters ofSwith all the even-indexed characters ofS, this process should be repeatedNtimes.Examples:encrypt("012345", 1) => "...
2022-04-27 13:43:55
667
原创 Take a Number And Sum Its Digits Raised To The Consecutive Powers And ....Eureka--codewar刷题总结
The number89is the first integer with more than one digit that fulfills the property partially introduced in the title of this kata. What's the use of saying "Eureka"? Because this sum gives the same number.In effect:89 = 8^1 + 9^2The next number in...
2022-04-26 12:33:26
380
原创 Write Number in Expanded Form--codewar刷题总结
Write Number in Expanded FormYou will be given a number and you will need to return it as a string inExpanded Form. For example:expanded_form(12) # Should return '10 + 2'expanded_form(42) # Should return '40 + 2'expanded_form(70304) # Should return.
2022-04-22 13:58:31
506
原创 Two Sum--leecode刷题总结
Given an array of integers numsand an integer target, return indices of the two numbers such that they add up to target.You may assume that each input would have exactly one solution, and you may not use the same element twice.You can return the answe.
2022-04-21 13:21:34
255
原创 罗马数字转整数--力扣刷题总结
罗马数字包含以下七种字符:I,V,X,L,C,D和M。字符 数值I 1V 5X 10L 50C 100D 500M 1000例如, 罗马数字 2 写做II,即为两个并列的 1 。12 写做XII,即为X+II。 27 写做XXVII, 即为XX+V+II。通...
2022-04-16 15:18:08
90
原创 Highest and Lowest--codewar刷题总结
thanks a lot for codewarIn this little assignment you are given a string of space separated numbers, and have to return the highest and lowest number.Exampleshigh_and_low("1 2 3 4 5") # return "5 1"high_and_low("1 2 -3 4 5") # return "5 -3"high_.
2022-04-16 12:03:59
319
原创 Unique In Order--codewar刷题总结
thanks a lot for codewarImplement the function unique_in_order which takes as argument a sequence and returns a list of items without any elements with the same value next to each other and preserving the original order of elements.For example:uniqu
2022-04-15 16:06:53
200
原创 Find the unique number
There is an array with some numbers. All numbers are equal except for one. Try to find it!find_uniq([ 1, 1, 1, 2, 1, 1 ]) == 2find_uniq([ 0, 0, 0.55, 0, 0 ]) == 0.55It’s guaranteed that array contains at least 3 numbers.The tests contain some very
2022-04-15 14:59:15
348
原创 Round by 0.5 steps--codewar刷题总结
thanks a lot for codewarRound any given number to the closest 0.5 stepI.E.solution(4.2) = 4solution(4.3) = 4.5solution(4.6) = 4.5solution(4.8) = 5Round up if number is as close to previous and next 0.5 steps.solution(4.75) == 5我的解决方案:d
2022-04-15 13:11:46
217
原创 extract file name
You have to extract a portion of the file name as follows:Assume it will start with date represented as long number Followed by an underscore You'll have then a filename with an extension it will always have an extra extension at the endInputs:123
2022-04-15 11:05:17
204
原创 python数据结构与算法,第一章练习题
##########r-1.5题a=sum([i*i for i in range(11)])print(a)这个博客权当我自己的学习记录,所以参考一些网上的代码数据结构与算法Python语言实现第一章课后习题(完整篇)_王胖子总叫我减肥的博客-优快云博客这位大牛的代码让我获益良多,感谢感谢。##########1.6# def a_add(a):# c=0# for i in range(a):# if i%2!=0:#..
2022-04-14 23:12:37
1445
原创 【无标题】Prefill an Array--codewar刷题总结
Description:Create the functionprefillthat returns an array ofnelements that all have the same valuev. See if you can do thiswithoutusing a loop.You have to validate input:vcan beanything(primitive or otherwise) ifvis ommited, fill the a...
2022-04-11 15:33:52
108
原创 IPv4 to int32-codewar刷题总结
thanks a lot for codewarDescription:Take the following IPv4 address: 128.32.10.1 This address has 4 octets where each octet is a single byte (or 8 bits).1st octet 128 has the binary representation: 10000000 2nd octet 32 has the binary representation
2022-04-11 10:52:34
308
原创 Tortoise racing---codewar刷题总结
Description:Two tortoises namedAandBmust run a race.Astarts with an average speed of720 feet per hour. YoungBknows she runs faster thanA, and furthermore has not finished her cabbage.When she starts, at last, she can see thatAhas a70 feet ...
2022-04-09 12:53:18
506
原创 The Vowel Code---codewar刷题总结
thanks a lot for codewarDescription:Step 1: Create a function called encode() to replace all the lowercase vowels in a given string with numbers according to the following pattern:a -> 1e -> 2i -> 3o -> 4u -> 5For example, enco
2022-04-06 23:16:16
124
原创 The Supermarket Queue----codewar刷题总结
thanks a lot for codewarDescription:There is a queue for the self-checkout tills at the supermarket. Your task is write a function to calculate the total time required for all the customers to check out!inputcustomers: an array of positive integers
2022-04-06 20:45:07
309
原创 Highest Rank Number in an Array__codewar刷题总结
thanks a lot for codewarDescription:Complete the method which returns the number which is most frequent in the given input array. If there is a tie for most frequent number, return the largest number among them.Note: no empty arrays will be given.E
2022-04-06 16:35:41
140
原创 Encrypt this---codewar刷题总结
Thanks a lot for CodewarDescription:Acknowledgments:I thankyvonne-liufor the idea and for the example tests :)Description:Encrypt this!You want to create secret messages which can be deciphered by theDecipher this!https://www.codewars.com/ka...
2022-04-04 21:09:37
200
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人