小编Aky*_*ian的帖子

C代码的大括号使用目的在Linux中发现(在include/linux/list.h)?

我在Linux中遇到了以下代码(include/linux/list.h).我对第713行很困惑.特别是,我不明白({n = pos-> member.next; 1;}).

花括号做什么?为什么这个陈述中有'1'?

如果有人能解释这一特定的行,我将不胜感激.注意,我不需要解释链接列表和#defines如何工作等.

704 /**
705  * hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry
706  * @pos:        the type * to use as a loop cursor.
707  * @n:          another &struct hlist_node to use as temporary storage
708  * @head:       the head for your list.
709  * @member:     the name of the hlist_node within the struct.
710  */
711 #define hlist_for_each_entry_safe(pos, n, head, member)                 \
712         for (pos = …
Run Code Online (Sandbox Code Playgroud)

c linux linked-list curly-braces

4
推荐指数
1
解决办法
327
查看次数

spin.js似乎不起作用/出现

我正在尝试使用spin.js库来显示加载动画.但是,关闭spin.js开发人员示例我似乎无法让它工作/出现; 当我在Firefox中打开我的html文件时,空div标签显而易见.

这是我的代码(spinnertest.html):

<html>
<head>
    <script src="spin.min.js">
        var opts = {
          lines: 13, // The number of lines to draw
          length: 7, // The length of each line
          width: 4, // The line thickness
          radius: 10, // The radius of the inner circle
          corners: 1, // Corner roundness (0..1)
          rotate: 0, // The rotation offset
          color: '#000', // #rgb or #rrggbb
          speed: 1, // Rounds per second
          trail: 60, // Afterglow percentage
          shadow: false, // Whether to render …
Run Code Online (Sandbox Code Playgroud)

html javascript css jquery spin.js

2
推荐指数
1
解决办法
6568
查看次数

标签 统计

c ×1

css ×1

curly-braces ×1

html ×1

javascript ×1

jquery ×1

linked-list ×1

linux ×1

spin.js ×1