This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Clone, Debug)] | |
pub enum State { | |
Data, | |
CharacterReference, | |
TagOpen, | |
RCDATA, | |
RCDATALessThanSign, | |
RAWTEXT, | |
RAWTEXTLessThanSign, | |
ScriptData, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@huytd | |
06/08/2020 17:24:09 | |
Tóm tắt lại mấy ý mấy ngày vừa qua mọi người thảo luận về chuyện hỏi làm sao để dễ nhận được câu trả lời: | |
1. Do your homework: Tự mình tìm hiểu trước khi hỏi | |
2. Show your homework: Cho mọi người thấy là bạn đã tìm hiểu nhưng vẫn không tìm được câu trả lời | |
3. Scope your question: Giới hạn phạm vi của câu hỏi, có thể chia nhỏ câu hỏi ra thành nhiều câu hỏi con, tránh hỏi khi bản thân bạn cũng chưa biết là mình muốn tìm kiếm điều gì từ câu hỏi đó, ví dụ: "có ai xài XYZ chưa, có thể chia sẻ một chút về kinh nghiệm xài cái này được không?" | |
4. Guess the answer: Thử đặt câu hỏi bằng cách đưa ra câu trả lời mà bạn nghĩ là đúng để xác minh kiến thức, ví dụ: "Em thấy Kipalog dạo này không có nhiều bài mới, có phải vì admin hết tiền làm quảng cáo không ạ?" | |
5. Không quạo: Nếu hỏi xong mà bị chửi thì cũng đừng tự ái mà hãy tìm cách xiên lại người chửi bạn một cách văn minh nhất. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Masculin Féminin (1966) | |
Boy (2010) | |
Lost in Translation (2003) | |
Madadayo (1993) | |
Cyclo (1995) | |
Band of Outsiders (1964) | |
Malèna (2000) | |
Lolita (1962) | |
Psycho (1960) | |
Interview with the Vampire (1994) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from lxml import html | |
input_rules = { | |
"type=password": 10, | |
"name=username": 10, | |
"name=password": 10, | |
"id=username": 10, | |
"id=password": 10, | |
"type=email": 5, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Command} from '@oclif/command' | |
import * as inquirer from 'inquirer' | |
import todoAPI from '../api/todoAPI' | |
export default class Interact extends Command { | |
static description = 'Enter the interacting mode' | |
async run() { | |
const source = todoAPI.list() | |
const choices = source // make a copy of the source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Command, flags} from '@oclif/command' | |
import chalk from 'chalk' | |
import todoAPI from '../api/todoAPI' | |
export default class Add extends Command { | |
static description = 'Add new todo to list' | |
static args = [{name: 'todo'}] | |
static flags = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Command} from '@oclif/command' | |
import chalk from 'chalk' | |
import todoAPI from '../api/todoAPI' | |
export default class Remove extends Command { | |
static description = 'Remove a todo from list' | |
static args = [{name: 'index'}] | |
async run() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Command} from '@oclif/command' | |
import todoAPI from '../api/todoAPI' | |
import chalk from 'chalk' | |
const Table = require('cli-table') | |
export default class List extends Command { | |
static description = 'Print out all todos' | |
async run() { | |
const table = new Table({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Command} from '@oclif/command' | |
import chalk from 'chalk' | |
import todoAPI from '../api/todoAPI' | |
export default class Add extends Command { | |
static description = 'Add new todo to list' | |
static args = [{name: 'todo'}] | |
async run() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from 'fs' | |
import * as path from 'path' | |
import * as os from 'os' | |
const todoFile = path.join(os.homedir(), 'checkme', 'todos.json') | |
interface Todo { | |
done: boolean; | |
todo: string; | |
} |
NewerOlder