- 博客(15)
- 资源 (24)
- 收藏
- 关注
原创 playground color list
import UIKitvar str = "Hello, playground"let colors = [ "Air Force Blue":(red:93, green:138, blue:168), "Bittersweet":(red:254, green:111, blue:94), "Canary Yellow":(red:255, green:239
2015-04-29 22:31:35 677
原创 枚举句柄
#include #include #include static const int s_max = 1024;BOOL CALLBACK EnumWindowsProc(HWND, LPARAM);BOOL CALLBACK EnumChildWindowsProc(HWND, LPARAM);int main(){ EnumWindows(EnumWindowsProc
2015-04-28 23:10:35 741
原创 Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 00111001011
2015-04-17 15:55:13 709
原创 Excel Sheet Column Number
Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ...
2015-04-17 15:49:36 521
原创 Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.代码:class Solution {public: bool isPalindrome(int x) { if (x < 0) { return false; } else if (x < 10) { retur
2015-04-17 15:49:32 429
原创 Rotate Array
Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:Try to come up as many solutions as you can,
2015-04-17 15:46:55 541
原创 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 always e
2015-04-17 15:44:51 468
原创 Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 0000000000
2015-04-17 15:41:23 1700
原创 Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-negative.代码:class Solution {public: string
2015-04-17 15:41:19 449
原创 Two Sum
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 target, where
2015-04-17 15:38:44 452
原创 Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?代码:/** * Definition for singly-linked list. * struct ListNode { * int val; *
2015-04-17 15:36:44 470
原创 Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.
2015-04-17 15:34:56 376
原创 Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determi
2015-04-17 15:30:43 453
原创 QLabel根据拉伸宽度自动加省略点和ToolTip
#pragma once#include class ElidedLabel : public QLabel{ Q_OBJECTpublic: explicit ElidedLabel(QWidget *parent=0, Qt::WindowFlags f=0); explicit ElidedLabel(const QString &text, QWidget *paren
2015-04-10 18:24:59 3163
原创 QTableWidget无限加载
#ifndef MYTABLE_H#define MYTABLE_H#include class RowWidget : public QWidget{public: explicit RowWidget(int id, QWidget *parent=0); ~RowWidget();};class MyTable : public QTableWidget
2015-04-09 18:48:02 1467
xware-desktop_0.13.20141115_amd64.deb
2015-09-19
我的emacs配置
2011-10-30
GDI+ SDK参考(翻译版本)
2011-05-17
wtl81 支持vs2010
2011-03-18
WTL81_9127
2011-02-26
C++设计模式(用C++写的还有简单的介绍)
2011-01-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人