原创 c簡單定時器(兼容window/linux)

#include <stdio.h> #include <stdlib.h> #include <time.h> #ifdef WIN32 #include <windows.h> typedef __int64

原创 動態調試APK-超實用

  經過兩天的苦逼奮戰,終於得到想要的東西了,出現的磕磕碰碰的心情,在出結果的那一刻,無以言表,所有資料來源於網絡,我稍稍整理一下。 1. 工具 IntelliJ IDEA eclipse apktool(2.0以上版本,下載地

原创 【leetcode】12. Integer to Roman

先了解一下什麼是羅馬數字 /** * Given an integer, convert it to a roman numeral. * Input is guaranteed to be within the range

原创 vs 2013 cl 查看內存模型使用方法

開始->所有程序->Visual Studio 2013 -> Visual Studio Tools 在打開的文件夾中選擇 VS2013 x86 Native Tools Command Prompt 命令行輸入 cl

原创 【leetcode】 1. Two Sum

/** * Given an array of integers, return indices of the two numbers such that * they add up to a specific target.

原创 【leetcode】11. Container With Most Water

/** * Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). * n ver

原创 【leetcode】9. Palindrome Number

/** * Determine whether an integer is a palindrome. Do this without extra space. */ #include <iostream> #include

原创 c 保存json數據到結構體

  在c語言跟android打交道時,避免不了從android層傳遞json數據到c層,如果傳來的是一個配置項,保存到c的結構體中,如果配置項中有一、兩項,那一個一個解析放到結構體中也並不麻煩,問題來了,如果配置項多一些就顯的代碼

原创 【leetcode】3. Longest Substring Without Repeating Characters

/** * Given a string, find the length of the longest substring without repeating characters. * For example, the

原创 動態規劃:從新手到專家

本文轉載自:http://hawstein.com/posts/dp-novice-to-advanced.html (作者:Hawstein) 前言 我們遇到的問題中,有很大一部分可以用動態規劃(簡稱DP)來解。 解決這類問題可

原创 【leetcode】15. 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 tri

原创 【leetcode】5. Longest Palindromic Substring

/** * Given a string S, find the longest palindromic substring in S. * You may assume that the maximum length of

原创 【leetcode】2. Add Two Numbers

/** * You are given two linked lists representing two non-negative numbers. * The digits are stored in reverse o

原创 高併發性能調試經驗分享

作者:helloworlds 鏈接:https://zhuanlan.zhihu.com/p/21348220 來源:知乎 引文 4月份的時候看到一道面試題,據說是騰訊校招面試官提的:在多線程和高併發環境下,如果有一個平均運行一百萬次

原创 位運算的函數整理

/**************************************************** * 判斷參數x是否是偶數 * * param[in] x 數值 * return 1