日常问题日志

A: 安装ntpdate,并输入以下命令,可以解决每次开机自动更新时间问题. [S]

  • sudo apt install ntpdate
  • echo “natpdate edu.ntp.org.cn” >> /etc/profile
  • chmod +s /usr/sbin/ntpdate
  • source /etc/profile

  • 调整虚拟机设置-常规-高级里的”共享粘贴板”和”拖放”设置为”双向”. 依然无法粘贴. [F]

  • 键入命令行 VBoxClient –clipboard 开起剪切板服务. [S]
  • 将剪切板服务加入启动项,自动开启. [S] [220709]
  • echo “VBoxClient –clipboard” | sudo tee -a /etc/profile [More Q4]
  • Ctrl + Shift + v 粘贴操作在 terminal 中已可将 windows 下复制网址进行粘贴.

  • 如果之后还是会出现无法复制情况,按下列命令键入. [S] *[220709]

apt-get remove -y virtualbox-guest-x11
apt-get remove -y virtualbox-guest-dkms
apt-get remove -y virtualbox-guest-utils
reboot
wget https://download.virtualbox.org/virtualbox/6.1.2/VBoxGuestAdditions_6.1.2.iso
mkdir /media/iso
mount VBoxGuestAdditions_6.1.2.iso /media/iso -o loop
/media/iso/VBoxLinuxAdditions.run
yes
reboot
  • staging helps you split up one large change into multiple commit.

  • staging helps in reviewing changes.

  • staging helps when a merge has conflicts.

  • staging helps you keep extra local files hanging around.

  • staging helps you sneak in small changes.

  • 例如问题 -bash: /etc/profile: Permission denied.

  • The redirection of the output is not performed by sudo.

  • 进入 ~/.bashrc 里对 PS1 进行编辑,退出后利用 source ~/.bashrc 重新加载. [S]

  • PS1颜色的设置格式: [ \033[ @m \ ]. 其中 @ 代表颜色值,如浅绿 1;32, 浅红 1;31.

A: /usr/include/x86_64-linux-gnu/bits/sigstack.h

  • define SIGSTKSZ 8192.

  • In Ubuntu this man page belongs to manpages-dev package.

  • sudo apt-get install manpages manpages-dev manpages-posix manpages-posix-dev.

A: 关键命令

  • Check for existing SSH Key: ls -al ~/.ssh.

  • Generate new SSH Key: ssh-keygen -t ed25519 -C “your_email@example.com”

  • Adding SSH Key to the ssh-agent: ssh-add ~/.ssh/id_rsa.

  • Copy the SSH public key to github account: cat ~/.ssh/id_rsa.pub.

  • Test SSH connection: ssh -T git@github.com.

A: A segmentation fault ( SEGFAULT ) occurs when you are trying to access memory which you should not be trying to access ( the memory which you have not allocated ) .

  • Writing to read-only memory rasies a segmentation fault.

  • Out of array range: Core Dump.

  • Global variable and local variable use the same name.

[220914]
* When dereferencing a NULL pointer.

  • When dereferencing an uninitialized or dangling pointer.

  • When you get a Buffer Overflow.

  • when you get a Stack Overflow.

  • When you try to change the value of a variable marked as const using pointers.

  • When you try to access free’d memory.

[S] [221120]
* 使用gdb调试找出问题程序行.

  • Both exit(0) and exit(1) are jump statments and are used to terminate the program.

And both report the status of termination of the program to the operating system.

  • exit(0) define the clean exit without any error in the program.

  • exit(1) means that it is an abnormal or unsuccessful termianation of the program.

A: Tabular plugin

  • In Ubuntu 16.10, has enabled “–enable-default-pie” option by default.

  • specify “-no-pie” option during link stage of generating final executable binary.

  • the linker needs the library file to find the actual code to link into your program.

  • gcc hello1.c -o hello1 -lcurses. ( “-l”+”header” )

  • attempts to write to an uninitialised pointer.

Original: https://www.cnblogs.com/Dy2MoRaw/p/16457298.html
Author: Dy2MoRaw
Title: 日常问题日志

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/583794/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

  • [洛谷P3961,TJOI2013]黄金矿工题解

    这无疑是一个分组背包问题,斜率是分组的依据,组内物品则是这个斜率下金块的价值与重量的前缀和。 发现很多人的都是用的double储存斜率,其实我们可以用分数的方法保存,这就需要一个g…

    数据结构和算法 2023年6月7日
    076
  • 第一百零一篇:DOM节点类型

    好家伙, DOM DOM是javascript操作网页的接口,全称为文档对象模型(Document Object Model)。它的作用是将网页转为一个javascript对象, …

    数据结构和算法 2023年6月12日
    080
  • MoCo阅读

    引言 基于负例对比学习:Moco MocoV2 MocoV3 SimCLR SimCLRV2 基于聚类的对比学习:以SwAV为代表,也是上下分支对称结构。 使用正例:其中一个代表模…

    数据结构和算法 2023年6月12日
    080
  • 【游记】CSP 2021 J2

    这次是第一次参加CSP的复赛,所以考的就很LJ。 (DAY-\infty) 到 (DAY-14) 知道了自己苟过了初赛,像个SB一样。(我初赛66分,旁边那位63.5,cao着线过…

    数据结构和算法 2023年6月8日
    086
  • PAT (Basic Level) Practice (中文)–1009.说反话 Python3

    给定一句英语,要求你编写程序,将句中所有单词的顺序颠倒输出。 输入格式:测试输入包含一个测试用例,在一行内给出总长度不超过 80 的字符串。字符串由若干单词和若干空格组成,其中单词…

    数据结构和算法 2023年6月7日
    070
  • [LC793]阶乘函数后 K 个零

    题目描述 f(x) 是 x! 末尾是 0 的数量。(回想一下 x! = 1 * 2 * 3 * … * x,且 0! = 1 )例如, f(3) = 0 ,因为 3! …

    数据结构和算法 2023年6月8日
    090
  • 打印数组的所有子集

    打印数组的所有子集 作者:Grey 原文地址: 博客园:打印数组的所有子集 CSDN:打印数组的所有子集 无重复值情况 题目描述见: LeetCode 78. Subsets 主要…

    数据结构和算法 2023年6月12日
    088
  • CSP-S2021江西自评分数(10-26)

    娱乐性质,不负责任 在机房大佬的努力下,评测完了 总表 姓名 编号 总分 airport bracket palin traffic JX-00001 JX-00001 0 0 0…

    数据结构和算法 2023年6月7日
    0100
  • elasticsearch为什么比mysql快

    mysql关系型数据库索引原理 数据库的索引是B+tree结构 主键是聚合索引 其他索引是非聚合索引,先从非聚合索引找,见下图 elasticsearch倒排索引原理 两者对比 对…

    数据结构和算法 2023年6月7日
    079
  • 特殊数表

    来自 command_block,为了适应 cnblogs 做了一些改动 . 以下是原文: 包括负数的二项式系数 (杨辉三角) ( \def\tinyS #1#2{\tiny\be…

    数据结构和算法 2023年6月7日
    085
  • 费解的开关

    这种题较少见也较难想 按一个开关,会影响上下左右四个方向的数 先可以考虑,只有一排灯的情况 那么一排灯的情况,只有32种按法即(2^5)次,可以用(1~32)每个数的二进制数表示方…

    数据结构和算法 2023年6月7日
    081
  • Java图形界面(2)按钮类

    1 import javax.swing.*; 2 public class Test2 extends JFrame { 3 4 public static void main(…

    数据结构和算法 2023年6月7日
    089
  • Redis与Python进行交互

    安装包 安装Redis的有3种方式https://github.com/andymccurdy/redis-py 第一种:进⼊虚拟环境,联⽹安装包redis pip install…

    数据结构和算法 2023年6月7日
    084
  • Leetcode 189 轮转数组

    题目描述如下: 给你一个数组,将数组中的元素向右轮转 k个位置,其中 k是非负数。 示例 1: <strong>&#x8F93;&#x5165;:&lt…

    数据结构和算法 2023年6月12日
    071
  • 数据库索引的基石—-B树

    数据结构相对来说比较枯燥, 我尽量用最易懂的话,来把B树讲清楚。学过数据结构的人都接触过一个概念—-二叉树。简单来说,就是每个父节点最多有两个子节点。为了在二叉树上更快…

    数据结构和算法 2023年6月8日
    082
  • 前端动画实现以及原理浅析

    背景 如今的前端是一个涉猎领域很广的职业。作为一名前端,我们不仅要开发管理系统、数据中台、还要应对年报开发、节日活动等场景。不仅要会增删改查,编写表单,还要具备开发动画、H5 游戏…

    数据结构和算法 2023年6月12日
    094
亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球