- 博客(101)
- 资源 (41)
- 问答 (2)
- 收藏
- 关注
原创 Android之代码执行漏洞
SQL注入 Zip解压路径穿越 通过任意文件写执行代码 native层安全 可信代码加载1.SQL注入成因:开发过程中对传入的SQL查询参数未做转义,导致恶意的输入被当做SQL执行。危害:(1)不符合语法的查询导致拒绝服务(2)对数据进行恶意的增删改查(3)通过load_extension加载恶意代码常见风险点:(1)所有SQL语句不是常量字符串的查询 (2)通过Conten...
2020-02-01 17:25:08
528
1
原创 Android之协议通信安全
目录明文通信 HTTPS协议 证书与PKI 禁止证书验证 HTTPS正确的证书检验 证书有效期 域名是否匹配 CA是否受信任 Android证书校验 SSL Pinning1 明文通信无论使用何种协议明文通过网络抓包都可以获取明文通信内容 为了保证传输数据不被窃取和篡改使用加密协议是解决该问题的主要方式之一。2.HTTPS协议HTTPS是一种基于SS...
2020-02-01 15:16:58
1857
原创 Android之WebView安全
本地攻击(1)Content Provider SQL注入、实现openFile函数导致目录遍历(2)Activity的导出、劫持问题 私有组件错误导出(3)SQLite数据库 SQL注入、load_extension代码执行1.WebView安全Android内置用于显示Web内容的控件。除用于 实现Web浏览器之外...
2020-01-30 21:36:33
916
原创 Linux基础学习(一)
1.Linux用户管理(1)用户标识符:UID与GID(2)用户ID保存路径:/etc/passwd # cat /etc/passwdpasswd中记录的是单个用户的登录信息。每一行代表一个用户,用冒号“:”分割成七个字段,记录用户的7项基本信息。见博客:https://blog.youkuaiyun.com/zzxian/article/details/7163689?u...
2020-01-30 18:29:50
318
1
原创 对titanic.csv数据进行预测生死
# coding=gbk__author__ = 'Mouse'import sysimport pandas as pdimport timefrom sklearn import metricsimport cPickle as picklefrom sklearn.preprocessing import OneHotEncoderfrom sklearn.preproces
2017-05-17 11:13:28
3080
原创 算法题
package demo;import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int number = sc.nextInt(); int shuzu[] = new int[num
2017-04-03 09:05:30
365
原创 android studio新建项目后出现bug finished with non-zero exit value 1
1、Error:Execution failed for task ':app:transformClassesWithDexForDebug'.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program ...
2017-02-18 11:22:11
879
原创 第八章集成学习——周志华
从哪里提高泛化性能?abaBoost是基于错误e,不断迭代更新e,来提升分类器的性能的。Bagging是基于“自助采样法”来提升分类器的性能的。p179页说到,由于每个基学习器只使用了初始的训练集中大概63.2%的样本,剩下的36.8%的样本可作为验证集来对泛化性能进行“外包估计”,可以使用包外样本来辅助剪枝。从而可以提高了泛化性能吧。泛化性能到底指什么咧?在2.2评估方法
2017-01-05 19:31:19
1087
原创 The difference of Post-Secondary education between USA and China
1.About burdenAmercian education from kindergarten to university, the burden is gradually increased.Their university and graduate stage is the beginning of the struggle of life.In China,students b
2017-01-04 15:31:34
1005
转载 weka学习比较好的网址
Reference:http://wenku.baidu.com/link?url=4i4k3plP4BSb_6-SpohcuE13_xSm14O5atwLWwgDz-X_xP_9TL8KZ2nngM6ZIBwtgjtTMzSElCDreRDSL3tzhGz3tcPHB3rRXjSOxe320_Chttp://blog.sina.com.cn/s/blog_46a241200100vv
2017-01-03 16:35:25
901
原创 模型评估和选择——周志华的机器学习
2.1经验误差与过拟合(1)误差:学习器的实际预测输出与样本的真实输出之间的差异;(2)训练误差(经验误差):学习器在训练集上的误差;(3)泛化误差:在新样本上的误差;故我们希望得到泛化误差小的学习器,而实际能做的是使训练误差最小化。(4)过拟合:学习器把训练样本学得“太好”了,很可能已经把训练集样本自身的一些特点当作了所有潜在样本都会具有的一般性质,这样会导致泛化性能降低
2017-01-03 15:05:38
1139
原创 机器学习——Logistic回归
前言(1)Sigmoid函数和Logisitic回归分类器(2)最优化理论初步(3)梯度下降最优化算法(4)数据中缺失项处理利用Logistic回归进行分类的主要思想是:根据现有数据对分类边界线建立回归公式,以此进行分类。这里的“回归”一词源于最佳拟合,表示要找到最佳拟合参数集。训练分类器时的做法就是寻找最佳拟合参数,使用的是最优算法。
2016-12-20 14:10:44
608
原创 机器学习——朴素贝叶斯(基于概率论的分类方法)
前言分类器有时会产生错误结果,这是要求分类器给出一个最优的类别猜测结果,同时给出这个猜测的概率估计值。1.使用概率论分布进行分类2.学习朴素贝叶斯分类器3.解析RSS源数据4.使用朴素贝叶斯来分析不同地区的态度基于贝叶斯决策理论的分类方法优点:在数据较少的情况下仍然有效,可以处理多类别问题;缺点:对于输入数据的准备方式较为敏感;适用数据类型:标称型数据
2016-12-19 14:54:07
3068
转载 python绘图matplotlib绘图库入门
简介:matplotlib 是Python最著名的绘图库,它提供了一整套和matlab相似的命令API,十分适合交互式地行制图。而且也可以方便地将它作为绘图控件,嵌入GUI应用程序中。在Python中使用matplotlib.pyplot快速绘图下面是matplotlib库所给的介绍"""This is an object-oriented plotting library.
2016-12-18 11:34:49
3458
原创 机器学习——决策树
引言邮件分类系统:首先检测发送邮件域名地址,如果地址为MyEmployer.com则将其放在分类“无聊时需要阅读的邮件”中。如果邮件不是来自这个域名,则检查邮件内容里是否包含单词曲棍球,如果包含则将邮件归类到“需要及时处理的朋友邮件”,如果不包含则将邮件归类到“无需阅读的垃圾邮件”。思路(1)从一堆原始数据中构造决策树,首先我们讨论构造决策树的方法,编写构造树的python
2016-12-17 20:37:39
1818
原创 机器学习环境安装
由于要使用机器学习,所以需要安装sklearn机器学习库,而在安装sklearn机器学习库之前需要安装numpy和scipy在开始前,我检查了下了自己的pycharm是否安装了numpy 和scipy如图所示:
2016-12-14 19:33:52
559
原创 Merge Two Sorted Lists 默认初始是按顺序排列的
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Subscribe to see which companies asked this questionp
2016-12-12 19:14:27
454
转载 Valid Parentheses
Given a string containing just the characters '(', ')','{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all valid b
2016-12-10 17:41:25
333
原创 Remove Nth Node From End of List
Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the l
2016-12-10 16:22:05
258
原创 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 s
2016-12-10 15:03:15
274
转载 oop
package oop;import java.util.Random;/** * * @author Mouse * */public class test { private static int max = 20; private static int generation = 3; private static int count = 5; public st
2016-12-08 16:20:12
515
转载 Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit string
2016-12-04 14:36:42
311
原创 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
2016-12-03 10:18:19
343
原创 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 du
2016-12-03 08:36:10
284
原创 Longest Common Prefix (最长公共前缀)
Write a function to find the longest common prefix string amongst an array of strings.Subscribe to see which companies asked this question
2016-12-01 13:19:04
418
原创 Roman to Integer
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Subscribe to see which companies asked this question
2016-11-30 17:58:08
256
原创 Integer to Roman
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Subscribe to see which companies asked this question
2016-11-30 16:06:39
251
原创 Container With Most Water
Given n non-negative integers a1, a2, ...,an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of linei is at (i, ai) and (i, 0). Find
2016-11-29 15:38:47
326
转载 Regular Expression Matching
'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire input string (not partial).The function prototype should be:bool isMatch(c
2016-11-28 20:09:10
368
原创 Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Subscribe to see which companies asked this question
2016-11-28 08:50:14
294
原创 String to Integer (atoi)(将字符窜转换成数字)
Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input case
2016-11-27 22:54:52
390
原创 Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Subscribe to see which companies asked this question
2016-11-27 17:39:08
383
原创 ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I I
2016-11-27 10:29:24
305
原创 Longest Palindromic Substring(最长回文)
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example:Input: "babad"Output: "bab"Note: "aba" is also a valid answer.Ex
2016-11-26 19:22:43
334
原创 动态规划最优矩阵连乘问题
\documentclass[a4paper]{ctexart}\usepackage{amssymb}%%导入数学包\usepackage{amsmath}\usepackage{indentfirst}\usepackage{listings}\usepackage{graphicx}\usepackage{geometry}\usepackage{color} %%设置字体的颜
2016-11-20 20:44:15
938
转载 回溯法求批处理作业调度
package mouse;import java.util.*;public class FlowShop { static int n; // 作业数 static int f1; // 机器1完成处理时间 static int f; // 完成时间和 static int bestf; // 当前最优值 static int[][] m; // 各作业所需要的处理时间
2016-11-20 20:37:54
923
转载 回溯法求装载问题
package mouse;import java.text.DecimalFormat;import java.text.NumberFormat;public class Loading { static int n;// 集装箱数目 static double[] w;// 集装箱重量数组 static double c;// 第一艘轮船的载重量 static double
2016-11-20 20:32:31
603
原创 PHP入门-多站点配置
1、下载并安装wampserver_X86_2.5.1455519048.exe 2、我的php代码的安装目录如图所示:3、编辑:httpd-vhost.conf4、进入到wamp根目录下,wampmanager.ini Menu.Left php 目录+路径 wampmanger.tpl Menu.Left php 目录 代码目录 E:/WorkS
2016-11-16 20:50:58
418
android笔记
2016-02-11
android—定期动态更新启动页的实现源码
2016-02-10
android 课程表的实现
2016-02-10
javaweb连接池配置
2014-07-26
JSON一系列的包
2014-07-26
javaweb 实现的图书管理系统
2014-07-25
这个东西是怎么实现的? 关键字是什么
2016-12-09
单链表存储一元多项式
2015-10-22
TA创建的收藏夹 TA关注的收藏夹
TA关注的人