- acces control: public, private, protected or package-private (no modifier)
- nested classes: static nested classes (the class is a member of its enclosing class) vs. inner classes (objects that are instances of an inner class exist within an instance of the outer class and have direct access to that object's methods and fields. Also, because an inner class is associated with an instance, it cannot define any static members itself)
- enum + error handling, use enum instead of constants
- [type casting](http://www.studytonight.com/java/
This file contains 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
// to find which module not named "%anim%" is requiring an "%anim%" module: | |
// add a conditional breakpoint on the first line of addModule in yui.js | |
arr = o.requires || []; res = false; for (i = 0; i < arr.length; i++) { if (arr[i].match(/anim/) && !name.match(/anim/)) { res = true; }}; res |
This file contains 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
Filed: https://bugs.webkit.org/show_bug.cgi?id=185869 |
This file contains 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
Filed: https://bugs.webkit.org/show_bug.cgi?id=185906 |
There's an issue with instanceof
and object coming from different frames, e.g.
- feross/buffer#166
- https://bugs.webkit.org/show_bug.cgi?id=185906 (data retrieved from indexedDB constructed from another frame...)
Several implementations of the workaround using Object.prototype.toString.call(...)
:
This file contains 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
with columns as ( | |
select x.table_name, string_agg(x.column, E'\n') as columns | |
from ( | |
select | |
table_name, | |
( | |
column_name || | |
' ' || data_type || | |
' ' || (case when is_nullable is null or is_nullable = 'YES' then 'NULL' else 'NOT NULL' end) || | |
' DEFAULT ' || (case when column_default is null then 'NULL' else column_default end) |