备份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 ...
随机推荐
- Shiro+Redis实现tomcat集群session共享
一.背景 当我们使用了nginx做项目集群以后,就会出现一个很严重的问题亟待解决,那就是:tomcat集群之间如何实现session共享的问题,如果这个问题不解决,就会出现登陆过后再次请求资源依旧 ...
- AI-CBV写法
AI-CBV写法 CBV固定样式 #url.py from django.conf.urls import url from django.contrib import admin from app0 ...
- Callable和Future出现的原因
创建线程的2种方式,一种是直接继承Thread,另外一种就是实现Runnable接口. 这2种方式都有一个缺陷就是:在执行完任务之后无法获取执行结果. 如果需要获取执行结果,就必须通过共享变量或者使用 ...
- python pop方法
在两个地方见到了pop方法的使用,看起来是之前自己确实故略寡闻了. 在pandas的DataFrame中 import pandas as pd dataframe = pd.read_csv('ir ...
- WCF+Autofac 实现构造函数依赖注入
1.新建一个项目 2.要对WCF服务实现Autofac注入,需要实现2个接口,IInstanceProvider与IServiceBehavior,并让实现IServiceBehavior的类成为一个 ...
- 利用 Windows API Code Pack 修改音乐的 ID3 信息
朋友由于抠门 SD 卡买小了,结果音乐太多放不下,又不舍得再买新卡,不得已决定重新转码,把音乐码率压低一点,牺牲点音质来换空间(用某些人的话说,反正不是搞音乐的,听不出差别)… 结果千千静听(百度音乐 ...
- [转] Node.js使用MongoDB3.4+Access control is not enabled for the database解决方案
今天使用MongoDB时遇到了一些问题 建立数据库连接时出现了warnings 出现这个警告的原因是新版本的MongDB为了让我们创建一个安全的数据库 必须要进行验证 后来在外网找到了答案 解决方案如 ...
- checkbox选中相关问题总结
html: <input type="checkbox" name="fruit" id="apple">苹果 <inpu ...
- 0day漏洞
0Day的概念最早用于软件和游戏破解,属于非盈利性和非商业化的组织行为,其基本内涵是“即时性”. Warez被许多人误认为是一个最大的软件破解组 织,而实际上,Warez如黑客一样,只是一种行为. 0 ...
- BZOJ3622 已经没有什么好害怕的了 动态规划 容斥原理 组合数学
原文链接https://www.cnblogs.com/zhouzhendong/p/9276479.html 题目传送门 - BZOJ3622 题意 给定两个序列 $a,b$ ,各包含 $n$ 个数 ...