kindring 1 year ago
parent
commit
167d6ce7f1
3 changed files with 55 additions and 0 deletions
  1. 16 0
      C与C++/c中基础函数用法.md
  2. 5 0
      linux/scp操作.md
  3. 34 0
      vue/vue2_slot.md

+ 16 - 0
C与C++/c中基础函数用法.md

@@ -46,3 +46,19 @@ int snprintf( char *buffer, size_t buf_size, const char *format, ... );//可变
   - %d: 十进制整数
   - %d: 十进制整数
   - %f: 浮点数
   - %f: 浮点数
   - %x: 十六进制整数
   - %x: 十六进制整数
+
+
+## `memcpy` 函数
+### 作用
+> En  
+> Copies count bytes from the object pointed to by src to the object pointed to by dest. Both objects are reinterpreted as arrays of unsigned char. If the objects overlap, the behavior is undefined. If either dest or src is a potentially-overlapping subobject (e.g., a field in a C-compatible struct) or is not TriviallyCopyable (e.g., scalar, C-compatible struct, or an array thereof), the behavior is undefined. If count is zero, the function does nothing.
+> Ch
+> 将src指向的对象的count个字节复制到dest指向的对象。两个对象都被重新解释为无符号字符数组。如果对象重叠,则行为是未定义的。如果dest或src是潜在重叠的子对象(例如,C兼容结构中的字段)或不是TriviallyCopyable(例如,标量,C兼容结构或其数组),则行为是未定义的。如果count为零,则函数不执行任何操作。
+
+### 语法
+```c++
+void *memcpy(void *dest, const void *src, size_t count);
+```
+
+### 参数
+

+ 5 - 0
linux/scp操作.md

@@ -20,3 +20,8 @@ scp -r username@remotehost:/remote_dir /local_dir
 * -r:递归复制整个目录
 * -r:递归复制整个目录
 * /remote_dir:远程主机目录路径
 * /remote_dir:远程主机目录路径
 * /local_dir:本地目录路径
 * /local_dir:本地目录路径
+### 指定端口
+#### 命令列子
+```bash
+scp -P port username@remotehost:/remote_dir /local_dir
+```

+ 34 - 0
vue/vue2_slot.md

@@ -0,0 +1,34 @@
+# vue2 中使用 slot 插槽
+## `#d`什么是slot
+用于在组件中预留位置,在组件被使用的时候,可以在使用组件的地方将内容放置组件内
+
+## `#e` 文本替换
+> 下面示例用于在啊`link.vue`中预留一个插槽,  
+> 用于在被 test.vue 使用的时候插入一张图片
+> 只提供template内的内容
+
+### 文件结构
+link.vue
+```vue
+<a>
+link.vue>>
+<slot></slot>
+</a>
+```
+
+test.vue
+```vue
+<link>
+_helloWord
+<img src="" alt=""/>
+</link>
+```
+
+### 结果
+在渲染test.vue后,其中的内容将变成下面的html结构
+```html
+link.vue_helloWord<img>
+```
+
+
+## `#d`