- 博客(23)
- 资源 (1)
- 收藏
- 关注
原创 Scrapy学习2
使用scrapy登陆网站, 并且抓取信息:开始的登陆的时候请输入错误的用户名或者密码,然后看到实际上跳转的是哪个地址, 我们需要使用实际的地址. 发起一个start request def start_requests(self): captcha_url = "login的url" return [scrapy.Request( ...
2019-02-20 11:21:09
219
原创 Sacrapy 学习记录
Sacrapy 学习记录:安装scrapy的时候如果出现错误:"building ‘twisted.test.raiser’ extensionerror: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools” 不用下载c++, 整了半天.解决办法:http://www.l...
2019-02-20 10:58:22
199
原创 4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note: The solution set mu
2017-09-25 13:19:57
158
原创 Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.public boolean isPalindrome(int x) { try { String[] num = (x + "").split(""); List list = new A
2017-09-25 10:29:29
177
原创 3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly
2017-09-25 10:27:50
138
原创 3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set must not contain duplic
2017-09-25 10:26:44
129
原创 Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same ele
2017-09-25 10:24:52
151
原创 HDU1005
package com.hdu;import java.util.Scanner;/** * Created by jiajia on 2017/8/2/002 *///hdu1005public class NumberSequence { public static void main(String[] args) { Scanner input = new Sc
2017-08-02 12:02:07
251
原创 HDU1002
I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.Input The first line of the input contains an integer T(1<=T<=20) which means the number of
2017-08-01 20:21:46
233
原创 FatMouse' Trade
Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean. The warehouse has N rooms. The i-th room contai
2017-08-01 19:21:36
197
原创 UDP简单例子
最原始:serverpackage com.udptest;import java.io.*;import java.net.*;/** * Created by jiajia on 2017/7/21/021. */public class UDPServer { public static void main(String[] args) throws IOException
2017-07-21 18:20:11
442
原创 docker 学习笔记
我主要是用虚拟机在Ubuntu上学习docker。所以首先需要安装虚拟机VMware和Ubuntu,从网上直接下载,安装就可以。 首先安装docker:curl -sSL https://get.daocloud.io/docker | sh 接下来了解一些基础概念:docker镜像(docker images),就是类似于面向对象里面的类,可以自己创建也可以在镜像仓库(docker hub)里
2017-07-14 21:03:06
212
原创 基础知识学习笔记(一)
位运算:左移(<<):例子5<<2 = 20 5: 0000….0000 0101 向左移两位 ——>0000….0001 0100 =20右移(>>)同理位与(&) : 都是1的情况下位与为1,其余为0 例子 5&3=1 5: 0000….0000 0101
2017-04-02 13:21:47
213
原创 MyBatis学习笔记(三)
原生Dao方法及其实现类:public interface Dao { //根据id查信息 public User findUserById(int id) throws Exception; //添加信息 public void insertUser(User user)throws Exception; //删除信息 public void delet
2017-04-02 12:59:24
446
原创 MyBatis学习笔记(二)
sqlMapConfig.xml<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <e
2017-04-02 12:41:42
320
原创 MyBatis学习笔记(一)
原生JDBC连接方式: Connection connection=null; PreparedStatement pst = null; ResultSet rs = null; try { //加载驱动 Class.forName("com.mysql.jdbc.Driver");
2017-04-02 12:34:54
332
原创 Map
根据map中的value值进行排序public void test(Map<String, Integer> map){ List<Entry<String, Integer>> list = new ArrayList<Entry<String, Integer>>(map.entrySet()); Collections.sort(list,new Compara
2017-04-02 12:13:13
256
1
原创 HDU1096
主要是格式问题import java.util.Scanner;public class Main{ public static void main(String[] args) { Scanner input = new Scanner(System.in); int sum = 0; int m = input.nextInt();
2016-07-31 21:14:16
200
原创 HDU1040
Sample Input 2 3 2 1 3 9 1 4 7 2 5 8 3 6 9`Sample Output 1 2 3 1 2 3 4 5 6 7 8 9“import java.util.ArrayList; import java.util.List; import java.util.Scanner;public class Main { public stati
2016-07-31 21:06:16
212
原创 HDU 1048
javaimport java.util.ArrayList;import java.util.List;import java.util.Scanner;/*1048 * ABCDEFGHIJKLMNOPQRSTUVWXYZ * VWXYZABCDEFGHIJKLMNOPQRSTU * 主要是格式问题 * */public class Cipher { public stati
2016-07-31 21:03:42
233
原创 HDU 1015
暴力解决import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import java.util.Scanner;import javax.print.DocFlavor.CHAR_ARRAY;public class Safecracker { pu
2016-07-31 21:02:02
276
原创 androidsqlsever
首先声明我是个菜鸟,如有错误请大神指正。 android——-severlet——–sqlsever 首先建立一个javaweb工程,连接数据库(千万不要加载错驱动和jar包)MyEclipse中的代码如下:public static void close(ResultSet rs,Statement st,Connection conn){ try {
2016-03-26 16:42:55
261
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人