古语云:慈不掌兵,义不为商;离商业越近,离人性越远;我们在自学数据科学时,一定会辅助一些书籍或者视频来学习,怎么学习,选择哪些资料来学习?这时,我们都要理解好第一句话,理解不好,浪费钱是次要,重要的是还会浪费我们的时间;

对于学习数据科学这门技术来说,一切速成,都只是拔苗助长;数据分析不能速成,数据挖掘不能速成,7天,1个月,都不可能学到什么,钻研一门技术6个月,你也只能会有一点入门的感觉,而已;听上去有点荒凉是吧,可忠言逆耳;

Python仅仅是一门编程语言,以后小学都普及了,现在却被培训机构捧上了天,欲让其灭亡,必先让其膨胀,对于Python来说,这并不是什么好事,对于学习Python的人来说,这更不是什么好事,学习技术跟学武一样,要内外兼修,内功扎实才能厚积薄发;可这个浮躁的社会,要做到这点耐得住寂寞的修炼内功,不容易;人性的弱点是:急于想要得到好处与回报;

那么问题抛出来了,我们该如何学习一门技能呢,我拿Python学习举例,说说我的看法;

学习没有捷径,但一定有方法,有很多朋友问我:Python到底怎么学,要学到什么程度,在工作中才够用?今天,jacky以字符串的学习为例,谈谈Python我们到底要学到什么程度,要怎么学?

(一)入门水平

1.1入门水平我们能做什么?

  • 很遗憾的说,对于零基础的朋友来说,入门水平,只能提高我们学习Python的兴趣,仅此而已;

    • 零基础学Python的朋友,由于缺少专业背景和实操背景,仅靠短时间的自学,大部分都也只是入门水平,大家还要继续学习,不要学到这里就停下了,坚持学习,才能看到阳光;

1.2 掌握哪些知识点才算入门

  • 1) 知道字符串是干什么的?

    • 用于在程序中显示消息的(比如游戏里的”准备”和”游戏结束”这样的消息)
  • 2)知道如何创建字符串

    • 英文半角引号

      • 知道单引号,双引号,三引号的区别;
  • 3)知道如何在字符串里嵌入值

    • 占位符%s
>>>myscore = 100
>>>message='I scored %s points'
>>>print(message % myscore)
I scored 100 points
  • 4)知道字符串乘法
>>>print(10*'a')
aaaaaaaaaa

(二)初级水平

2.1 初级水平我们能做什么?

  • 做一些数据分析类的辅助工作,足够了,但是对于数据工程师或挖掘师来说,差的还太远;

    • 我们有时会自我膨胀,对于外行人可能还会炫耀一下,但是对于有经验的老手来说,初级水平离实操还有很长的一段差距

2.2 掌握哪些知识点才算初级水平

  • 掌握如下字符串功能(具体讲解见中级水平部分)

    • 移除空白

    • 分割

    • 长度

    • 索引

    • 切片

(三)中级水平

3.1 中级水平我们能做什么?

  • 中级水平,我们只能跟别人说,Python我学过;学到中级水平我们才有可能知道,原理工作中,我们要学的东西太多了,学习中的所有技巧,对于工作来说,都是最重要的技巧;积累很重要,学无止境;

3.2 中级水平我们需掌握-查看字符串的所有功能

temp = 'jacky'
help(type(temp))

功能1:capitalize(首字母大写)

def capitalize(self):  # real signature unknown; restored from __doc__
"""
S.capitalize() -> str Return a capitalized version of S, i.e. make the first character
have upper case and the rest lower case.
"""
return
# 首字母大写
# >>> a = "abel"
# >>> b = a.capitalize()
# >>> b
# 'Abel'

功能2:center(内容居中空白填充)

    def center(self, width, fillchar=None):  # real signature unknown; restored from __doc__
"""
S.center(width[, fillchar]) -> str Return S centered in a string of length width. Padding is
done using the specified fill character (default is a space)
"""
return ""
# 内容居中,width: 总长度; fillchar:空白处填充内容,默认无
# >>> a
# 'Abel'
# >>> b = a.center(20, '#')
# >>> b
# '########Abel########'

功能3:count(子序列个数)

    def count(self, sub, start=None, end=None):  # real signature unknown; restored from __doc__
"""
S.count(sub[, start[, end]]) -> int Return the number of non-overlapping occurrences of substring sub in
string S[start:end]. Optional arguments start and end are
interpreted as in slice notation.
"""
return 0
# 子序列个数
# >>> a = "Abelisgood"
# >>> b = a.count('o')
# >>> b
# 2
# >>> b = a.count('o', 0, 8)
# >>> b
# 1

功能4:endswith(判断是否以**结束)

def endswith(self, suffix, start=None, end=None):  # real signature unknown; restored from __doc__
"""
S.endswith(suffix[, start[, end]]) -> bool Return True if S ends with the specified suffix, False otherwise.
With optional start, test S beginning at that position.
With optional end, stop comparing S at that position.
suffix can also be a tuple of strings to try.
"""
return False
# 判断str是否以xxx 结束
# >>> a
# 'Abelisgood'
# >>> b = a.endswith('d')
# >>> b
# True
# >>> b = a.endswith('g', 0, 7)
# >>> b
# True

功能5:expandtabs (讲tab转换成空格)

 def expandtabs(self, tabsize=8):  # real signature unknown; restored from __doc__
"""
S.expandtabs(tabsize=8) -> str Return a copy of S where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
"""
return ""
# 将tab转换成空格,默认一个tab转换成8个空格
# >>> a = "a\tbel"
# >>> b= a.expandtabs()
# >>> b
# 'a bel'(8个空格)

功能6:find(寻找子序列位置)

 def find(self, sub, start=None, end=None):  # real signature unknown; restored from __doc__
"""
S.find(sub[, start[, end]]) -> int Return the lowest index in S where substring sub is found,
such that sub is contained within S[start:end]. Optional
arguments start and end are interpreted as in slice notation. Return -1 on failure.
"""
return 0
# 寻找子序列位置,如果没有找到,返回-1
# index没有找到,直接报错
# >>> a = "asdfjsdakfwejfi"
# >>> b = a.find('f', 0, 11)
# >>> b
# 3
# >>> b = a.find('z')
# >>> b
# -1

功能7:format(字符串格式化)

def format(self, *args, **kwargs):  # known special case of str.format
"""
S.format(*args, **kwargs) -> str Return a formatted version of S, using substitutions from args and kwargs.
The substitutions are identified by braces ('{' and '}').
"""
pass
# 字符串格式化,动态参数。可以拼接字符串。
# >>> a = "abel {0} good {1}"
# >>> b = a.format('is', 'man')
# >>> b
# 'abel is good man'
# >>>
def format_map(self, mapping): # real signature unknown; restored from __doc__
"""
S.format_map(mapping) -> str Return a formatted version of S, using substitutions from mapping.
The substitutions are identified by braces ('{' and '}').
"""
return ""

功能8:index(返回索引位置)

def index(self, sub, start=None, end=None):  # real signature unknown; restored from __doc__
"""
S.index(sub[, start[, end]]) -> int Like S.find() but raise ValueError when the substring is not found.
"""
return 0
# 返回索引位置;可先参数,start:起始位置,end:结束位置,返回一个整数类型(当字符串没有找到时,会提示报错信息)
# >>> a = "asdfjsdakfwejfi"
# >>> b = a.index('z')
# Traceback (most recent call last):
# File "<pyshell#22>", line 1, in <module>
# b = a.index('z')
# ValueError: substring not found

功能9:isalnum(字符数字组合判断)

def isalnum(self):  # real signature unknown; restored from __doc__
"""
S.isalnum() -> bool Return True if all characters in S are alphanumeric
and there is at least one character in S, False otherwise.
"""
return False
# 字符串都是字符,数字 或是字符数字组合则为True否则为False
# >>> a
# 'asdfjsdakfwejfi'
# >>> b = a.isalnum()
# >>> b
# True # >>> a = ' '
# >>> b = a.isalnum()
# >>> b
# False

功能10:isalpha(字母判定)

def isalpha(self):  # real signature unknown; restored from __doc__
"""
S.isalpha() -> bool Return True if all characters in S are alphabetic
and there is at least one character in S, False otherwise.
"""
return False
# 字符串中有一个为字母或所有都是字母都 True 否则为False
# >>> a
# 'abel20'
# >>> b = a.isalpha()
# >>> b
# False

功能11:isdecimal(十进制判定)

 def isdecimal(self):  # real signature unknown; restored from __doc__
"""
S.isdecimal() -> bool Return True if there are only decimal characters in S,
False otherwise.
"""
return False
# 如果只有十进制则返回True,否则返回False
# >>> a = 'abel20'
# >>> b = a.isdecimal()
# >>> b
# False

功能12:isdecimal(全部为数字判定)

def isdigit(self):  # real signature unknown; restored from __doc__
"""
S.isdigit() -> bool Return True if all characters in S are digits
and there is at least one character in S, False otherwise.
"""
return False
# 元素全部为数字时返回 True否则返回 False
# >>> a
# 'abel20'
# >>> b = a.isdigit()
# >>> b
# False

功能13:isidentifier(合法标识符判定)

def isidentifier(self):  # real signature unknown; restored from __doc__
"""
S.isidentifier() -> bool Return True if S is a valid identifier according
to the language definition. Use keyword.iskeyword() to test for reserved identifiers
such as "def" and "class".
"""
return False
# 判断字符串是否是合法的标识符(标识符必须合法)返回bool类型
# >>> a = '5'
# >>> b = a.isidentifier()
# >>> b
# False
# >>> a = 'abel342'
# >>> b = a.isidentifier()
# >>> b
# True

功能14:islower(小写判定)

    def islower(self):  # real signature unknown; restored from __doc__
"""
S.islower() -> bool Return True if all cased characters in S are lowercase and there is
at least one cased character in S, False otherwise.
"""
return False
# 判断字符串中字母是否都是小写,返回bool类型
# >>> a
# 'abel342'
# >>> b = a.islower()
# >>> b
# True # >>> a = 'Abel83'
# >>> b = a.islower()
# >>> b
# False

功能15:isnumeric(判断字符串中是否都是数字)

def isnumeric(self):  # real signature unknown; restored from __doc__
"""
S.isnumeric() -> bool Return True if there are only numeric characters in S,
False otherwise.
"""
return False
# 判断字符串中是否都是数字,返回bool类型
# >>> a = 'abel349'
# >>> b = a.isnumeric()
# >>> b
# False
# >>> a = '123'
# >>> b = a.isnumeric()
# >>> b
# True

功能16:isprintable(判断是不是只包含可打印字符)

    def isprintable(self):  # real signature unknown; restored from __doc__
"""
S.isprintable() -> bool Return True if all characters in S are considered
printable in repr() or S is empty, False otherwise.
"""
return False
# 判断是不是只包含可打印字符,返回Bool值
# >>> a
# '天天向上\t2016'
# >>> b = a.isprintable()
# >>> b
# False
# >>> q = 'this is test'
# >>> b = a.isprintable()
# >>> b
# False

功能17:isspace(判断是不是只包含空格字符)

 def isspace(self):  # real signature unknown; restored from __doc__
"""
S.isspace() -> bool Return True if all characters in S are whitespace
and there is at least one character in S, False otherwise.
"""
return False
# 判断是不是只包含空格字符,返回bool值

功能18:istitle(判断是不是只包含空格字符)

    def istitle(self):  # real signature unknown; restored from __doc__
"""
S.istitle() -> bool Return True if S is a titlecased string and there is at least one
character in S, i.e. upper- and titlecase characters may only
follow uncased characters and lowercase characters only cased ones.
Return False otherwise.
"""
return False
# 判断是不是每个词的首字母是不是大写,返回Bool值。一般标题会使用

功能19:isupper(判断字符串是不是都是大写)

def isupper(self):  # real signature unknown; restored from __doc__
"""
S.isupper() -> bool Return True if all cased characters in S are uppercase and there is
at least one cased character in S, False otherwise.
"""
return False
# 判断字符串是不是都是大写,返回bool值

功能20:join(返回通过指定字符分隔的新字符串)

 def join(self, iterable):  # real signature unknown; restored from __doc__
"""
S.join(iterable) -> str Return a string which is the concatenation of the strings in the
iterable. The separator between elements is S.
"""
return ""
# 返回通过指定字符分隔的新字符串
# >>> a = ['a', 'b', 'c', 'f']
# >>> b = "_".join(a)
# >>> b
# 'a_b_c_f'

功能21:ljust(左对齐,右添充)

    def ljust(self, width, fillchar=None):  # real signature unknown; restored from __doc__
"""
S.ljust(width[, fillchar]) -> str Return S left-justified in a Unicode string of length width. Padding is
done using the specified fill character (default is a space).
"""
return ""
# 左对齐,右添充,参数width 宽度(fillchar 添充字符,默认是空格)

功能22:lower(转换为小写)

def lower(self):  # real signature unknown; restored from __doc__
"""
S.lower() -> str Return a copy of the string S converted to lowercase.
"""
return ""
# 转换为小写

功能23:lstrip(删除左边的空白或自定义的字符)

def lstrip(self, chars=None):  # real signature unknown; restored from __doc__
"""
S.lstrip([chars]) -> str Return a copy of the string S with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
"""
return ""
# 删除左边的空白或自定义的字符
# >>> a = " Hi, I'm Abel"
# >>> b = a.lstrip()
# >>> b
# "Hi, I'm Abel"

功能24:maketrans(替换相应的字符)

def maketrans(self, *args, **kwargs):  # real signature unknown
"""
Return a translation table usable for str.translate(). If there is only one argument, it must be a dictionary mapping Unicode
ordinals (integers) or characters to Unicode ordinals, strings or None.
Character keys will be then converted to ordinals.
If there are two arguments, they must be strings of equal length, and
in the resulting dictionary, each character in x will be mapped to the
character at the same position in y. If there is a third argument, it
must be a string, whose characters will be mapped to None in the result.
"""
pass
# str.translate()函数配合使用,替换相应的字符

功能25:partition(拆分字符串)

def partition(self, sep):  # real signature unknown; restored from __doc__
"""
S.partition(sep) -> (head, sep, tail) Search for the separator sep in S, and return the part before it,
the separator itself, and the part after it. If the separator is not
found, return S and two empty strings.
"""
pass
# 用于拆分字符串,返回一个包含三个元素的元组;返回一个包含三个元素的元组。如果指定的字符串sep不存在,则返回自己加两个空元素。
# >>> a = "Hi, I'm abel"
# >>> b = a.partition('a')
# >>> b
# ("Hi, I'm ", 'a', 'bel')
# >>> c = a.partition('z')
# >>> c
# ("Hi, I'm abel", '', '')

功能26:replace(替换)

def replace(self, old, new, count=None):  # real signature unknown; restored from __doc__
"""
S.replace(old, new[, count]) -> str Return a copy of S with all occurrences of substring
old replaced by new. If the optional argument count is
given, only the first count occurrences are replaced.
"""
return ""
# 使用新的字符串替换老的字符串(可选参数count 指定替换的次数,默认是全部)
# >>> a = "Abelisgood"
# >>> b = a.replace('o', 'z')
# >>> b
# 'Abelisgzzd'
# >>> b = a.replace('o', 'z', 1)
# >>> b
# 'Abelisgzod'

功能27:rfind(反向查找)

def rfind(self, sub, start=None, end=None):  # real signature unknown; restored from __doc__
"""
S.rfind(sub[, start[, end]]) -> int Return the highest index in S where substring sub is found,
such that sub is contained within S[start:end]. Optional
arguments start and end are interpreted as in slice notation. Return -1 on failure.
"""
return 0
# 反向查找,与find 是相反方向

功能28:rindex(反向索引)

    def rindex(self, sub, start=None, end=None):  # real signature unknown; restored from __doc__
"""
S.rindex(sub[, start[, end]]) -> int Like S.rfind() but raise ValueError when the substring is not found.
"""
return 0
# 返回字符串所在的索引,与index 相反方向

功能29:rjust(右对齐,右填充)

def rjust(self, width, fillchar=None):  # real signature unknown; restored from __doc__
"""
S.rjust(width[, fillchar]) -> str Return S right-justified in a string of length width. Padding is
done using the specified fill character (default is a space).
"""
return ""
# 右对齐,右填充。与ljust 相反

功能30:rpartition(反向拆分)

def rpartition(self, sep):  # real signature unknown; restored from __doc__
"""
S.rpartition(sep) -> (head, sep, tail) Search for the separator sep in S, starting at the end of S, and return
the part before it, the separator itself, and the part after it. If the
separator is not found, return two empty strings and S.
"""
pass
# 拆分:与 partition相反,只不过是从字符串的右边开始拆分。

功能31:rsplit(右边拆分)

def rsplit(self, sep=None, maxsplit=-1):  # real signature unknown; restored from __doc__
"""
S.rsplit(sep=None, maxsplit=-1) -> list of strings Return a list of the words in S, using sep as the
delimiter string, starting at the end of the string and
working to the front. If maxsplit is given, at most maxsplit
splits are done. If sep is not specified, any whitespace string
is a separator.
"""
return []
# 与split类似,从右边开始拆分,返回一个列表类型,(可选参数maxsplit 每次+- 1 sep 的值默认是空格)

功能32:split(左边拆分)

def split(self, sep=None, maxsplit=-1):  # real signature unknown; restored from __doc__
"""
S.split(sep=None, maxsplit=-1) -> list of strings Return a list of the words in S, using sep as the
delimiter string. If maxsplit is given, at most maxsplit
splits are done. If sep is not specified or is None, any
whitespace string is a separator and empty strings are
removed from the result.
"""
return []
# 从左边开始拆分,返回一个列表类型,(可选参数maxsplit 每次+- 1 sep 的值默认是空格)

功能33:split(生成新列表)

    def splitlines(self, keepends=None):  # real signature unknown; restored from __doc__
"""
S.splitlines([keepends]) -> list of strings Return a list of the lines in S, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends
is given and true.
"""
return []
# 拆分多行字符串,以每行一个元素生成一个新的列表,如果是单行字符串,则返回原字符串

功能34:startswith(是否以字符串开始)

def startswith(self, prefix, start=None, end=None):  # real signature unknown; restored from __doc__
"""
S.startswith(prefix[, start[, end]]) -> bool Return True if S starts with the specified prefix, False otherwise.
With optional start, test S beginning at that position.
With optional end, stop comparing S at that position.
prefix can also be a tuple of strings to try.
"""
return False
# 是否以字符串开始(可选参数,start与end 分别代表起始和结束),返回bool值

功能35:strip(去除左边空白或自定义字符串)

def strip(self, chars=None):  # real signature unknown; restored from __doc__
"""
S.strip([chars]) -> str Return a copy of the string S with leading and trailing
whitespace removed.
If chars is given and not None, remove characters in chars instead.
"""
return ""
# 去除左边空白或自定义字符串

功能36:swapcase(把字符串的大小写字母互换输出)

 def swapcase(self):  # real signature unknown; restored from __doc__
"""
S.swapcase() -> str Return a copy of S with uppercase characters converted to lowercase
and vice versa.
"""
return ""
# 把字符串的大小写字母互换输出

功能37:title(字符串首字母大写,其他全部小写)

 def title(self):  # real signature unknown; restored from __doc__
"""
S.title() -> str Return a titlecased version of S, i.e. words start with title case
characters, all remaining cased characters have lower case.
"""
return ""
# 字符串首字母大写,其他全部小写

功能38:translate(str.maketrans()函数配合使用,替换相应的字符)

def translate(self, table):  # real signature unknown; restored from __doc__
"""
S.translate(table) -> str Return a copy of the string S in which each character has been mapped
through the given translation table. The table must implement
lookup/indexing via __getitem__, for instance a dictionary or list,
mapping Unicode ordinals to Unicode ordinals, strings, or None. If
this operation raises LookupError, the character is left untouched.
Characters mapped to None are deleted.
"""
return ""
# str.maketrans()函数配合使用,替换相应的字符

功能39:upper(全部转换为大写)

def upper(self):  # real signature unknown; restored from __doc__
"""
S.upper() -> str Return a copy of S converted to uppercase.
"""
return ""
# 与lower 相反,全部转换为大写

功能40:zfill(回一个添充的字符串)

def zfill(self, width):  # real signature unknown; restored from __doc__
"""
S.zfill(width) -> str Pad a numeric string S with zeros on the left, to fill a field
of the specified width. The string S is never truncated.
"""
return ""
# 回一个添充的字符串,width 添写长度,如果长宽和字符串相等,则直接返回字符串本身,如果长度大小字符串,则用0添充至指定的长度

以字符串为例,谈谈Python到底要学到什么程度的更多相关文章

  1. 谈谈 Python 程序的运行原理

    因为我的个人网站 restran.net 已经启用,博客园的内容已经不再更新.请访问我的个人网站获取这篇文章的最新内容,谈谈 Python 程序的运行原理 这篇文章准确说是『Python 源码剖析』的 ...

  2. Python 到底是强类型语言,还是弱类型语言?

    0.前言 我在上一篇文章中分析了 为什么 Python 没有 void 类型 的话题,在文章发布后,有读者跟我讨论起了另一个关于类型的问题,但是,我们很快就出现了重大分歧. 我们主要的分歧就在于:Py ...

  3. 【转】简单谈谈python的反射机制

    [转]简单谈谈python的反射机制 对编程语言比较熟悉的朋友,应该知道“反射”这个机制.Python作为一门动态语言,当然不会缺少这一重要功能.然而,在网络上却很少见到有详细或者深刻的剖析论文.下面 ...

  4. 简单谈谈Python中的几种常见的数据类型

    简单谈谈Python中的几种常见的数据类型 计算机顾名思义就是可以做数学计算的机器,因此,计算机程序理所当然地可以处理各种数值.但是,计算机能处理的远不止数值,还可以处理文本.图形.音频.视频.网页等 ...

  5. 通过例子学python(1)

    第一章 基础知识 1.4 数字和表达式 # -*- coding: cp936 -*- # 1.4 数字和表达式 # ** 表示幂(乘方)运算 #1.4.1 长整型数 print(9999999999 ...

  6. [WPF自定义控件库]以Button为例谈谈如何模仿Aero2主题

    1. 为什么选择Aero2 除了以外观为卖点的控件库,WPF的控件库都默认使用"素颜"的外观,然后再提供一些主题包.这样做的最大好处是可以和原生控件或其它控件库兼容,而且对于大部分 ...

  7. 谈谈python里面关于任务队列

    谈谈python里面关于任务队列 为什么要做任务队列 要回答这个问题我们首先看看在流水线上的案列,如果人的速度很慢,机器的速度比人的速度快很多,就会造成,机器生产的东西没有及时处理,越积越多,造成阻塞 ...

  8. 痞子衡嵌入式:以i.MXRT1xxx的GPIO模块为例谈谈中断处理函数(IRQHandler)的标准流程

    大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是以i.MXRT的GPIO模块为例谈谈中断处理函数(IRQHandler)的标准流程. 在痞子衡旧文 <串口(UART)自动波特率识 ...

  9. 【剑指Offer】左旋转字符串 解题报告(Python)

    [剑指Offer]左旋转字符串 解题报告(Python) 标签(空格分隔): 剑指Offer 题目地址:https://www.nowcoder.com/ta/coding-interviews 题目 ...

随机推荐

  1. ggalluvial|TCGA临床数据绘制桑基图(Sankey)

    本文首发于”生信补给站“,https://mp.weixin.qq.com/s/yhMgkST-rVD6SaQS7R-eoA 桑基图(Sankey diagram),是一种特定类型的流程图,图中延伸的 ...

  2. jvm的内存区域介绍

    什么是jvm? JVM是Java Virtual Machine(Java虚拟机)的缩写,JVM是一种用于计算设备的规范,它是一个虚构出来的计算机,是通过在实际的计算机上仿真模拟各种计算机功能来实现的 ...

  3. Trie树(字典树)-题解 P2580 【于是他错误的点名开始了】

    此题可以用STL中的map做,但是了解一下Trie树这个数据结构也是必须的. Trie树(又称字典树)有以下特点: 根节点不包含字符,除它之外的每一个节点都包含一个字符. 从根节点到某一节点,路径上经 ...

  4. kong命令(四)upstream

    介绍 upstream 就是一个虚拟的服务.可用于配置多个target目标服务时实现负载均衡的效果. 注意:service的host指的就是upstream的name. 同时upstream提供了一个 ...

  5. Java Web-JSTL

    Java Web-JSTL 概念 Java Server Pages Tag Library:JSP标准标签库 是由Apache组织提供的开源.免费JSP标签 用于简化和替换JSP页面上的Java代码 ...

  6. JS数组抽奖程序教学实例

    数组Javascript中非常重要的知识点,为了在课堂上提高学生兴趣,教学举例的选择就比较重要了. 为了提高学生兴趣,特设计一个可输入,可控制结束的,利用JS数组实现的抽奖教学实例.代码如下:

  7. laravel中引入composer安装在vendor中的第三方组件

    一.安装第三方组件 方法一:使用命令行安装第三方(已phpword为例): composer require phpoffce/phpword ^v0..* 方法二: 修改主项目composer.js ...

  8. 在浏览器输入 URL 回车之后发生了什么

    注意:本文的步骤是建立在,请求的是一个简单的 HTTP 请求,没有 HTTPS.HTTP2.最简单的 DNS.没有代理.并且服务器没有任何问题的基础上. 大致流程 URL 解析 DNS 查询 TCP ...

  9. OpenGL学习脚印: uniform blocks在着色器中的使用 转自https://blog.csdn.net/wangdingqiaoit/article/details/52717963

    写在前面 目前,我们在着色器中要传递多个uniform变量时,总是使用多个uniform,然后在主程序中设置这些变量的值:同时如果要在多个shader之间共享变量,例如投影矩阵projection和视 ...

  10. H5中的requestAnimationFrame

    这两天做一个公告展示轮播的动画,刚开始是用setinterval写的,后来发现做出来的动画效果有抖动的现象,动画不流畅,遂决定试试requestAnimationFrame,之前也只是耳闻,没有用过, ...