Coder Social home page Coder Social logo

cs-notes-pdf's Introduction

CS-Notes-PDF

用于提供 https://github.com/CyC2018/CS-Notes 项目的离线阅读

pdf 使用 cmd-markdown 的付费工具手工进行 pdf 的转换。

原作者已经制作好 gitbook 地址:https://legacy.gitbook.com/book/cyc2018/interview-notebook/details

那么为什么还需要本仓库? 我个人认为cmd-markdown 工具所转化的 pdf相比 gitbook 直接生成的 pdf 拥有更好的阅读体验!

额外资料推荐

简历


分割线

以下就可耻的抄袭原有仓库的内容介绍吧

算法✏️ 操作系统💻 网络☁️ 面向对象👫 数据库💾 Java 系统设计💡 工具🔨 编码实践🙊 后记📝

✏️ 算法

💻 操作系统

☁️ 网络

👫 面向对象

💾 数据库

☕ Java

💡 系统设计

🔨 工具

🙊 编码实践


文档转换步骤

1. 删除目录

<!-- GFM-TOC -->
***
<!-- GFM-TOC -->

2. 字符串替换

2.1 图像路径替换

对于所有的图片地址进行替换

例如:

src="../pics//f5757d09-88e7-4bbd-8cfb-cecf55604854.png"

替换为

src="https://github.com/CyC2018/Interview-Notebook/raw/master/pics/f5757d09-88e7-4bbd-8cfb-cecf55604854.png"

2.2 图像宽度替换

所有的width=""都需要删除 使用正则表达式 width="[0-9]*"进行替换

2.3 公式替换

所有公式需要替换为遵守 MathJax语法,代码为

public static void main(String[] args) {
    // 使用最小匹配
    String templete = "<img src=\"https://latex.codecogs.com/gif.latex?.*?\"/>";
    Pattern pattern = Pattern.compile(templete);
    String testStr = "为每个用户分配 m bit 的码片,并且所有的码片正交,对于任意两个码片 <img src=\"https://latex.codecogs.com/gif.latex?\\vec{S}\"/> 和 <img src=\"https://latex.codecogs.com/gif.latex?\\vec{T}\"/> 有";

    Matcher matcher = pattern.matcher(testStr);

    while (matcher.find()) {
        String str = matcher.group(0);
        System.out.println(str);

        String newStr = str.substring(str.indexOf("?") + 1, str.length() - 3);
        System.out.println("$" + newStr + "$");

        testStr = testStr.replace(str, "$" + newStr + "$");
    }

    System.out.println(testStr);

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.