09 2019 档案

摘要:docker 云主机 云主机操作 阅读全文
posted @ 2019-09-24 16:09 柠檬味呀 阅读(281) 评论(0) 推荐(0)
摘要:栈的应用 1.数制转换 十进制数N转化为r进制数 N N/r N%r 思路 N对r取模直到N/R=0 将余数从下往上写 2.栈的应用--解迷宫问题 按南东北西的优先级走 沿着某个方向走到走不下去再沿着另一个方向走 每个格子有四种可能的状态 0 1 i @ 除0外都不能走 i 表示已经在栈内的路 @ 阅读全文
posted @ 2019-09-18 16:14 柠檬味呀 阅读(253) 评论(0) 推荐(0)
摘要:http://cenalulu.github.io/linux/about-denormalized-float-number/ 一个有趣的实验 本文从一个有趣而诡异的实验开始。最早这个例子博主是从 Stackoverflow上的一个问题中看到的。为了提高可读性,博主这里做了改写,简化成了以下两段代 阅读全文
posted @ 2019-09-17 20:33 柠檬味呀 阅读(278) 评论(0) 推荐(0)
摘要:数据结构 队列 1.概念 从队尾入队 从队首出队 FIFO First in first out 2.课堂练习 用两个队列实现栈 图(1):当栈里面插入元素“abcd”的时候,元素a在栈底(最后出去),d在栈顶(最先出去); 图(2):将元素“abc”从q1中头删,然后再q2中尾插进来之后,头删q1 阅读全文
posted @ 2019-09-15 20:23 柠檬味呀 阅读(185) 评论(0) 推荐(0)
摘要:讲解链接https://blog.51cto.com/9291927/2063393 https://blog.csdn.net/hguisu/article/details/7674195 1.栈的概念 store a set of elements in a particular order L 阅读全文
posted @ 2019-09-15 10:32 柠檬味呀 阅读(153) 评论(0) 推荐(0)
摘要:算法导论 第三章 函数的增长 1.渐近紧确界 渐近记号Θ、Ο、o、Ω、ω详解 链接:https://blog.csdn.net/so_geili/article/details/53353593##目录: 1.渐近紧确界记号:Θ ΘΘ(big-theta)2.渐近上界记号 :O OO(big-oh) 阅读全文
posted @ 2019-09-14 21:22 柠檬味呀 阅读(219) 评论(0) 推荐(0)
摘要:算法导论 第二章 算法基础 1.示例 INSERTION-SORT(A) for j=2 to A.length key=A[j]//要插入的元素A[j] //insertion A[j] into sequence A[1,2,...,j-1]. i=j-1//从第j-1个元素开始逐一比对 for 阅读全文
posted @ 2019-09-14 20:54 柠檬味呀 阅读(161) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2019-09-14 18:09 柠檬味呀 阅读(18) 评论(0) 推荐(0)
摘要:/* * bitAnd - x&y using only ~ and | * Example: bitAnd(6, 5) = 4 * Legal ops: ~ | * Max ops: 8 * Rating: 1 */int bitAnd(int x, int y) { z=~(~x|~y); re 阅读全文
posted @ 2019-09-13 20:37 柠檬味呀 阅读(1034) 评论(0) 推荐(0)
摘要:冒泡排序#include <iostream>using namespace std;void bubblesort1A(int A[],int n);int main() { int A[10]={0},n=0,i=0; cin>>n; for( i=0;i<n;i++) cin>>A[i]; b 阅读全文
posted @ 2019-09-12 21:47 柠檬味呀 阅读(462) 评论(0) 推荐(0)
摘要:练习2.1320世纪70年代末至80年代末,DigitalEquipment的VAX计算机是一种非常流行的机型。它没有布尔运算AND和OR指令,仅仅有bis(位设置)和bic(位清除)这两种指令。两种指令的输入都是一个数据字x和一个掩码字m。 他们生成一个结果z。z是有依据掩码m的位来改动x的位得到 阅读全文
posted @ 2019-09-11 11:32 柠檬味呀 阅读(317) 评论(0) 推荐(0)
摘要:1.编程习惯 代码不要写中文。 只能用局部变量,不能用全局变量。 单目操作符:~按位取反 !取反 双目操作符 与 或 非 加 移位 2.复习 1.Shell 包裹内核的壳 2.Kernel 内核 每个操作系统都有一个内核 不与程序交互 function:系统调用:提供函数 e.g file open 阅读全文
posted @ 2019-09-10 16:40 柠檬味呀 阅读(166) 评论(0) 推荐(0)
摘要:int main(){ Line line(10.0); cout<<" "<<line.getLength()<<endl; line.setLength(6.0); cout<<" "<<line.getLength()<<endl; return 0;};注意主函数中需先声明line,类型为L 阅读全文
posted @ 2019-09-07 22:17 柠檬味呀 阅读(230) 评论(0) 推荐(0)
摘要:1.引用传递 #include<iostream>using namespace std;int cubeByRef( int& );int main(){ int number=5; int result; cout<<"number="<<number<<endl; result=cubeByR 阅读全文
posted @ 2019-09-05 21:47 柠檬味呀 阅读(288) 评论(0) 推荐(0)
摘要:ubuntu编写C程序 root@ :~# touch flow.croot@ :~# vim flow.croot@ :~# gcc flow.cflow.c: In function ‘main’:flow.c:5:13: warning: integer overflow in express 阅读全文
posted @ 2019-09-04 16:32 柠檬味呀 阅读(652) 评论(0) 推荐(0)
摘要:1.有CPU和内存就是计算机 2.固态硬盘SSD 持久存储 3.src是源代码 4.文件是被命名的二进制的串 5.控制台上写东西如printf 6.scanf从标准输入(键盘)来读,标准输出(显示器) 7.stdin/stdout 即stdio 8.出错时 stderror 9.r w x 可读 可 阅读全文
posted @ 2019-09-04 10:56 柠檬味呀 阅读(220) 评论(0) 推荐(0)