自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(73)
  • 资源 (8)
  • 收藏
  • 关注

原创 如何设置Tomcat使域名指向指定的文件夹

1. 2. <Host name="域名" appBase="webapps" unpackWARs="true" autoDeploy="true"> 其中 "/root/tomcat7/webapps/FlyPC"为域名默认指向的项目的地址。3.重启tomcat,进入到tomcat的bin文件夹   关闭tomcat  

2017-08-20 15:13:16 4885

转载 iOS AFNetworking 使用Https访问服务器

一.项目中的网络交互都是基于AFN,要求AFN版本在3.0及其以上;    二.代码部分  设置AFN请求管理者的时候 添加 https ssl 验证。  // 1.获得请求管理者  AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];  // 2.加上这个函数,https ssl 验证。  [m

2016-12-22 16:48:25 475

原创 iOS UICollectionView添加Header

http://www.jianshu.com/p/abdcd537b70c

2016-12-03 09:46:56 683

原创 解决iOS中UICollectionViewCell点击无反应,长按才能选中的bug

解决方法:ViewController 中应该设置了一个手势(UITapGestureRecognizer),与UICollectionView的点击事件冲突,这个手势的覆盖区域应该与UICollectionView的监听区域冲突了,去掉这个手势,后者是处理一下这个手势的覆盖范围即可。

2016-10-23 11:36:08 6579 3

原创 在CentOS上安装MongoDB并永久运行

1.增加MongoDB仓库vim /etc/yum.repos.d/mongodb.repo如果你的系统是64位,添加如下内容:[mongodb]name=MongoDB Repositorybaseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/gpgcheck=0enabled=

2016-10-22 13:45:15 560 1

原创 如何通过ssh 私钥登录到服务器

我查了很多,发现有的说的并不准确和简单,我参照一下地址,快捷的解决了这个问题http://www.beginninglinux.com/home/server-administration/openssh-keys-certificates-authentication-pem-pub-crthttps://www.digitalocean.com/community/tutorial

2016-10-06 22:16:52 2874

原创 如何在CentOS6的apache上永久运行nodejs应用

1.安装nodejscd /usr/srcwget http://nodejs.org/dist/v0.10.4/node-v0.10.4.tar.gztar zxf node-v0.10.4.tar.gzcd node-v0.10.4./configuremakemake install链接:https://www.digitalocean.com/commun

2016-09-25 19:42:21 2109

原创 将Unity3D导出的项目集成到iOS主程序中

最近需要将unity3D导出的项目集成到iOS主项目中,查了很多资料,我是根据下面的链接完成的http://www.arvrschool.com/read.php?tid=687demo下载地址

2016-07-13 20:49:07 3314

原创 iOS 7,8,9 通讯录的操作

1.获取通讯录的方法在其他的博客中都有,我主要写一些我当时没有查到的。2.编辑联系人注意:我的编辑联系人用的是ABNewPersonViewController,这样就可以省掉联系人简介这一步//编辑联系人- (void)editButtonAction{ if (SYSTEM_VERSION <9.0f) { NSLog(@"EDIT ios7,8");

2016-05-26 15:48:42 2382

原创 iOS 9 通讯录崩溃问题

最近在开发通讯录,新建联系人的时候,点击完成之后,页面会来回闪几下,然后崩溃掉。原因:iOS 9 已经使用了最新的通讯录框架 Contact,ContactUI,需要在程序中判断一下,如果是iOS9的话,需要使用最新的框架

2016-05-26 15:36:02 1368

原创 Swift 338. Counting Bits

Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.Example:For num = 5

2016-04-10 00:16:51 446

原创 Odd Even Linked List

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.You should try to do it in

2016-02-04 22:45:26 348

原创 微信扫码关注后实现自动分组

之前浏览猪八戒网的时候,发现有客户提出了关于微信开发方面的一个需求,就是给关注的用户实现自动分组的功能.私聊后得知,因为其公众号人数比较多,通过客服进行人工分组的话,既浪费时间,而且容易出错,还要与用户进行交流才决定分配到哪个组里面,效率十分低下.所以就试着给他们做了下,而且这个功能在很多公众账号里面都有使用,特别是那些开了微信商城的公众号,在业余时间帮别人也做了两个.还挺有用的,别的不多

2015-12-08 21:44:31 2557

原创 iOS开发中的小问题,不断更新

1.从视图A中navigation controller push到视图B,当视图B navigationcontroller pop回到视图A时,并不会调用A的viewDidLoad,但是会调用viewWillAppear,所以如果视图A有需要变更的内容应该在viewWillAppear中实现,所以数据的获取和变动可以写在viewWillAppear函数中。2.tableview中的

2015-12-05 18:24:50 1182

原创 MAC 搭建腾讯云(centOS) apache+php+mysql 持续更新...

1.登陆到云服务器 我选择的是SSH密钥登陆1. chmod 400 私钥文件 #将您的私钥文件设置权限为4002. ssh -i 私钥文件 系统管理员@服务器IP #对于ubuntu系统管理员为ubuntu;对于redhat,centos,debian,suse用户名为root例:ssh -i ~/test ubuntu

2015-10-31 14:05:53 2352

原创 iOS :GCD的简单实用

#import "ViewController.h"#define IMAGE_URL @"http://williamzhang-public.qiniudn.com/DSC_0069.jpg"@interface ViewController () {    UIImageView *_imageView;}@end@implementation ViewCon

2015-10-29 10:13:02 389

原创 iOS 异步下载图片

#import "ViewController.h" #define IMAGE_URL @"http://williamzhang-public.qiniudn.com/DSC_0069.jpg" @interface ViewController () { NSMutableData *_data; IBOutlet UIImageView *imageView; } @

2015-10-28 10:00:37 365

原创 iOS UITableView的下拉刷新

#import "ViewController.h"@interface ViewController ()@end@implementation ViewController { UIRefreshControl *_refresh; UITableView *_tableView; NSMutableArray *_dataArray;}-(BOOL)

2015-10-27 14:32:22 400

原创 Mac 下搭建xampp+elgg

Mac 下xampp+elgg的搭建1.下载xampp https://www.apachefriends.org/zh_cn/index.html2.下载elgghttps://elgg.org将elgg解压到  /Applications(应用程序)/XAMPP/xamppfiles/htdocs/最好将解压后的文件夹

2015-09-25 16:07:17 864 1

原创 LeetCode:Happy Number

Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares

2015-09-10 22:12:24 388

原创 LeetCode:Balanced Binary Tree

Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe

2015-09-05 16:40:51 419 1

原创 LeetCode:Binary Tree Paths 简洁算法

Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->2->5", "1->3"]

2015-08-31 19:36:32 496 1

转载 IOS Storyboard中使用Segue传值

IOS Storyboard中使用Segue传值需求描述:故事板中,VIEW1与VIEW2有一条SEGUE连线。点击VIEW1中的按钮跳转至VIEW2,并且从VIEW1中传递值给VIEW2。实现:VIEW1.m添加下面的事件方法,该方法在视图跳转时被触发。-(void)prepareForSegue:(UIStoryboard

2015-08-23 19:33:39 421

原创 LeetCode:Invert Binary Tree

Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1解题思路:类似于后序遍历的思想,递归的思想,先完成左子树的交换,再完成右子树的交换,再将根节点的左右子树交换。未优化代码如下:

2015-08-12 23:20:07 552 1

原创 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

2015-08-10 09:59:14 835 1

原创 Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link

2015-08-09 22:55:45 555

原创 Majority Element:主元素

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element

2015-08-09 21:04:18 498

原创 Flatten Binary Tree to Linked List

*  * For example, * Given *  *          1 *         / \ *        2   5 *       / \   \ *      3   4   6 *

2015-08-09 20:42:38 473

转载 iBeacon技术解析:苹果对抗NFC的利器

转载地址:http://digi.tech.qq.com/a/20130915/001341.htm在今年六月举行的WWDC上,作为iOS 7中最重要的新特性之一,苹果正式对外发布了iBeacon。虽然在发布会上,苹果软件工程副总裁Craig Federighi并未提及iBeacon,而且苹果也没有对外公布这项技术的细节,不过iBeacon的名称还是出现

2015-08-09 10:35:39 630 1

转载 IOS学习之蓝牙4.0 BLE

转载请注明出处http://blog.csdn.net/pony_maggie/article/details/26740237作者:小马IOS学习也一段时间了,该上点干货了。前段时间研究了一下IOS蓝牙通讯相关的东西,把研究的一个成果给大家分享一下。 一 项目背景简单介绍一下做的东西,设备是一个金融刷卡器,通过蓝牙与ip

2015-08-09 09:50:37 680 1

原创 Android:Eclipse 安装Genymotion插件的时候出现 There are no categorized items

解决方法:将下面红框“Group items by category” 取消勾选就OK 了。

2015-08-07 17:45:31 4582 3

原创 Android:HttpGet与HttpPost

AndroidManifest,xmlactivity_main.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_widt

2015-08-04 12:51:39 992

原创 android.os.NetworkOnMainThreadException的解决方案

首先,确定AndroidManifest.xml中 其次,这次异常的抛出是因为有一个网络操作试图占用主线程,我们建立一个新线程,异步进行即可,代码如下:Thread thread = new Thread(new Runnable(){ @Override public void run() {

2015-08-04 10:38:59 849 1

原创 Android 控件:CheckBox

首先,在布局文件中注册CheckBoxactivity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_

2015-07-23 16:08:18 1378

原创 Android控件:RadioButton(单选按钮)

首先,在布局文件中注册RadioGroup,图中两个RadioButton为一个RadioGroup。activity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"

2015-07-23 15:48:09 28718

原创 Mac: Android studio+VirtualBox+Genymotion

mac android studio+Genymotion

2015-07-21 17:19:30 1897

原创 北邮OJ 100 二叉树的层数

100. 二叉树的层数时间限制 1000 ms 内存限制 65536 KB题目描述老师有一个问题想考考mabo,但是mabo不会,所以想请你来帮帮忙。问题如下:给一个二叉树请把这个棵二叉树按层来打印。如果为相同层,需要从左到右打印。一个节点是先添加左节点后添加右节点,即添加顺序与输入顺序一致。输入格式首先输入一个整数T,表示一共有

2015-03-24 23:02:21 1158

原创 北邮OJ 108 虚数

108. 虚数时间限制 1000 ms 内存限制 65536 KB题目描述给你一个复数集合{Aj+i*Bj},保证Aj和Bj都是整数,初始为空集。每次会给你如下两种操作中的一种:       1."Insert x+iy",其中x,y都是整数。表示在集合中加入一个复数 x+iy,同时输出此时集合的大小;       2."Pop"。如果集合为空集直接

2015-03-23 22:55:09 1296

原创 kAri OJ 92 统计节点个数 邻接表

92. 统计节点个数 时间限制1000 ms 内存限制 65536 KB题目描述给出一棵有向树,一共有N(1N≤1000)个节点,如果一个节点的度(入度+出度)不小于它所有儿子以及它父亲的度(如果存在父亲或儿子),那么我们称这个节点为p节点,现在你的任务是统计p节点的个数。如样例,第一组的p节点为1,2,3;第二组的p节点为0。输入格式第一行为数

2015-03-21 22:02:54 1709

原创 九度OJ 1176 树查找

题目1176:树查找时间限制:1 秒内存限制:32 兆特殊判题:否提交:3979解决:1700题目描述:有一棵树,输出某一深度的所有节点,有则输出这些节点,无则输出EMPTY。该树是完全二叉树。输入:输入有多组数据。每组输入一个n(1输出:输出该树中第d层得所有节点,节点间用空格隔开

2015-03-01 11:31:04 1031

安卓上传照片到nodejs服务器

资源分为两个文件,一个是安卓上传图片的代码,另一个是nodejs服务端处理图片的代码,使用的express 框架,有问题可以联系我。

2016-10-19

PJSIP全部的依赖库

PJSIP的全部依赖库

2016-07-13

安卓抽奖转盘demo

一款抽奖转盘的demo

2016-07-10

安卓天气App

一款很简陋的安卓天气预报app

2016-07-08

安卓课程表

一款安卓课程表软件,用户可以自己设置自己的课程表,规划自己的时间

2016-07-07

android文字识别并翻译

图文识别是调用百度的接口,看清楚了再下载,识别文字之后进行翻译,根据识别的文字在百度爬数据,爬虫用的JSoup框架

2016-05-30

iOS9 通讯录新框架Demo

iOS9 通讯录新框架的操作

2016-05-26

iOS9 通讯录新框架Contact Demo

iOS9 通讯录新框架Contact Demo

2016-05-26

空空如也

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

TA关注的人

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