Ctrl+KB | toggle side bar |
Ctrl+Shift+P | command prompt |
Ctrl+` | python console |
Ctrl+N | new file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.smashingmagazine.com/2010/05/15/why-a-tale-of-a-post-modern-genius/ | |
I do not write tests for my code. I do not write very many comments. I | |
change styles very frequently. And most of all, I shun the predominant | |
styles of coding, because that would go against the very essence of | |
experimentation. In short: all I do is muck around. | |
So, my way of measuring a great programmer is different from some | |
prevailing thought on the subject. I would like to hear what Matz | |
would say about this. You should ask him, seriously. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.akitaonrails.com/2012/09/03/why-documentary-at-rubyconf-2012-denver | |
Date: Thu, 19 Apr 2007 17:38:59 -0500 | |
From: why the lucky stiff <[email protected]> | |
To: [email protected] | |
Subject: SPAM: Re: Invitation for an Interview for Brazilian Blog | |
On Wed, Apr 18, 2007 at 10:28:25AM -0300, Fabio Akita wrote: | |
> First of all let me introduce myself, my name is Fabio Akita, I've written | |
> the first brazilian Rails book called "Repensando a Web com Rails". I have a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The original vision behind OOP wasn't at odds with functional programming. In fact, it looks more like modern FP than modern OOP, with its FactoryFactories and POJOs and cargo cult bullshit that are more an artifact of a failed attempt to commoditize programming talent (one which hijacked OOP) than anything else. | |
Pure functional programming is great. Alan Kay would agree. However, the world is stateful. The original inspiration for OOP was the cell, which encapsulates complex physical machinery (state and behavior) behind a simpler chemical or electrical interface. The idea wasn't that complexity is a good thing (it's not) but that, when it becomes inevitable, it needs to be sequestered so that it's only visible to the few who need to fuss with the object's internals, not to the many who need to interact with it at an API level only. | |
An "object" is a complex entity whose interface is designed for simplicity. An example of this would be a SQL database. Query optimization is complex, but the interface is much |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/questions/7889228/how-to-prevent-reflectiontypeloadexception-when-calling-assembly-gettypes | |
Type[] types; | |
try | |
{ | |
types = asm.GetTypes(); | |
} | |
catch (ReflectionTypeLoadException e) | |
{ | |
types = e.Types; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Please remember to always state | |
what you wanted to achieve; | |
what you did (the version of git and the command sequence to reproduce the behavior); | |
what you saw happen (X above); | |
what you expected to see (Y above); and | |
how the last two are different. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int getLastDayOfMonth() { | |
Calendar c = asCalendar(); | |
// move to next month and decrement from the 1st day | |
c.add(Calendar.MONTH, 1); | |
c.set(Calendar.MONTH, 1); | |
c.roll(Calendar.MONTH, 1); | |
return c.get(Calendar.DAY_OF_MONTH); | |
} | |
public String getMonthName() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name Hex Decimal | |
E_UNEXPECTED 0x8000FFFF -2147418113 | |
E_NOTIMPL 0x80004001 -2147467263 | |
E_OUTOFMEMORY 0x8007000E -2147024882 | |
E_INVALIDARG 0x80070057 -2147024809 | |
E_NOINTERFACE 0x80004002 -2147467262 | |
E_POINTER 0x80004003 -2147467261 | |
E_HANDLE 0x80070006 -2147024890 | |
E_ABORT 0x80004004 -2147467260 | |
E_FAIL 0x80004005 -2147467259 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SingleShotImageView extends ImageView { | |
public SingleShotImageView(Context context) { | |
super(context); | |
} | |
public SingleShotImageView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} |