更改Google Chrome 用户文件存储目录User Data 最简单方法
当前位置正文更改Google Chrome 用户文件存储目录User Data 最简单方法 1.在你想要存放数据的盘符下创建文件夹,假设为E:\Google\Chrome 2.把已经存在的User Data数据复制到E:\Google\Chrome中 3.开始->附件->命令提示符(右键以管理员身份运行) 4.输入CD C:\Users\你的用户名\AppData\Local\Google\Chrome 5.输入RMDIR /S “User Data”,提示是否删除输入Y 6.输入MKLINK /J “User Data” “E:\Google\Chrome” 7.重启浏览器,大功告成。
a16z领投3000万美元的去中心化社交协议Farcaster教程
Step 1: 设置环境在编写代码之前,您需要设置一个 Node.js 环境,推荐使用 replit ,它是一个基于 IDE 进行编程的浏览器。 1.在 repli 上注册一个免费帐户并登录; 2.点击左上角的create创建;3.出现提示时选择 Node.js,然后点击Create Repl。还需要一个以太坊节点来与 Facaster Registry 合约对话。 建议使用 Alchemy 。 如果您是第一次注册,以下步骤可能会略有不同: 1.注册 Alchemy.com ,并登录。2.选择以太坊作为区块链,点击get started。3.team name和app name随便取,网络选择Rinkeby,点击Create APP。4.选择第一个免费的,点击continue。5.点击跳过。6.继续点击跳过。7.点击continue。8.随便输入什么,点击let‘s go。9.点击view details。10.点击view key。11.找到HTTP的URL,复制v2/后面那部分代码,将其保存在某个地方。12.切换回 Replit 并转到右侧窗格中的 Shell 选项卡并运行以...
更改Google Chrome 用户文件存储目录User Data 最简单方法
当前位置正文更改Google Chrome 用户文件存储目录User Data 最简单方法 1.在你想要存放数据的盘符下创建文件夹,假设为E:\Google\Chrome 2.把已经存在的User Data数据复制到E:\Google\Chrome中 3.开始->附件->命令提示符(右键以管理员身份运行) 4.输入CD C:\Users\你的用户名\AppData\Local\Google\Chrome 5.输入RMDIR /S “User Data”,提示是否删除输入Y 6.输入MKLINK /J “User Data” “E:\Google\Chrome” 7.重启浏览器,大功告成。
a16z领投3000万美元的去中心化社交协议Farcaster教程
Step 1: 设置环境在编写代码之前,您需要设置一个 Node.js 环境,推荐使用 replit ,它是一个基于 IDE 进行编程的浏览器。 1.在 repli 上注册一个免费帐户并登录; 2.点击左上角的create创建;3.出现提示时选择 Node.js,然后点击Create Repl。还需要一个以太坊节点来与 Facaster Registry 合约对话。 建议使用 Alchemy 。 如果您是第一次注册,以下步骤可能会略有不同: 1.注册 Alchemy.com ,并登录。2.选择以太坊作为区块链,点击get started。3.team name和app name随便取,网络选择Rinkeby,点击Create APP。4.选择第一个免费的,点击continue。5.点击跳过。6.继续点击跳过。7.点击continue。8.随便输入什么,点击let‘s go。9.点击view details。10.点击view key。11.找到HTTP的URL,复制v2/后面那部分代码,将其保存在某个地方。12.切换回 Replit 并转到右侧窗格中的 Shell 选项卡并运行以...

Subscribe to andrecronje

Subscribe to andrecronje
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers
估值102亿融资5.45亿的Alchemy 项目,大学每周任务逐步开始。持有大学生早期卡的地址可以进入以下官网,开始大学生活:
官方大佬的 lens ,可以关注下:
1: Base Case
查看要求,做一个阶乘函数,阶乘是一个整数乘以它下面的每个正整数:

输入:
function factorial(n) {
if (n === 1) {
return 1;
}
}
module.exports = factorial;
点击运行。
2: Second Case
查看要求:

输入:
function factorial(n) {
if (n === 1) {
return 1;
}
if (n === 2) {
return 2 * 1;
}
}
module.exports = factorial;
点击运行。
3: Recursion
查看要求:

输入:
function factorial(n) {
if (n === 1) {
return 1;
}
return n * factorial(n - 1);
}
module.exports = factorial;
点击运行。
4: Walk
查看要求:

输入:
function walk(node) {
if (! node.next) {
return node;
}
}
module.exports = walk;
点击运行。
5: Walk Recursive
查看要求:

输入:
function walk(node) {
if (node.next) {
return walk(node.next);
} else {
return node;
}
}
module.exports = walk;
点击运行。
1: Push & Pop
查看要求:

输入:
const { MAX_STACK_SIZE } = require('./config');
class Stack {
constructor() {
this.items = [];
}
push(item) {
this.items.push(item);
}
pop() {
return this.items.pop();
}
isEmpty() {
}
peek() {
}
}
module.exports = Stack;
点击运行。
2: Overflow & Underflow
查看要求:

输入:
const { MAX_STACK_SIZE } = require('./config');
class Stack {
constructor() {
this.items = [];
}
push(item) {
if (this.items.length >= MAX_STACK_SIZE) {
throw new Error("size Overflow error");
}
this.items.push(item);
}
pop() {
if (this.items.length === 0) {
throw new Error("0 item error");
}
return this.items.pop();
}
isEmpty() {
}
peek() {
}
}
module.exports = Stack;
点击运行。
3: IsEmpty & Peek
查看要求:

输入:
const { MAX_STACK_SIZE } = require('./config');
class Stack {
constructor() {
this.items = [];
}
push(item) {
if (this.items.length >= MAX_STACK_SIZE) {
throw new Error("size Overflow error");
}
this.items.push(item);
}
pop() {
if (this.items.length === 0) {
throw new Error("0 item error");
}
return this.items.pop();
}
isEmpty() {
return (this.items.length === 0);
}
peek() {
if (this.isEmpty()) {
return;
}
return this.items[this.items.length - 1];
}
}
module.exports = Stack;
点击运行。
4: Operations Manager
查看要求:

输入:
const Stack = require('./Stack');
class OperationManager {
constructor() {
this.operations = new Stack();
this.undos = new Stack();
}
addOperation(operation) {
this.operations.push(operation);
}
undo() {
}
redo() {
}
redoAll() {
}
}
module.exports = OperationManager;
点击运行。
5: Undo & Redo
查看要求:

输入:
const Stack = require('./Stack');
class OperationManager {
constructor() {
this.operations = new Stack();
this.undos = new Stack();
}
addOperation(operation) {
this.operations.push(operation);
}
undo() {
this.undos.push(this.operations.pop());
}
redo() {
this.operations.push(this.undos.pop());
}
redoAll() {
}
}
module.exports = OperationManager;
点击运行。
6: Redo All
查看要求:

输入:
const Stack = require('./Stack');
class OperationManager {
constructor() {
this.operations = new Stack();
this.undos = new Stack();
}
addOperation(operation) {
this.operations.push(operation);
}
undo() {
this.undos.push(this.operations.pop());
}
redo() {
this.operations.push(this.undos.pop());
}
redoAll() {
while (! this.undos.isEmpty()) {
this.operations.push(this.undos.pop());
}
}
}
module.exports = OperationManager;
点击运行。
1: Node
查看要求:

输入:
class Node {
constructor(data) {
this.data = data;
this.next = null;
}
}
module.exports = Node;
点击运行。
2: Linked List
查看要求:

输入:
class LinkedList {
constructor() {
this.head = null;
}
}
module.exports = LinkedList;
点击运行。
3: Add First
查看要求:

输入:
class LinkedList {
constructor() {
this.head = null;
}
addFirst(node) {
node.next = this.head;
this.head = node;
}
}
module.exports = LinkedList;
点击运行。
4: Add Last
查看要求:

class LinkedList {
constructor() {
this.head = null;
}
addFirst(node) {
node.next = this.head;
this.head = node;
}
addLast(node) {
if (this.head === null) {
this.head = node;
return;
}
let last = this.head;
while(last.next !== null) {
last = last.next;
}
last.next = node;
}
}
module.exports = LinkedList;
点击运行。
5: Index Of
查看要求:

点击运行。
class LinkedList {
constructor() {
this.head = null;
}
addFirst(node) {
node.next = this.head;
this.head = node;
}
addLast(node) {
if (this.head === null) {
this.head = node;
return;
}
let last = this.head;
while(last.next !== null) {
last = last.next;
}
last.next = node;
}
indexOf(node){
let i = 0;
for (let p = this.head; p !== null; p = p.next) {
if (node === p) {
return i;
}
i = i + 1;
}
return -1;
}
}
module.exports = LinkedList;
点击运行。
6: Remove At
查看要求:

输入:
class LinkedList {
constructor() {
this.head = null;
}
addFirst(node) {
node.next = this.head;
this.head = node;
}
addLast(node) {
if (this.head === null) {
this.head = node;
return;
}
let last = this.head;
while(last.next !== null) {
last = last.next;
}
last.next = node;
}
indexOf(node){
let i = 0;
for (let p = this.head; p !== null; p = p.next) {
if (node === p) {
return i;
}
i = i + 1;
}
return -1;
}
removeAt(index) {
if (this.head === null) {
return;
}
if (index === 0) {
this.head = this.head.next;
return;
}
let i = 1;
let p = this.head;
let n = this.head.next;
while(n) {
if (i === index) {
p.next = n.next;
return;
}
p = p.next;
n = n.next;
i++;
}
}
}
module.exports = LinkedList;
点击运行。
1: Deep Retrieval
查看要求:

输入:
// retrieve a prop that is deeply nested within objects
// i.e. { prop: { prop: { prop: 3 }}} => 3
function deepRetrieval(obj) {
if ("object" === typeof(obj.prop)) {
return deepRetrieval(obj.prop);
}
return obj.prop;
}
module.exports = deepRetrieval;
点击运行。
以上,第二周的课程学习结束。
未完待续……
了解更多,请关注作者:https://twitter.com/bitc2024
估值102亿融资5.45亿的Alchemy 项目,大学每周任务逐步开始。持有大学生早期卡的地址可以进入以下官网,开始大学生活:
官方大佬的 lens ,可以关注下:
1: Base Case
查看要求,做一个阶乘函数,阶乘是一个整数乘以它下面的每个正整数:

输入:
function factorial(n) {
if (n === 1) {
return 1;
}
}
module.exports = factorial;
点击运行。
2: Second Case
查看要求:

输入:
function factorial(n) {
if (n === 1) {
return 1;
}
if (n === 2) {
return 2 * 1;
}
}
module.exports = factorial;
点击运行。
3: Recursion
查看要求:

输入:
function factorial(n) {
if (n === 1) {
return 1;
}
return n * factorial(n - 1);
}
module.exports = factorial;
点击运行。
4: Walk
查看要求:

输入:
function walk(node) {
if (! node.next) {
return node;
}
}
module.exports = walk;
点击运行。
5: Walk Recursive
查看要求:

输入:
function walk(node) {
if (node.next) {
return walk(node.next);
} else {
return node;
}
}
module.exports = walk;
点击运行。
1: Push & Pop
查看要求:

输入:
const { MAX_STACK_SIZE } = require('./config');
class Stack {
constructor() {
this.items = [];
}
push(item) {
this.items.push(item);
}
pop() {
return this.items.pop();
}
isEmpty() {
}
peek() {
}
}
module.exports = Stack;
点击运行。
2: Overflow & Underflow
查看要求:

输入:
const { MAX_STACK_SIZE } = require('./config');
class Stack {
constructor() {
this.items = [];
}
push(item) {
if (this.items.length >= MAX_STACK_SIZE) {
throw new Error("size Overflow error");
}
this.items.push(item);
}
pop() {
if (this.items.length === 0) {
throw new Error("0 item error");
}
return this.items.pop();
}
isEmpty() {
}
peek() {
}
}
module.exports = Stack;
点击运行。
3: IsEmpty & Peek
查看要求:

输入:
const { MAX_STACK_SIZE } = require('./config');
class Stack {
constructor() {
this.items = [];
}
push(item) {
if (this.items.length >= MAX_STACK_SIZE) {
throw new Error("size Overflow error");
}
this.items.push(item);
}
pop() {
if (this.items.length === 0) {
throw new Error("0 item error");
}
return this.items.pop();
}
isEmpty() {
return (this.items.length === 0);
}
peek() {
if (this.isEmpty()) {
return;
}
return this.items[this.items.length - 1];
}
}
module.exports = Stack;
点击运行。
4: Operations Manager
查看要求:

输入:
const Stack = require('./Stack');
class OperationManager {
constructor() {
this.operations = new Stack();
this.undos = new Stack();
}
addOperation(operation) {
this.operations.push(operation);
}
undo() {
}
redo() {
}
redoAll() {
}
}
module.exports = OperationManager;
点击运行。
5: Undo & Redo
查看要求:

输入:
const Stack = require('./Stack');
class OperationManager {
constructor() {
this.operations = new Stack();
this.undos = new Stack();
}
addOperation(operation) {
this.operations.push(operation);
}
undo() {
this.undos.push(this.operations.pop());
}
redo() {
this.operations.push(this.undos.pop());
}
redoAll() {
}
}
module.exports = OperationManager;
点击运行。
6: Redo All
查看要求:

输入:
const Stack = require('./Stack');
class OperationManager {
constructor() {
this.operations = new Stack();
this.undos = new Stack();
}
addOperation(operation) {
this.operations.push(operation);
}
undo() {
this.undos.push(this.operations.pop());
}
redo() {
this.operations.push(this.undos.pop());
}
redoAll() {
while (! this.undos.isEmpty()) {
this.operations.push(this.undos.pop());
}
}
}
module.exports = OperationManager;
点击运行。
1: Node
查看要求:

输入:
class Node {
constructor(data) {
this.data = data;
this.next = null;
}
}
module.exports = Node;
点击运行。
2: Linked List
查看要求:

输入:
class LinkedList {
constructor() {
this.head = null;
}
}
module.exports = LinkedList;
点击运行。
3: Add First
查看要求:

输入:
class LinkedList {
constructor() {
this.head = null;
}
addFirst(node) {
node.next = this.head;
this.head = node;
}
}
module.exports = LinkedList;
点击运行。
4: Add Last
查看要求:

class LinkedList {
constructor() {
this.head = null;
}
addFirst(node) {
node.next = this.head;
this.head = node;
}
addLast(node) {
if (this.head === null) {
this.head = node;
return;
}
let last = this.head;
while(last.next !== null) {
last = last.next;
}
last.next = node;
}
}
module.exports = LinkedList;
点击运行。
5: Index Of
查看要求:

点击运行。
class LinkedList {
constructor() {
this.head = null;
}
addFirst(node) {
node.next = this.head;
this.head = node;
}
addLast(node) {
if (this.head === null) {
this.head = node;
return;
}
let last = this.head;
while(last.next !== null) {
last = last.next;
}
last.next = node;
}
indexOf(node){
let i = 0;
for (let p = this.head; p !== null; p = p.next) {
if (node === p) {
return i;
}
i = i + 1;
}
return -1;
}
}
module.exports = LinkedList;
点击运行。
6: Remove At
查看要求:

输入:
class LinkedList {
constructor() {
this.head = null;
}
addFirst(node) {
node.next = this.head;
this.head = node;
}
addLast(node) {
if (this.head === null) {
this.head = node;
return;
}
let last = this.head;
while(last.next !== null) {
last = last.next;
}
last.next = node;
}
indexOf(node){
let i = 0;
for (let p = this.head; p !== null; p = p.next) {
if (node === p) {
return i;
}
i = i + 1;
}
return -1;
}
removeAt(index) {
if (this.head === null) {
return;
}
if (index === 0) {
this.head = this.head.next;
return;
}
let i = 1;
let p = this.head;
let n = this.head.next;
while(n) {
if (i === index) {
p.next = n.next;
return;
}
p = p.next;
n = n.next;
i++;
}
}
}
module.exports = LinkedList;
点击运行。
1: Deep Retrieval
查看要求:

输入:
// retrieve a prop that is deeply nested within objects
// i.e. { prop: { prop: { prop: 3 }}} => 3
function deepRetrieval(obj) {
if ("object" === typeof(obj.prop)) {
return deepRetrieval(obj.prop);
}
return obj.prop;
}
module.exports = deepRetrieval;
点击运行。
以上,第二周的课程学习结束。
未完待续……
了解更多,请关注作者:https://twitter.com/bitc2024
No activity yet