自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Keep It Simple, Stupid

新博客网址:http://ningto.com

原创 playground color list

import UIKit var str = "Hello, playground" let colors = [ "Air Force Blue":(red:93, green:138, blue:168), "Bitters...

2015-04-29 22:31:35

阅读数 576

评论数 0

原创 枚举句柄

#include #include #include static const int s_max = 1024; BOOL CALLBACK EnumWindowsProc(HWND, LPARAM); BOOL CALLBACK EnumChildWindowsProc(HWND, ...

2015-04-28 23:10:35

阅读数 534

评论数 0

原创 Reverse Bits

Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), ret...

2015-04-17 15:55:13

阅读数 614

评论数 0

原创 Excel Sheet Column Number

Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. For example:...

2015-04-17 15:49:36

阅读数 423

评论数 0

原创 Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space. 代码: class Solution { public: bool isPalindrome(int x) { if (x <...

2015-04-17 15:49:32

阅读数 356

评论数 0

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

2015-04-17 15:46:55

阅读数 417

评论数 0

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

2015-04-17 15:44:51

阅读数 389

评论数 0

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

2015-04-17 15:41:23

阅读数 1634

评论数 0

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

2015-04-17 15:41:19

阅读数 371

评论数 0

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

2015-04-17 15:38:44

阅读数 381

评论数 0

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

2015-04-17 15:36:44

阅读数 393

评论数 0

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

2015-04-17 15:34:56

阅读数 307

评论数 0

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

2015-04-17 15:30:43

阅读数 378

评论数 0

原创 QLabel根据拉伸宽度自动加省略点和ToolTip

#pragma once #include class ElidedLabel : public QLabel { Q_OBJECT public: explicit ElidedLabel(QWidget *parent=0, Qt::WindowFlags f=0); expli...

2015-04-10 18:24:59

阅读数 2548

评论数 0

原创 QTableWidget无限加载

#ifndef MYTABLE_H #define MYTABLE_H #include class RowWidget : public QWidget { public: explicit RowWidget(int id, QWidget *parent=0); ~Ro...

2015-04-09 18:48:02

阅读数 1169

评论数 0

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