Removing last object of ArrayList in Java -- the list.remove(list.size() - 1) - this is O(1), as numMoved...

Please Visit: http://ift.tt/1ajReyV

Removing last object of ArrayList in Java
-- the
list.remove(list.size() - 1) - this is O(1), as numMoved is 0.

JDK should rename remove(int index) to meaningful name such as removeIndex. - and deprecate the old one.
final ArrayList<Integer> a1 = Lists.newArrayList(1, 2, 3);
// a1.remove(a1.get(0)); // remove object
a1.remove((Integer) 1); // remove object
a1.remove(1); // remove index

public E remove(int index) {
rangeCheck(index); // throws an exception if out of bounds

modCount++; // each time a structural change happens
// used for ConcurrentModificationExceptions

E oldValue = elementData(index);

int numMoved = size - index - 1;
if (numMoved > 0)
System.arraycopy(elementData, index+1, elementData, index,
numMoved);
elementData[--size] = null; // Let gc do its work

return oldValue;
}


from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1lklk1L
via LifeLong Community

The five keys to a successful Google team Who is on a team matters less than how the team members interact...

Please Visit: http://ift.tt/1ajReyV

The five keys to a successful Google team
Who is on a team matters less than how the team members interact, structure their work, and view their contributions.
Psychological safety: Can we take risks on this team without feeling insecure or embarrassed?
Dependability: Can we count on each other to do high quality work on time?
Structure & clarity: Are goals, roles, and execution plans on our team clear?
Meaning of work: Are we working on something that is personally important for each of us?
Impact of work: Do we fundamentally believe that the work we’re doing matters?
http://ift.tt/1S4fQ62



from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1NwqapD
via LifeLong Community

Use Chrome new tab to take notes html: data:text/html, plaintext: data:text/html...

Please Visit: http://ift.tt/1ajReyV

Use Chrome new tab to take notes
html: data:text/html, <body contenteditable>
plaintext: data:text/html, <textarea contenteditable>
When u accidentally close it, just ctrl+shift+w to reopen it, chrome keeps what u wrote before. Cool!



from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1MGakFk
via LifeLong Community

G+: Make load next page faster - especailly in mobile Pre-load next page when user is scrolling in current...

Please Visit: http://ift.tt/1ajReyV

G+: Make load next page faster - especailly in mobile
Pre-load next page when user is scrolling in current page.


from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1XhzJNM
via LifeLong Community

Reshared post from Ana Maria Restrepo:

Please Visit: http://ift.tt/1ajReyV



from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1MSNrMM
via LifeLong Community

Reshared post from Lava Kafle:

Please Visit: http://ift.tt/1ajReyV



from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1MSNrwu
via LifeLong Community

The days are long but the decades are short http://ift.tt/1N7btmC...

Please Visit: http://ift.tt/1ajReyV

The days are long but the decades are short
http://ift.tt/1DTKDcY
http://ift.tt/1I9KFWN


from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1N7btCQ
via LifeLong Community

Google Now: too many buzz news(tech, political) - focus on user's long term interest - user's career...

Please Visit: http://ift.tt/1ajReyV

Google Now: too many buzz news(tech, political) - focus on user's long term interest - user's career, skill/life improving etc

For me reading buzz news is just a waste of time.

Please recommend me the content that is personalized to me, that matters to me, that I care.
for me, it's programming,

I just watched latest walking dead or Gotham, doesn't mean I want to know more about it.

Know user's occupation, what matters to user, what's the user's long term interest.



from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1HjNx38
via LifeLong Community

Google Search: sometimes show gibberish when search non-english words + oe=UTF-8&ie=UTF-8 Google search...

Please Visit: http://ift.tt/1ajReyV

Google Search: sometimes show gibberish when search non-english words + oe=UTF-8&ie=UTF-8
Google search sometimes show gibberish when search Chinese words.

1. copy the url to a new window, still show gibberish.
But if I add oe=UTF-8&ie=UTF-8 at the end, it works well.
2. In the original window, go back and click the enter to research the word, now google search works correctly.





from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1ML8HUI
via LifeLong Community