首页 > 其他
JVM学习03_new对象的内存图讲解,以及引出static方法(转)
目录-=-讲解对象创建过程中,-=-堆内存和栈内存的情况-=-构造函数对类对象的成员变量的初始化过程-=-构造函数出栈-=-类的方法在不访问类对象的成员变量时造成的内存资源浪费怎么解决?-=-引出static方法扯淡--明确概念:-=-类:是对现实事物的抽象描述;举例:人,有年龄,姓名,高矮胖瘦等特...
分类:其他   时间:2015-03-20 09:09:23    收藏:0  评论:0  赞:0  阅读:374
三级联动
public void getProdata() //第一级 { List list = new List(); var query = from r in DataC.ChinaStates where r.ParentAreaCode == "0001" sel...
分类:其他   时间:2015-03-20 09:09:13    收藏:0  评论:0  赞:0  阅读:191
关于反射的一些理解
1、 什么是反射 2、 命名空间与装配件的关系 3、 运行期得到类型信息有什么用 4、 如何使用反射获取类型 5、 如何根据类型来动态创建对象 6、 如何获取方法以及动态调用方法 7、 动态创建委托1、什么是反射 Reflection,中文翻译为反射。 这是.Net中获取运行时类型信息的方式...
分类:其他   时间:2015-03-20 09:08:33    收藏:0  评论:0  赞:0  阅读:189
LeetCode – Refresh – Longest Substring Without Repeating Characters
For this problem, we are OK to use hash set, since no numbers are needed. 1 class Solution { 2 public: 3 int lengthOfLongestSubstring(string s) { ...
分类:其他   时间:2015-03-20 09:07:33    收藏:0  评论:0  赞:0  阅读:309
一个技术派创业者的反思
我认为技术派创业者最大的短板是缺少商业思维,另一个短板是对技术或产品洁癖,错失商业化机会。...
分类:其他   时间:2015-03-20 08:05:23    收藏:0  评论:0  赞:0  阅读:341
LeetCode – Refresh – Linked List Cycle
Just use two pointers. CC150 classical question 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNo...
分类:其他   时间:2015-03-20 08:04:13    收藏:0  评论:0  赞:0  阅读:316
LeetCode – Refresh – Longest Common Prefix
Seach one by one. 1 class Solution { 2 public: 3 string getNext(const string& s1, const string& s2) { 4 int len = min(s1.size(), s2.size()...
分类:其他   时间:2015-03-20 08:04:03    收藏:0  评论:0  赞:0  阅读:237
LeetCode – Refresh – Longest Substring with At Most Two Distinct Characters
At first beginning, I was trying to use hash set to record the characters. But I found that was wrong.Because if there are couple same chars, when you...
分类:其他   时间:2015-03-20 08:03:43    收藏:0  评论:0  赞:0  阅读:349
LeetCode – Refresh – Longest Palindromic Substring
O(n2): 1 class Solution { 2 public: 3 string getP(string s, int start, int end) { 4 while (start >= 0 && end result.size()) result = s1;1...
分类:其他   时间:2015-03-20 08:03:03    收藏:0  评论:0  赞:0  阅读:254
LeetCode – Refresh – Length of Last Word
Tried it with spliting words method. But need to check empty situation. 1 class Solution { 2 public: 3 int lengthOfLastWord(const char *s) { 4 ...
分类:其他   时间:2015-03-20 08:02:43    收藏:0  评论:0  赞:0  阅读:350
输出类似于国际象棋的棋盘
1 document.onclick = function () {//这个函数将输出类似于国际象棋的棋盘 2 var tempx = 0; //x坐标 3 var tempy = 0; //y坐标 4 var...
分类:其他   时间:2015-03-20 08:02:33    收藏:0  评论:0  赞:0  阅读:227
LeetCode – Refresh – Longest Consecutive Sequence
It use the hashset to do the tricks. 1 class Solution { 2 public: 3 int longestConsecutive(vector &num) { 4 int len = num.size(), result =...
分类:其他   时间:2015-03-20 08:02:13    收藏:0  评论:0  赞:0  阅读:282
LeetCode – Refresh – Linked List Cycle II
1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), ne...
分类:其他   时间:2015-03-20 08:02:03    收藏:0  评论:0  赞:0  阅读:316
LeetCode – Refresh – Largest Rectangle in Histogram
Use two vector to record left and right indexes that can extend the blocks. 1 class Solution { 2 public: 3 int largestRectangleArea(vector &height...
分类:其他   时间:2015-03-20 08:01:43    收藏:0  评论:0  赞:0  阅读:324
LeetCode – Refresh – Letter Combination of a Phone Number
This is just a combination. Use hashtable to hold the number ==> charsnotes:1. check corner case : input is empty, do not return vector contains empty...
分类:其他   时间:2015-03-20 08:01:33    收藏:0  评论:0  赞:0  阅读:351
常用设计模式的类图
分类:其他   时间:2015-03-20 08:01:13    收藏:0  评论:0  赞:0  阅读:334
位运算和关于两个数交换的多种方法
用位运算来交换两个数的值,值得学习...
分类:其他   时间:2015-03-20 06:59:13    收藏:0  评论:0  赞:0  阅读:313
LeetCode – Refresh – Largest Number
Corner case: when all the elements are 0. It should return "0", not "00000000".It use string to compare all the numbers. 1 class Solution { 2 public: ...
分类:其他   时间:2015-03-20 06:56:33    收藏:0  评论:0  赞:0  阅读:301
养生四字经
衣衣不过厚,不怕温高,衣不过薄,不怕风高。食吃米带糠,吃菜带帮,男不离韭,女不离藕,青红萝卜,生克熟补,食不过饱,饱不急卧。住春不露脐,夏不睡石,秋不睡板,冬不蒙头。按时入睡,定时起床,起身要慢,勿急勿慌。行站如松直,坐如钟稳,动如风意,睡如弓形。传统的养生之道:养身在动,养心在静。饮食有节,起居有...
分类:其他   时间:2015-03-20 06:56:13    收藏:0  评论:0  赞:0  阅读:257
LeetCode – Refresh – Jump Game II
Same with Jump Game I. Just need a step parameter and assume there is no "0" value in the array. 1 class Solution { 2 public: 3 int jump(int A[], ...
分类:其他   时间:2015-03-20 06:55:23    收藏:0  评论:0  赞:0  阅读:200
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!