自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(47)
  • 资源 (1)
  • 收藏
  • 关注

原创 Linux 获取网口详细信息

一般来说,研究 ifconfig.c 源代码就可以达到目的了。但是Linux已经提供了比较方便的获取网口信息的方式:[philip@catonbj ~]$ cat /sys/class/net/em1/statistics/rx_bytes 3911191274在/sys/class/net/INTERFACE/statistics/ 目录下有所有网口的状态

2015-09-17 15:55:06 3095

原创 AM335X Nand Flash 启动调试

Nand 调试成功了。具体修改下面描述:硬件修改:根据原理图发现 AM335X 目前默认是 SD 卡启动,所以需要配置一下 SYSBOOT 从NAND启动,官方文档: http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide这里对 SYSBOOT 的配置有详细的介绍,结合 AM3

2015-07-21 10:09:06 3972

原创 【吐槽】MAC 和 iOS 开发貌似相差挺大的

如题,MAC 和 iOS 除了使用同样的语言,同样的IB文件以外,貌似没啥相似点了。首先,iOS 使用的控件都是 UIxxx开头,MAC都是 NSxxx开头,NS 是 NeXTSTEP 的简称。其次,iOS 以单一界面为主,而MAC则已多window为主,View & View Controller 被弱化。最后,iOS Github 资源非常多,MAC则非常少,满扯淡的。

2015-07-13 14:09:36 669

原创 kxmovie ffmpeg 移植

背景介绍大约一年前 kxmovie 停止更新了(今天2015-06-26),可能有些问题并没有即时得到解决。硬件环境:macbook retina 15 , 2015-05月发布的那款系统 mac os x 10.10.3xcode 6.3.2根据 https://github.com/kolyvan/kxmovie Readme.md 中介绍环境准备步骤:

2015-06-26 16:45:58 979

原创 Sqlite3 导出/导入SQL语句

前言Sqlite3 提供了较轻便的数据库操作,

2014-11-06 14:25:26 15097

原创 HTTP Server如何禁止浏览器缓存数据

前言往往浏览器保存一些数据,方便下次加载的时候

2014-11-03 16:21:51 1702

原创 【冷知识】Linux Telnet登录变慢 解决办法

起因调试期间,发现某个版本telnet变得yua

2014-09-28 16:22:29 1755

原创 【Leetcode】Implement strStr()

问题Implement strStr().Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.代码int hashCode(char* needle , int c){ int hashcode = 0;

2014-06-16 00:19:32 439

原创 【Leetcode】Remove Element

问题代码class Solution {public: int removeElement(int A[], int n, int elem) { if (n == 0) { return n; } int slot = 0; for (int i = 0 ; i < n ; i++) { if (elem == A[i]) { con

2014-06-16 00:16:01 412

原创 【Leetcode】Remove Duplicates from Sorted Array

问题代码class Solution {public: int removeDuplicates(int A[], int n) { if (n == 0 || n == 1) { return n; } int flag = A[0]; int slot = 1; for (int i = 1 ; i < n ; i++) {

2014-06-16 00:14:53 502

原创 【Leetcode】Reverse Nodes in k-Group

问题Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain

2014-06-16 00:13:26 433

原创 【Leetcode】Swap Nodes in Pairs

问题Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant

2014-06-16 00:10:56 439

原创 【Leetcode】Merge k Sorted Lists

问题代码分析总结

2014-06-05 00:37:17 510

原创 【C++ STL Map】遍历

问题代码分析jieg

2014-06-04 23:58:22 1553

原创 【Leetcode】Generate Parentheses

问题代码分析总结

2014-05-30 12:00:45 772

原创 【Leetcode】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

2014-05-30 11:54:05 598

原创 【Leetcode】Remove Nth Node From End of List

问题代码class Solution {public: ListNode *removeNthFromEnd(ListNode *head, int n) { if (!head) { return head; } ListNode *temp = head; ListNode *probe = NULL; ListNode *prev =

2014-05-30 11:49:56 544

原创 【Leetcode】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.Inpu

2014-05-30 11:43:54 598

原创 【Leetcode】3Sum Closest

问题代码分析总结

2014-05-30 11:38:48 530

原创 【Leetcode】4Sum

问题代码分析分析2总结

2014-05-30 11:32:33 542

原创 【Leetcode】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:Elements in a triple

2014-05-30 11:25:06 563

原创 【Leetcode】Longest Common Prefix

问题代码class Solution {public: string longestCommonPrefix(vector &strs) { int len = strs.size(); if (len == 1) { return strs[0]; } if (len == 0) { return ""; } st

2014-05-30 11:14:28 571

原创 【Leetcode】Container With Most Water

问题代码分析总结

2014-05-30 11:10:29 516

原创 【Leetcode】Regular Expression Matching

问题Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire

2014-05-30 11:03:41 526

原创 【Leetcode】Palindrome Number

问题代码分析总结

2014-05-23 00:25:40 413

原创 【Leetcode】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

2014-05-23 00:20:20 445

原创 【Leetcode】Reverse Integer

问题Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321代码分析总结

2014-05-23 00:12:02 394

原创 【Leetcode】ZigZag Conversion

问题:ZigZag

2014-05-23 00:00:14 472

原创 【Leetcode】Longest Palindromic Substring Part

问题代码分析总结

2014-05-20 23:42:53 368

原创 【Leetcode】Median of Two Sorted Arrays

问题:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).代码:分析:总结:

2014-05-20 00:42:40 416

原创 【Leetcode】Add Two Numbers

问题:代码:分析:总结:

2014-05-20 00:08:53 365

原创 【Leetcode】Longest Substring Without Repeating Characters

问题:代码://// lssworc.cpp// Test//// Created by mac on 5/19/14.// Copyright (c) 2014 mac. All rights reserved.//#include "lssworc.h"#include #include #include using namespace std;

2014-05-20 00:01:10 430

原创 【Leetcode】TwoSum

//// toSum.cpp// Test//// Created by mac on 5/18/14.// Copyright (c) 2014 mac. All rights reserved.//#include "toSum.h"#include #include #include using namespace std;struct node{

2014-05-18 23:05:41 436

原创 【算法导论】分治法

一. 前言看了分治法的部分,

2014-05-16 23:24:30 456

原创 【算法导论】归并排序,C语言实现

void merge(int* A , int p , int q , int r){ static int counter =0; printf("%d st int here\n" , counter ++); /* create two arrays */ int LASize = (q - p + 1); int RaSize = (r - q +

2014-05-16 22:45:42 478

原创 C 语言实现多态的原理:函数指针

C语言实现多态的原理:函数指针何为函数指针?答案:C Programming Language. 可以查阅下,从原理上来讲,就是一个内存地址,跳过去执行对应的代码段。既然如此,在运行时决定跳到哪个地方去执行特定的代码即可。一个简单的版本:以音频解码器作为例子:AAC 解码器,Mpeg解码器,以及其他类型的解码器。那手动的多态可能会这样实现:U32 audioHandle

2014-05-16 14:40:02 3483 2

原创 Mac 下运用LLDB 搭建编译环境

Mac下GDB不太好用在Mac下使用gdb调试bi

2014-05-15 16:55:06 2080

原创 改变 DTDefaultLineHeightMultiplier 引发的文章中图片间隔太大的BUG 以及解决方案

DTDefaultLineHeightMultiplier 这个是用来设置 行间距的大小一个因子,根据行的高度,乘以这个因子就可以得出这行需要多少高度,最后文字居中,就形成了视觉上的行间距。1.0 即最原始的,1.2 则高度为原来的1.2倍。也就是说第一行与第二行之间存在 20% * 文字高度的行间距。既然了解了这个机制之后,当文章中存在  costomView 比如一张图片。此时会使用图片的

2013-04-18 02:10:48 2575 1

原创 在DTCoreText 中添加自定义的文章头,自定义View

再DTCoreText 中添加自定义的文章头部,事实上原理很简单,需要改动DTCoreText 的代码即可。   DTAttributedTextView 事实上是一个ScrollView , 中间包含了一个 DTAttributedTextContentView , 实际上再里面添加一个 headerView 并添加到头部,调整 DTAttributedTextContentView 的

2013-04-18 01:51:42 2682 1

原创 关于 IOS 开发中遇到的 读取 cell xib 文件时导致死机的问题。

下面这句话看上去没有什么问题,但是偏偏在这个地方APP crash了。cell = [[[NSBundlemainBundle]loadNibNamed:CellIdentifierowner:selfoptions:nil]lastObject];在google.ca,搜索了下: loadNibNamed crash . 得到了这样的一条关键信息:http://s

2013-03-29 00:07:24 2538

the linux programming interface <英文版> 文字版

2010 .10月份 刚出的新书 英文版,不错的工具书。文字版,大家可以疯狂复制。而且不像图片那么大。1550 页。

2011-06-14

空空如也

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

TA关注的人

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