自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(33)
  • 收藏
  • 关注

转载 网络通信 002:TCP 的那些事儿(下)

原文地址:http://coolshell.cn/articles/11609.html这篇文章是下篇,所以如果你对TCP不熟悉的话,还请你先看看上篇《TCP的那些事儿(上)》 上篇中,我们介绍了TCP的协议头、状态机、数据重传中的东西。但是TCP要解决一个很大的事,那就是要在一个网络根据不同的情况来动态调整自己的发包的速度,小则让自己的连接更稳定,大则让整个网络更稳定。在你阅

2015-07-23 10:44:44 666

转载 网络通信 001:TCP 的那些事儿(上)

原文地址:http://coolshell.cn/articles/11564.htmlTCP是一个巨复杂的协议,因为他要解决很多问题,而这些问题又带出了很多子问题和阴暗面。所以学习TCP本身是个比较痛苦的过程,但对于学习的过程却能让人有很多收获。关于TCP这个协议的细节,我还是推荐你去看W.Richard Stevens的《TCP/IP 详解 卷1:协议》(当然,你也可以去读一下

2015-07-23 10:40:01 533

转载 iOS积累 003:iOS中延时执行的几种方式的比较和汇总

转载自:http://blog.sina.com.cn/s/blog_8280f5ec0101k03c.html本文列举了四种延时执行某函数的方法及其一些区别。假如延时1秒时间执行下面的方法。- (void)delayMethod { NSLog(@"execute"); }1.performSelector方法[self performSelector:@

2015-07-02 10:27:48 556

原创 iOS9 new_001:iOS9网络适配(ATS)

下载Xcode7打开APP后大家都发现自己的APP无法联网了,why?苹果官方文档介绍如下:App Transport SecurityApp Transport Security (ATS) enforces best practices in the secure connections between an app and its back end. ATS preven

2015-07-01 15:42:06 1799

原创 iOS积累 002:UIImage的缩放与压缩

最近实习,比较忙,知识点没有办法细讲,我会先放上代码与总结,作为给大家的接口,知识点细节以后再补。1、UIImage的缩放-(UIImage*)originImage:(UIImage *)image scaleToSize:(CGSize)size{ // 创建一个bitmap的context // 并把它设置成为当前正在使用的context UIGraph

2015-06-02 22:19:30 519

原创 iOS积累 001:不使用storyboard进行开发的简单初始化

自学的时候一直都是看着书用storyboard进行开发,觉得还挺方便。但真正实习的时候,组里都是用纯代码开发的,因此开始彻底抛弃storyboard。今天就来简单介绍下如何在不用storyboard的情况下进行最基本的开发。1、创建工程,删除main.storyboard。同时将设置页面的“General->Development Info->Main Interface”栏中内容

2015-05-23 13:46:31 2537

原创 iOS开发学习001_01:Address Book 01 显示通讯录中某人姓名、电话

Address Book主要是用于获取用户通讯录信息。有关的framework主要是Address Book UI和Address Book。以下将先通过几个例子对其进行介绍,再进行查漏补缺。先来做个快速了解,创建一个简单app,选取用户通讯录中某个人,并显示其姓名及电话。1、创建工程,导入Address Book UI、Address Book framewo

2015-05-21 11:51:41 574

原创 [C++]LeetCode 28: Implement strStr() (实现strStr()函数)

Problem:Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.分析:int strStr(char* haystack, char* needle) 的作用是寻找needle

2015-05-19 21:16:43 464

原创 [C++]LeetCode 12: Integer to Roman(将整数转换为罗马数字)

Problem:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.分析:题目的要点在于罗马数字规则,见百度百科中罗马数字词条。剩下的就是写出与规则对应的逻辑。AC Code(C++):cla

2015-05-19 21:08:25 1255

原创 [C++]LeetCode 11: Container With Most Water(最大容积/最大矩形面积)

Problem: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 line i is at (i, ai) and (i,

2015-05-19 20:57:52 700

原创 [C++]LeetCode 5: Longest Palindromic Substring(最长回文子串)

Problem:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.分析:最长回

2015-05-19 16:46:54 619

原创 [C++]LeetCode 27: Remove Element(删除数组中指定元素)

Problem:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond the new leng

2015-05-03 09:59:43 3423

原创 [C++]LeetCode 26: Remove Duplicates from Sorted Array(有序数组去重)

Problem:Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in pl

2015-05-02 21:43:54 911

原创 [C++]LeetCode 21: Merge Two Sorted Lists(合并链表)

Problem: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.分析:归并排序的最后一个步骤。链表的归并的一个好处是当一个链表已经NULL时,只需

2015-05-02 21:15:53 453

原创 [C++]LeetCode 20: Valid Parentheses(判断运算符有效性)

Problem: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

2015-05-02 20:53:27 437

原创 [C++]LeetCode 19: Remove Nth Node From End of List(删除链表中倒数第n个节点)

Problem: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

2015-05-02 20:23:33 430

原创 [C++]LeetCode 14: Longest Common Prefix(最长公共前缀)

Problem:Write a function to find the longest common prefix string amongst an array of strings.分析:题目非常简单明了:求一组字符串的最长前缀。指明是前缀,只需将各个字符串中字符一一比较即可。有两种比较方式:1、两两比较,再将前缀结果与下一个比较。2、依次比较第i位上所有字符

2015-05-02 19:19:45 1269

原创 [C++]LeetCode 9: Palindrome Number(判断整数是否是回文数)

Problem:Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to st

2015-05-02 15:42:47 2385

原创 [C++]LeetCode 8:String to Integer (atoi)(字符串转int)

Problem: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

2015-05-02 14:36:37 440

原创 [C++]LeetCode 7:Reverse Integer(翻转整数)

Problem:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321Have you thought about this?Here are some good questions to ask before coding. Bonus poin

2015-05-02 14:23:48 2808

原创 [C++]LeetCode 6: ZigZag Conversion(ZigZag排序)

Problem: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

2015-04-29 22:20:12 606

原创 [C++]LeetCode 3: Longest Substring Without Repeating Characters(最长不重复子串)

Problem:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length

2015-04-29 09:44:06 534

原创 [C++]LeetCode 2: Add Two Numbers(链表逆序加法)

Problem: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

2015-04-28 21:37:21 669

原创 [C++]LeetCode 1: Two Sum(无序数组求指定和)

Problem:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the tar

2015-04-28 20:16:29 1152

原创 Python学习笔记(八):面向对象编程、错误调试和测试(快速入门篇)

看完自强学堂的介绍后,觉得少讲了很多在《Head First Python》和《Python基础教程》中有的东西,于是借廖雪峰的博客进行进一步补充:http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000由于是补充,所以这里仅提及在前面笔记中缺少的东西,不做重复介绍。面向对象编程使用–slot

2015-04-20 11:27:33 1530

原创 Python学习笔记(七):高级特性、函数式编程、模板(快速入门篇)

看完自强学堂的介绍后,觉得少讲了很多在《Head First Python》和《Python基础教程》中有的东西,于是借廖雪峰的博客进行进一步补充:http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000由于是补充,所以这里仅提及在前面笔记中缺少的东西,不做重复介绍。高级特性列表生成式运用列表

2015-04-19 16:41:09 794

原创 Python学习笔记(六):多线程、XML、JSON(快速入门篇)

以下是入门python看自强学堂的笔记,网址为http://www.ziqiangxuetang.com/python/python-tutorial.html多线程多线程类似于同时执行多个不同程序,多线程运行有如下优点:使用线程可以把占据长时间的程序中的任务放到后台去处理。用户界面可以更加吸引人,这样比如用户点击了一个按钮去触发某些事件的处理,可以弹出一个进度条来显示处理的进度程序的运行速度

2015-04-19 13:44:35 801

原创 Python学习笔记(五):CGI编程、SMTP发送邮件(快速入门篇)

以下是入门python看自强学堂的笔记,网址为http://www.ziqiangxuetang.com/python/python-tutorial.htmlCGI编程CGI(Common Gateway Interface),通用网关接口,它是一段程序,运行在服务器上如:HTTP服务器,提供同客户端HTML页面的接口。网页浏览为了更好的了解CGI是如何工作的,我们可以从在网页上点击一个链接或UR

2015-04-19 11:25:49 2126

原创 Python学习笔记(四):面向对象、正则表达式(快速入门篇)

以下是入门python看自强学堂的笔记,网址为http://www.ziqiangxuetang.com/python/python-tutorial.html面向对象面向对象技术简介类(Class): 用来描述具有相同的属性和方法的对象的集合。它定义了该集合中每个对象所共有的属性和方法。对象是类的实例。类变量:类变量在整个实例化的对象中是公用的。类变量定义在类中且在函数体之外。类变量通常不作为实例

2015-04-19 10:32:36 500

原创 Python学习笔记(三):Time、函数、模块、文件I/O、异常处理(快速入门篇)

以下是入门python看自强学堂的笔记,网址为http://www.ziqiangxuetang.com/python/python-tutorial.html日期和时间(import time、calendar)不想讲过多,需要函数直接链接 http://www.ziqiangxuetang.com/python/python-date-time.html函数定义一个函数你可以定义一个由自己想要

2015-04-18 22:32:04 804

原创 Python学习笔记(二):语句、数据类型(快速入门篇)

Python学习笔记(二):语句、数据类型以下是入门python看自强学堂的笔记,网址为http://www.ziqiangxuetang.com/python/python-tutorial.html语句(部分)条件语句由于 python 并不支持 switch 语句,所以多个条件判断,只能用 elif 来实现。if 判断条件: 执行语句……else: 执行语句……当判断条件为

2015-04-18 21:17:11 562

原创 Python学习笔记(一):基础语法、变量类型、运算符(快速入门篇)

以下是入门python看自强学堂的笔记,网址为http://www.ziqiangxuetang.com/python/python-tutorial.html同时,补充阅读有http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000Head First Python、Python基础教程下划线

2015-04-18 20:00:00 609

原创 beginning, not the end(更新于2015.04.18)

找实习之旅还在继续,对自己和对以后的工作有了些新的想法,总是想写技术博客,但一直无法坚持,换了又换,停了又停。如今算是一个开始吧,把从今天起学习的东西记录下来~最近应该主要是python和ios的东西吧,实习方面的东西以后有时间再整理下,帮助后人~

2015-04-18 19:57:07 327

空空如也

空空如也

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

TA关注的人

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