Blog

什么是社会心理学

Question #

什么是社会心理学?

Answer #

社会心理学是一门就人们如何看待他人,如何影响他人,又如何互相关联的种种问题进行科学研究的学科。

From #

社会心理学(戴维·迈尔斯)

Python函数的参数传递

Question #

Python 函数中参数是如何传递的?是值传递还是引用传递?

Answer #

Python 的参数传递是赋值传递 (pass by assignment),或者叫作对象的引用传递(pass by object reference)。Python 里所有的数据类型都是对象,所以参数传递时,只是让新变量与原变量指向相同的对象而已,并不存在值传递或是引用传递一说。

“Remember that arguments are passed by assignment in Python. Since assignment just creates references to objects, there’s no alias between an argument name in the caller and callee, and so no call-by-reference per Se.”

From #

16 | 值传递,引用传递or其他,Python里参数是如何传递的?

Python变量的赋值 Python通过函数修改变量值的两种方法

bc命令中的length和scale的含义分别是什么?

The length is the total number of decimal digits used by bc to represent a number. The scale is the total number of decimal digits after the decimal point. For example: .000001 has a length of 6 and scale of 6. 1935.000 has a length of 7 and a scale of 3.

converts fractional seconds to HH:MM:SS.sss

seconds2codes() (
  local seconds=$1
  local hh=$(bc <<< "scale=0; $seconds / 3600")
  local remainder=$(bc <<< "$seconds % 3600")
  local mm=$(bc <<< "scale=0; $remainder / 60")
  local ss=$(bc <<< "$remainder % 60")
  printf "%02d:%02d:%06.3f" "$hh" "$mm" "$ss"
)

entrance

操作系统 #

计算机组成 #

心理学 #

经济学 #

程序设计 #

计算机技术 #

自然科学 #

存储技术 #

分布式 #

数学 #

自我 #

人文 #

办公技术 #