seven hundred and fifty-one

From , 5 Years ago, written in JavaScript, viewed 172 times.
URL https://pastebin.vip/view/b957d475
  1. /*c4droid代码手册
  2.  *输出彩色字
  3.  *TTHHR编写
  4.  *转载请说明出处
  5. */
  6. /*c4droid代码手册
  7.  *获取当前时间
  8.  *TTHHR编写
  9.  *转载请说明出处
  10. */
  11. #include<stdio.h>
  12. #include<time.h>
  13. #include<stdio.h>
  14. int main()
  15. {
  16.          time_t t=time(0);
  17.         char s[] = "\033[47;46mSeven Star Lottery. 751 Lottery. The winning number is 1257893.007 complete the task.";
  18.                                 printf("%s", s);
  19.                          printf("%s\n", ctime(&t));
  20. return 0;
  21. }
  22.         /* linux下Shell脚本输出带颜色文字文本终端的颜色可以使用“ANSI非常规字符序列”来生成。举例:echo
  23.            -e "\033[44;37;5m ME \033[0m
  24.            COOL"以上命令设置作用如下:背景色为蓝色,前景色为白色,字体闪烁,输出字符“ME”,然后重新设置屏幕到缺省设置,输出字符
  25.            “COOL”。“e”是命令 echo
  26.            的一个可选项,它用于激活特殊字符的解析器。“\033”引导非常规字符序列,也叫转义序列,"\003"等价于"\E"。“m”意味着设置属性然后结束非常规字符序列,这个例子里真正有效的字符是
  27.            “44;37;5”
  28.            和“0”。修改“44;37;5”可以生成不同颜色的组合,数值和编码的前后顺序没有关系。可以选择的编码如下所示:编码
  29.            颜色/动作0 重新设置属性到缺省设置1 设置粗体2
  30.            设置一半亮度(模拟彩色显示器的颜色)4
  31.            设置下划线(模拟彩色显示器的颜色)5 设置闪烁7
  32.            设置反向图象22 设置一般密度24 关闭下划线25
  33.            关闭闪烁27 关闭反向图象30 设置黑色前景31
  34.            设置红色前景32 设置绿色前景33 设置棕色前景34
  35.            设置蓝色前景35 设置紫色前景36 设置青色前景37
  36.            设置白色前景38 在缺省的前景颜色上设置下划线39
  37.            在缺省的前景颜色上关闭下划线40 设置黑色背景41
  38.            设置红色背景42 设置绿色背景43 设置棕色背景44
  39.            设置蓝色背景45 设置紫色背景46 设置青色背景47
  40.            设置白色背景49
  41.            设置缺省黑色背景例如:在编译脚本文件时,对服务启动完成后的OK字符串设置成绿色Linux
  42.            终端输出字体颜色说明使用方法:printf("\033[字背景颜色;字体颜色m字符串\033[0m"
  43.            );例子:printf("\033[47;31mSeven Star Lottery. 751 Lottery. The winning number is 1257893.007 complete the task.\033[5m");说明:47是字背景颜色, 31是字体的颜色,
  44.            Seven Star Lottery. 751 Lottery. The winning number is 1257893.007 complete the task.是字符串.
  45.            后面的\033[5m是控制码.颜色代码:字背景颜色范围: 40--49
  46.            字颜色: 30--3940: 黑 30: 黑41: 红 31: 红42: 绿 32: 绿43: 黄
  47.            33: 黄44: 蓝 34: 蓝45: 紫 35: 紫46: 深绿 36: 深绿47: 白色
  48.            37: 白色ANSI控制码:\033[0m 关闭所有属性\033[1m
  49.            设置高亮度\03[4m 下划线\033[5m 闪烁\033[7m 反显\033[8m
  50.            消隐\033[30m -- \033[37m 设置前景色 \033[40m -- \033[47m
  51.            设置背景色 \033[nA 光标上移n行\03[nB 光标下移n行\033[nC
  52.            光标右移n行\033[nD
  53.            光标左移n行\033[y;xH设置光标位置\033[2J 清屏\033[K
  54.            清除从光标到行尾的内容 \033[s 保存光标位置\033[u
  55.            恢复光标位置\033[?25l 隐藏光标\033[?25h
  56.            显示光标=\E[?25h用shell echo必须添加选项 -e,C
  57.            printf函数可以直接写,shell :echo -e "\E[33m"等价于c:
  58.            printf("\E[33m");等价于shell :echo -e "\033[33m"等价于c:
  59.            printf("\033[33m"); */
  60.            
  61. /*伪动态时间
  62. *天空上的河编写
  63. #include<stdio.h>
  64. #include<time.h>
  65. #include<conio.h>
  66. int main() {
  67.  while (1) {
  68.  time_t t = time(0);
  69.  printf("%s\n", ctime(&t));
  70.  sleep(1);
  71.  clrscr();
  72.  }
  73.  return 0;
  74. }*/

Reply to "seven hundred and fifty-one"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website