常泡LC的朋友知道LC是不提供代码打包下载的,不像一般的OJ,可是我不备份代码就感觉不舒服…

其实我想说的是…

我自己写了抓取个人提交代码的小工具,放在GitCafe上了…

不知道大家有没有兴趣

https://gitcafe.com/aaronzhou/
... ssion

拿Java写的,也打了一个包,本地有JRE环境就能运行,欢迎拍砖

抓取 LeetCode OJ 个人提交的代码

  • Gradle 构建项目
  • HttpClient、jsoup 抓取、解析网页

使用说明

  • 进入release文件夹
  • 修改init.properties 中的配置
        #登录账号
username=your_username #登录密码
password=your_password #登录类型,值暂时只能为leetcode或github
logintype=leetcode #抓取的代码在本地的存储目录
#注意目录路径最后需有一个斜杠/
dirpath=/path/to/your/own/directory/ #是否抓取所有的提交代码
#为假时参考tags集合的取值有选择的抓取
isfetchall=false #抓取与集合中状态匹配的代码
tags=Accepted,Wrong Answer,Time Limit Exceeded
  • 命令行中运行 java
    -jar FetchLeetcodeSubmission.jar
     抓取代码
  • 输出的代码文件,内容依次为
    • 本项目信息
    • 题目标题
    • 题目URL
    • 你提交的代码
    • 题目内容

项目说明

  • 使用gradle
    release
    可直接打包最新项目到release文件夹
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes 'Main-Class': 'cc.aaron67.fetch.leetcode.main.Main'
}
} task release(type: Copy) {
from 'build/libs'
into 'release'
} task copyConfig(type: Copy) {
from 'init.properties'
into 'release'
} release.dependsOn 'build', 'copyConfig'

备份LeetCode OJ自己编写的代码的更多相关文章

  1. 最新的JavaScript核心语言标准——ES6,彻底改变你编写JS代码的方式!【转载+整理】

    原文地址 本文内容 ECMAScript 发生了什么变化? 新标准 版本号6 兑现承诺 迭代器和for-of循环 生成器 Generators 模板字符串 不定参数和默认参数 解构 Destructu ...

  2. LeetCode OJ 题解

    博客搬至blog.csgrandeur.com,cnblogs不再更新. 新的题解会更新在新博客:http://blog.csgrandeur.com/2014/01/15/LeetCode-OJ-S ...

  3. LeetCode OJ学习

    一直没有系统地学习过算法,不过算法确实是需要系统学习的.大二上学期,在导师的建议下开始学习数据结构,零零散散的一学期,有了链表.栈.队列.树.图等的概念.又看了下那几个经典的算法——贪心算法.分治算法 ...

  4. LeetCode OJ 297. Serialize and Deserialize Binary Tree

    Serialization is the process of converting a data structure or object into a sequence of bits so tha ...

  5. LeetCode OJ 之 Maximal Square (最大的正方形)

    题目: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and ...

  6. LeetCode OJ:Integer to Roman(转换整数到罗马字符)

    Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 t ...

  7. LeetCode OJ:Serialize and Deserialize Binary Tree(对树序列化以及解序列化)

    Serialization is the process of converting a data structure or object into a sequence of bits so tha ...

  8. LeetCode OJ——Text Justification

    http://oj.leetcode.com/problems/text-justification/ 编译代码要看warnings!它提供了可能出问题的情况,比如类型转换上unsigned int ...

  9. 最新的JavaScript核心语言标准——ES6,彻底改变你编写JS代码的方式!

    原文地址 迁移到:http://www.bdata-cap.com/newsinfo/1741515.html 本文内容 ECMAScript 发生了什么变化? 新标准 版本号6 兑现承诺 迭代器和f ...

随机推荐

  1. HTTP协议请求头信息和响应头信息

    阅读目录 http的请求部分 常用请头信息 常用响应头信息 http的请求部分 基本结构 请求行 GET  /test/hello.html HTTP/1.1 消息头(并不是每一次请求都一样) 空行 ...

  2. D.Starry的神奇魔法(矩阵快速幂)

    /*D: Starry的神奇魔法 Time Limit: 1 s      Memory Limit: 128 MB Submit My Status Problem Description     ...

  3. github.com加速节点

    github.com加速节点 192.30.253.118 github.com192.30.253.119 github.com93.46.8.89 github.com

  4. PAT Basic 1073. 多选题常见计分法

    题目内容 多选题常见计分法(20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 批改多选题是比较麻烦的事情,有 ...

  5. Nginx中配置undertow进行两个项目的动静分离配置

    #user nobody; worker_processes ; pid /var/run/nginx.pid; events { worker_connections ; } http { incl ...

  6. Android Studio运行项目报错:Error:null value in entry: annotationProcessorOutputFolder=null的解决方案

    一般是在Android studio异常退出(比如强制关机)后,重新打开后运行项目出现该问题. 解决方案 删除项目根目录的.gradle文件夹,然后Clean  Project —— Rebulid ...

  7. Java集合源码学习(一)Collection概览

    1.集合框架 Java集合框架包含了大部分Java开发中用到的数据结构,主要包括List列表.Set集合.Map映射.迭代器(Iterator.Enumeration).工具类(Arrays.Coll ...

  8. ANGULAR6.x - 错误随笔 - Can't bind to 'formGroup'

    formGroup:错误 Can't bind to 'formGroup' since it isn't a known property of 'form'. (" 原因: 在使用for ...

  9. libssl.so.10: cannot open shared object file: No such file or directory

    今天在使用yum安装东西的时候报错 yum list There was a problem importing one of the Python modulesrequired to run yu ...

  10. if-else(职责链)

    var a=1,b=2,c=3,d=4; const rules = [ { match: function (a, b, c,d) { return a;}, action: function (a ...