备份LeetCode OJ自己编写的代码
常泡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可直接打包最新项目到
releaserelease文件夹
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自己编写的代码的更多相关文章
- 最新的JavaScript核心语言标准——ES6,彻底改变你编写JS代码的方式!【转载+整理】
原文地址 本文内容 ECMAScript 发生了什么变化? 新标准 版本号6 兑现承诺 迭代器和for-of循环 生成器 Generators 模板字符串 不定参数和默认参数 解构 Destructu ...
- LeetCode OJ 题解
博客搬至blog.csgrandeur.com,cnblogs不再更新. 新的题解会更新在新博客:http://blog.csgrandeur.com/2014/01/15/LeetCode-OJ-S ...
- LeetCode OJ学习
一直没有系统地学习过算法,不过算法确实是需要系统学习的.大二上学期,在导师的建议下开始学习数据结构,零零散散的一学期,有了链表.栈.队列.树.图等的概念.又看了下那几个经典的算法——贪心算法.分治算法 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- LeetCode OJ——Text Justification
http://oj.leetcode.com/problems/text-justification/ 编译代码要看warnings!它提供了可能出问题的情况,比如类型转换上unsigned int ...
- 最新的JavaScript核心语言标准——ES6,彻底改变你编写JS代码的方式!
原文地址 迁移到:http://www.bdata-cap.com/newsinfo/1741515.html 本文内容 ECMAScript 发生了什么变化? 新标准 版本号6 兑现承诺 迭代器和f ...
随机推荐
- Python+selenium自动化测试中Windows窗口跳转方法
Python+selenium自动化测试中Windows窗口跳转方法 #第一种方法 #获得当前窗口 nowhandle=driver.current_window_handle #打开弹窗 drive ...
- 沈阳润才教育CRM
一.CRM初始 CRM,客户关系管理系统(Customer Relationship Management).企业用CRM技术来管理与客户之间的关系,以求提升企业成功的管理方式,其目的是协助企业管理销 ...
- String 类的实现(3)String类常用函数
2 #include<iostream> 3 #include<stdio.h> 4 #include<assert.h> 5 #include <iom ...
- 集腋成裘-06-angularJS -angular_02
1.0 选项卡 其中涉及到了三目运算符号; <!DOCTYPE html> <html ng-app="test"> <head> <me ...
- 插件使用一进度条---nprogress
nprogress 是像youtube一样在顶部出现进度条,用在一些加载比较缓慢的场景中. 官方网站是 http://ricostacruz.com/nprogress/ 源码在 https://gi ...
- 字符转ASCII码
char k = '成'; int str = (int)k; Console.WriteLine(str); 结果25104就是‘成’对应的ASCII值
- 一脸懵逼学习Hadoop分布式集群HA模式部署(七台机器跑集群)
1)集群规划:主机名 IP 安装的软件 运行的进程master 192.168.199.130 jdk.hadoop ...
- dom操作节点之常用方法
DOM:获取节点:{1. document.getElementById (元素id):通过元素id找到节点2. document.getElementsByClassName (元素类名classN ...
- Git坑换行符自动转换 [转载]
转自https://www.cnblogs.com/zjoch/p/5400251.html 源起 一直想在 GitHub 上发布项目.参与项目,但 Git 这货比较难学啊.买了一本<Git 权 ...
- [转] 【Monogdb】MongoDB的日志系统
记得前几天有个小伙伴要查看mongodb的日志,从而排查问题,可能总找不到日志放在何处,今天就系统说一下mongodb的日志系统.mongodb中主要有四种日志.分别是系统日志.Journal日志.o ...