自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(95)
  • 资源 (42)
  • 问答 (1)
  • 收藏
  • 关注

原创 LeetCode之Move Zeroes

1、题目Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.For example, givennums = [0, 1, 0, 3, 12], after c

2017-03-31 00:23:46 2344

原创 LeetCode之Intersection of Two Arrays

1、题目Given two arrays, write a function to compute their intersection.Example:Givennums1=[1, 2, 2, 1],nums2=[2, 2], return[2].Note:Each element in the result must be uniq

2017-03-30 17:02:24 2485

原创 LeetCode之Add Digits

1、题目Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + 8 = 11,1 + 1 = 2. Since

2017-03-30 15:48:56 2260

原创 LeetCode之Ransom Note

1、题目Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the maga

2017-03-30 13:32:24 2530

原创 Bit Manipulation —— 位运算

1、介绍Bit Manipulation(位运算):一共五种运算:与,或,异或,左移,右移。2、算法题目一般使用总结:(1)n & (n-1)能够消灭n中最右侧的一个1。(2) 右移:除以2, 左移:乘以2。(3)异或性质:a1^a2^a3 = a2^a3^a1 交换律,0^a=a, a^a=0。

2017-03-30 01:17:03 2875

原创 LeetCode之Reverse String II

1、题目Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there are less than k characters left, reverse all

2017-03-29 23:40:59 2292

原创 Android之提示can‘t execute: Permission denied解决办法

1、问题在手机里面执行文件的时候提示can't execute: Permission denied一开始以为是没有root权限,自己傻逼了,错误意思是,不能执行,权限定义,2、解决办法chmod 777 file给文件可执行就可以。

2017-03-29 15:21:40 61858

原创 LeetCode之Find All Numbers Disappeared in an Array

1、题目Given an array of integers where 1 ≤ a[i] ≤n(n= size of array), some elements appear twice and others appear once.Find all the elements of [1,n] inclusive that do not appear in this

2017-03-29 11:18:28 2277

原创 LeetCode之Missing Number

1、题目Given an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.For example,Givennums=[0, 1, 3]return2.Givennums=[0

2017-03-29 10:47:26 2399

原创 LeetCode之Find the Difference

1、题目Given two stringssandtwhich consist of only lowercase letters.Stringtis generated by random shuffling stringsand then add one more letter at a random position.Find the letter

2017-03-29 01:48:45 2358

原创 LeetCode之First Unique Character in a String

1、题目Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.Examples:s = "leetcode"return 0.s = "loveleetcode",return 2.

2017-03-29 00:08:49 2358

原创 LeetCode之Single Number

1、题目Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without

2017-03-28 20:17:41 2422

原创 LeetCode之Longest Common Prefix

1、题目Write a function to find the longest common prefix string amongst an array of strings2、代码实现package com.sangfor.leetcode;public class LongestCommonPrefix { public static void main(Stri

2017-03-27 21:39:14 2386

原创 LeetCode之Remove Element

1、题目Given an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place with constant m

2017-03-27 19:00:54 2317

原创 LeetCode之Remove Duplicates from Sorted List

1、题目Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, return1->2->3.1->2->2->2 re

2017-03-27 17:55:07 2321

原创 LeetCode之Remove Duplicates from Sorted Array II

1、题目Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted arraynums=[1,1,1,2,2,3],Your function should return length =5, with th

2017-03-26 20:11:59 2300

原创 LeetCode之Remove Duplicates from Sorted Array

1、题目Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for another array, you must do this in

2017-03-26 19:05:10 2359

原创 LeetCode之Max Consecutive Ones

1、题目Given a binary array, find the maximum number of consecutive 1s in this array.Example 1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are

2017-03-26 11:46:42 2347

原创 LeetCode之Nim Game

1、题目You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone w

2017-03-26 10:53:54 2434

原创 LeetCode之Island Perimeter

1、题目You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is c

2017-03-26 09:51:07 2480

原创 LeetCode之Next Greater Element I

1、题目You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nu

2017-03-25 21:35:06 2325

原创 LeetCode之Fizz Buzz

1、题目Write a program that outputs the string representation of numbers from 1 ton.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five outpu

2017-03-25 20:12:34 2399

原创 LeetCode之Keyboard Row

1、题目:Given a List of words, return the words that can be typed using letters ofalphabeton only one row's of American keyboard like the image below.Example 1:Input: ["Hello", "Ala

2017-03-25 00:56:05 2361

原创 LeetCode之Hamming Distance

1、题目TheHamming distancebetween two integers is the number of positions at which the corresponding bits are different.Given two integersxandy, calculate the Hamming distance.Note

2017-03-24 22:50:52 2310

原创 LeetCode之Reverse String

1、题目:Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".2、代码实现:代码实现1: public static String reverseStri

2017-03-24 22:28:48 2284

原创 LeetCode之Palindrome Number(回文数)

1、题目Determine whether an integer is a palindrome. Do this without extra space.2、代码实现代码实现1 public static boolean isPalindrome(int x) { if (x < 0) { return false; } String

2017-03-24 16:51:50 2385

原创 LeetCode之Reverse Integer

1、题目Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Note:The input is assumed to be a 32-bit signed integer. Your func

2017-03-24 15:23:45 2326

原创 LeetCode之Two Sum

1、题目Given an array of integers, returnindicesof the two numbers such that they add up to a specific target.You may assume that each input would haveexactlyone solution, and you may not u

2017-03-23 22:09:53 2358

原创 linux之vim常见配置

1、打开vim配置文件vim ~/.vimrc2、添加部分配置去掉讨的关vi一致性模式,避免以前版本的一些bug和局限set nocompatible显示行号set number检测文件的类型filetype on 记录历史的行数set history=1000 背景使用黑色(已经测试这个没有什么效果),加了会报错,建议大家不要加上set background

2017-03-23 17:50:49 2722

原创 ios之Xcode工程中添加文件常用快捷键

1、Xcode某个工程中添加文件有两种方式:方式一:“command”+“n”,弹出添加文件对话框。方式二:在需要添加文件的工程目录下右键,选择“New File…”。以上方式Xcode会弹出下面的对话框:左侧是使用Xcode做的工程类别的分类,我们选择“OS X“,在这个目录下,是所有可以添加的文件的分类,在“Source”中,右侧会显示一下几

2017-03-23 00:15:18 3233

原创 ios之最简单的程序

1、构建学生对象并且打印相关信息代码:#import #import "AppDelegate.h"@interface Student : NSObject//变量@property NSString *name;@property int age;@property float score;//method-(void)show;@end@implement

2017-03-22 23:55:57 2449

原创 C++之typename

1、typename和class在模板前,typename和class没有区别template class A;template class A;typename和class对编译器而言却是不同的东西2、声明一个类型看下面的代码我们编译下结果如下编译器不知道T::const_iterator是个类型。如果它是个变量呢? T::cons

2017-03-22 17:39:56 2423

原创 C++之operator关键字(重载操作符) 使用总结

operator是C++的关键字,它和运算符一起使用,表示一个运算符函数,一、为什么使用操作符重载简单的说我们基本数据比如int float 都可以比较大小 有>、、二、实现重载的操作符先看简单代码类成员函数实现重载和非类成员函数(全局函数)1)、操作符重载实现为类成员函数重载的操作符在类体中被声明,声明方式如同普通成员函数一样,只不

2017-03-22 15:48:47 11581

原创 C++之‘nullptr’ was not declared in this scope

在vim里面写了一个简单cpp文件,为了避免野指针,需要指针初始化char *p2 = nullptr1、编译时报错如下2、解决办法编译加上g++ -std=gnu++0x int.cpp -o int3、C里面的null和C++里面的nullptr、NULL介绍NULL在C++中的定义/* Define NULL pointer v

2017-03-22 12:03:28 29532

原创 C++之inline函数使用总结

一、C++为什么引入inline函数?主要目的:用它代替C语言中表达式形式的宏定义来解决程序中函数调用的效率问题。C语言中的宏定义,它使用预处理器实现,没有了参数压栈、代码生成等一系列得到操作,因此效率很高。但缺点如下:预处理器符号表中的简单替换,不能进行参数有效性的检测,不能享受C++编译器严格类型检查的好处。另外,它的返回值也不能被强制转换为可转换的合适类型。C++如果

2017-03-22 01:24:33 3834

原创 C++类与const关键字

1、const成员变量const 成员变量的用法和普通 const 变量的用法相似,只需要在声明时加上 const 关键字const 成员函数可以使用类中的所有成员变量,但是不能修改它们的值,这种措施主要还是为了保护数据而设置的2、const 成员函数也称为常成员函数。常成员函数需要在声明和定义的时候在函数头部的结尾加上 const 关键字,看下面的例子:c

2017-03-22 00:42:00 2485

原创 C++之explicit关键字使用总结

1、explicit关键字介绍C++中的explicit关键字只能用于修饰只有一个参数的类构造函数, 它的作用是表明该构造函数是显示的, 而非隐式的, 关键字是implicit, 意思是隐藏的,类构造函数默认情况下即声明为implicit(隐式).2、贴代码#include #include #include #include using namespace

2017-03-21 22:07:24 2368

原创 C++之‘malloc’ was not declared in this scope和invalid conversion from ‘void*’ to ‘char*’

1、错误一‘malloc’ was not declared in this scope2解决加上头文件文件3、错误二invalid conversion from ‘void*’ to ‘char*’ 4、解决在malloc函数前面加上强转类型(char *)

2017-03-21 21:32:27 10194 2

转载 unix网络编程之UNIX Domain Socket IPC (sockaddr_un )

socket API原本是为网络通讯设计的,但后来在socket的框架上发展出一种IPC机制,就是UNIX Domain Socket。虽然网络socket也可用于同一台主机的进程间通讯(通过loopback地址127.0.0.1),但是UNIX Domain Socket用于IPC更有效率:不需要经过网络协议栈,不需要打包拆包、计算校验和、维护序号和应答等,只是将应用层数据从一个进程拷贝到另

2017-03-21 20:25:00 2965

原创 C++之invalid initialization of non-const reference of type ‘int&’ from an rvalue of type ‘int’

1、看代码2、编译结果3、分析和解决就拿f(a + b)来说,a+b的值会存在一个临时变量中,当把这个临时变量传给f时,由于f的声明中,参数是int&,不是常量引用,因为c++编译器的一个关于语义的限制。如果一个参数是以非const引用传入,c++编译器就有理由认为程序员会在函数中修改这个值,并且这个被修改的引用在函数返回后要发挥作用。但如果

2017-03-21 16:54:35 36060 7

WebViewTest.7z

Android长按WebView然后替换系统的菜单,自定义自己的菜单,比如“搜索”、“翻译”自己获取值了在自己的WebView里面进行相关操作。

2022-01-09

Android之常用命令和工具.pdf

1、里面有常见的如何快速获取app包名和拉取apk和直观的打日志的命令总结 2、快速获取启动奔溃日志的总结 3、一些日志工具和常见命令的分享 4、常见的逆向分析工具分享 5、常见的移动端抓包工具分享 6、移动端常用的文档分享 7、git和svn常用命令精简分享 8、移动端常用的hook分享(java层、c/c++层)

2021-04-01

TestDragRecycleView.7z

这里主要实现RecycleView的拖拽元素效果,和禁止哪些元素再拖拽的过程中不交换位置,一定可以保证功能没问题。

2020-12-30

AliHome.zip

主要是实现支付宝顶部上滑的时候,渐渐的变消失效果,然后部分布局又出现的效果,放到Android studio里面可以直接运行

2020-07-11

NotchScreenUtil.zip

这个资源主要是封装了对4种主流手机是否是刘海屏的判断,以及如何获取4种刘海屏高度的,比如oppo手机刘海屏高度固定80px等。

2020-03-06

math-basics.rar

宾夕法尼亚大学计算机和信息科学系教授 Jean Gallier 的开源书籍《 Algebra, Topology, Differential Calculus, and Optimization Theory For Computer Science and Engineering 》用一本书的容量解决了所有问题。 这本书涵盖了计算机科学所需的线性代数、微分和最优化理论等问题,可谓详尽。 链接: http://www.cis.upenn.edu/~jean/math-basics.pdf 这本书讲了什么? 这本书的主要目的是介绍线性代数和最优化理论的基础知识以及这些知识在机器学习、机器人学、计算机视觉等领域的应用。 该书包含以下 10 卷: 线性代数 仿射几何和射影几何 双线性形式的几何 几何:PID、UFD、诺特环、张量、PID 上的模块、规范形 拓扑和微分 最优化理论基础 线性优化 非线性优化 在机器学习中的应用

2019-08-01

动手学习深度学习PDF.rar

这个是最新出版的”动手深度学习“,我们可以在这里学习深度学习。

2019-06-22

c_log_to_file.txt

如果服务端是linux c/c++,你如果你在后台开了调试日志,如果日志打印很多,几秒时间就刷掉了,你需要打印关键日志,这个时候你可以用这个文件内容修改下把日志输入到指定文件里面

2019-06-15

Source Insight黑色和灰色的背景配置

这里主要是一些source insight背景的配置,有黑色和灰色,在D:\Users\User\My Document\Source Insight\Settings 这个目录下放进去,关闭source insight和打开source insight就行了

2019-04-23

Xshell5(Xshell5免费)

this is xhell5 . it can help me connect linux ,so you can use command at linux

2019-03-21

linux shell脚本攻略2

the pdf will tell you learn linux shell ,If you want to learn, please download the pdf

2019-03-06

linux网络编程和code

这里是关于linux的网络编程,和部分code,有需要的小伙伴可以直接到这里下

2018-12-22

C语言深度解剖

这里面是C语言深度解剖的pdf.我们学C的时候这个和一起对比学习

2018-12-14

linux高性能服务端编程

这个pdf里面介绍了linux高性能服务端编程,主要书用linux c/c++作为服务端.

2018-12-12

xshell(windows)

we need to use xshell at windows desktop. this will support you to download.

2018-12-05

linux网络源码分析

这是在网上下载的很好的网络源码分析的资料,分享给大家

2018-11-27

深入理解LINUX网络技术内幕

这是在网上看到的资料,我先下载下来然后再上传,怕以后用得到。

2018-11-27

linux多线程服务器编程

这是在公司同事那里看到的一本书,写的是linux多线程服务器编程

2018-11-16

qt client server

这是一个QT客户端和服务单的例子,非常经典,先保存起来

2018-11-02

c++编程实例

这里有很多C++的例子,方便快速入门,希望大家下载,我很多也不是很熟悉

2018-10-18

C++一些游戏源码

这里面很多c++的源码,适合新手写代码,里面有一些游戏

2018-10-18

判断手机是否打开消息通知

这个类主要是帮助我们在android移动端判断是否开启了"消息通知"的权限,同时打开相应的界面,也支持Androd8.0

2018-09-23

Android打印当前app的日志工具类

这个脚本注意是利用了pidcat.py这个脚本,然后放到linux系统的/usr/local/bin/目录下,然后执行pcat命令就可以打印当前页面的app日志

2018-09-20

打开自启动的帮助类

这里主要是打开安卓各个手机的的"自启动"或"受保护"或"百名单"的页面,适配了华为 小米 vivo oppo 三星 魅族 360手机

2018-09-20

压缩文件的工具类

Android压缩sdcard目录下的文件,压缩成zip格式的文件,压缩率1:20

2018-09-08

Android调用第三方的so

Android调用第三方的so,简单开发的配置mk文件,然后和调用代码测试

2018-09-08

HttpURLConnection的封装

HttpUrlConnect的封装,我们可以使用HttpRequest来请求一些东西

2018-06-08

pidcat.py_in_ubuntu

In order to print Android log and have class name, We often use the pidcat.py on ubuntu, This will help me sovle problem better

2018-05-12

网络请求工具

网络请求的部分工具

2018-05-09

Android下载APK

Android下载APK简单例子,这里有提示框,然后提示进度。

2018-04-25

pc web access phone file

this is Android program, and jni using c language, we can use web browser to access phone sdcard file and download wo required file

2017-12-25

ndk调用第三方so

ndk调用第三方sondk调用第三方sondk调用第三方sondk调用第三方so

2017-12-02

Android三级列表

用ExpandableListView写的三级列表

2017-05-11

Hook StartActivity Demo

Hook StartActivity Demo

2016-11-17

jadx用开反编译APK的工具

you can gadx apk on windows or linux

2016-11-15

ubuntu上面使用jni例子

ubuntu上面使用jni例子

2016-11-07

TrayPreferences需要的包

使用跨进程的TrayPreferences需要的包

2016-08-27

zxingproject

最简单的扫二维码,我到网上找了很多资源,不是少了这里就是少了那里,都不是很全面,这个是组简单的。

2016-01-05

MPAndroidChart让(折线图、柱形图、饼状图、散列图、雷达图)优雅的舞动

Android之玩转MPAndroidChart让(折线图、柱形图、饼状图、散列图、雷达图)优雅的舞动

2015-11-30

手机摇一摇震动刷新(支持ListView GridView WebView)

这是我写的手机摇一摇震动刷新(支持支持ListView GridView WebView)并生成二维码的源码,我的Github上面有更多的效果介绍,有兴趣的小伙伴猛戳吧,https://github.com/changechenyu/ShakeToFresh 如果觉得很好玩或者有创意就star我吧

2015-11-09

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除