avatar
Articles
159
Tags
23
Categories
4
Home
Tags
Ferry's blog
Search
Home
Tags

Ferry's blog

data lab
Updated2022-05-22|csapp
Confusionlogical operators ||, &&, !, which treat any nonzero argument as representing TRUE and argument 0 as representing FALSE. And then they return either 1 or 0, indicating a result of either TRUE or FALSE, respectively. A second important distinction between the logical operators ‘&&’ and ‘||’versus their bit-level counterparts ‘&’ and ‘|’ is that the logical operators do notevaluate their second argument if the result of the expression can be determinedby...
csapp lab environment
Updated2022-05-22|csapp
12apt-get install build-essentialsudo apt-get install gcc-multilib g++-multilib 阅读bits.c的注释与代码 修改它 命令行运行./dlc -e bits.c查看自己用了多少操作符,以及是否有代码风格问题 运行make clean && make btest编译文件 运行./btest检查自己是否做对了 return 1 直到全部做完 最终运行./driver.pl获得打分 共享文件夹: /mnt/hgfs/
PATH环境变量不见了
Updated2022-05-22|Q&A
Windows下的PATH环境变量不知被哪门子清理软件给清掉了。所以我们New一个PATH variable value: 1%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
关于二维数组名和指针的指针
Updated2022-05-22|c
我们来看一段代码 12345678void f(int **a){}int main(){ int a[2][2]; f(a);} 这个代码是会报错的,error: cannot convert 'int (*)[2]' to 'int**' 很明显,二维数组名不是指向指针的指针(int **),而是一个指向数组的指针int (*)[2] 如果非要用指针的指针,可以这样 1234567int c[3]={1,2,2};int d[3]={4,5,6};int **aa = new int *[2];*(a)=c;*(a+1)=d;
Representing and Manipulating Information
Updated2022-05-22|csapp
PrefaceModern computers store and process information represented as two-valued signals. Binary values work better when building machines that store and process information. How many sizes to store? A machine-level program views memory as a very large array of bytes, referred to as virtual memory. Rather than accessing individual bit in memory, most computers use blocks of 8 bits, or byte, as the smallest addressable unit of memory. Every byte of memory is identified by a unique number,...
函数的调用问题
Updated2022-05-22|fatal
Synopsis先来看两个错误 报错 'insertList' was not declared in this...
linux上配置v2ray
Updated2022-05-22|linux
预备工作 客户端:Qv2ray-refs.tags.v1.99.6-linux.AppImage v2ray核心文件:v2ray-linux-64 开始 将v2ray的zip文件unzip解压。 运行客户端sudo chmod +x ./Qv2ray-refs.tags.v1.99.6-linux.AppImage + ./Qv2ray-refs.tags.v1.99.6-linux.AppImage 在preferences中配置v2ray的core executable path(可执行文件)和v2ray assets directory(解压出来的目录) set system proxy 设置subscriptions Connect and enjoy!
可迭代的背包Bag
Updated2022-05-22|algorithm
Introduction 在集合数据类型中实现可迭代,需要引入Iterator接口(可迭代的接口)。import java.util.Iterator 在类声明中添加implements Iterable<Item>(表面该类将会提供一个iterator()方法) 该方法会返回一个Iterator对象,保证该类会实现方法hasNext(), next(), remove() <- 循环链表的方法 12public Iterator<Item> iterator() { return new ListIterator(); 123456789101112private class ListIterator implements Iterator<Item> { private Node current = first; public boolean hasNext() { return current != null; } public...
Queue队列
Updated2022-05-22|algorithm
Introduction 实例变量:指向队头的first, 指向队尾的last, 节点个数N 方法:添加到对尾enqueue(),删除对头dequeue() DetailNode12345private class Node{ Item item; Node next;} enqueue() 如果链表为空,则要给first变量赋值(指向last) 123456789101112public void enqueue(Item item){ Node oldlast = last; last = new Node(); last.item = item; last.next = null; if(isEmpty()) //考虑极端情况 first = last; else oldlast.next = last; N++;} dequeue()123456789public Item dequeue(){ Item item...
栈的链表实现
Updated2022-05-22|algorithm
Introductionjava中链表的实现,除了不需要释放没用的结点之外,与C的实现相同。 Detail用嵌套类来声明结点。 需要表明next(下一结点)和item(该节点的值)。在需要使用该类的时候,标记为private 1234private class Node{ Item item; Node next;} 构造链表 根据递归的定义,只要一个Node类型就能表示整条链表因为节点就是一个对象,我们就用new来创建它,Node first = new Node();。 然后,再定义Node里面的值,first.item = "to" first.next = second 而Stack类的实例变量就是创建Node的引用,然后再从实例中创建它 123public class Stack<Item>{ private Node first; //实例变量创建引用,没有用new新建对象 private int...
1…789…16
avatar
FerryChan
Articles
159
Tags
23
Categories
4
Follow Me
Recent Posts
js tutorial2025-07-18
JS逆向2025-07-08
正则表达式2025-07-08
python模拟ajax请求2025-07-02
A Django Project2025-06-16
Tags
JavaScript DS git AI sql c python swing scrapy project csapp vue blog English algorithm fatal Q&A java django cpp linux scrape css
Archives
  • July 2025 4
  • June 2025 1
  • February 2025 9
  • March 2023 3
  • February 2023 3
  • May 2022 1
  • February 2022 4
  • January 2022 10
Website Info
Article Count :
159
Unique Visitors :
Page Views :
Last Update :
Framework Hexo|Theme Butterfly
Search
Loading Database