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 CheckableFrameLayout extends FrameLayout implements Checkable { | |
private static final int[] CHECKED_STATE_SET = { | |
android.R.attr.state_activated, | |
android.R.attr.state_checked, | |
}; | |
private boolean mChecked; | |
public CheckableFrameLayout(Context context) { | |
super(context); |
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
String.prototype.toSnakeCase = function() { | |
var upperChars = this.match(/([A-Z])/g); | |
if (! upperChars) { | |
return this; | |
} | |
var str = this.toString(); | |
for (var i = 0, n = upperChars.length; i < n; i++) { | |
str = str.replace(new RegExp(upperChars[i]), '_' + upperChars[i].toLowerCase()); | |
} |
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
function setUserAgent(window, userAgent) { | |
// Works on Firefox, Chrome, Opera and IE9+ | |
if (navigator.__defineGetter__) { | |
navigator.__defineGetter__('userAgent', function () { | |
return userAgent; | |
}); | |
} else if (Object.defineProperty) { | |
Object.defineProperty(navigator, 'userAgent', { | |
get: function () { | |
return userAgent; |
October 28, 2020
https://reactnative.dev/blog/2020/07/17/react-native-principles
- Our top priority for React Native is to match the expectations people have for each platform. This is why React Native renders to platform primitives. We value native look-and-feel over cross-platform consistency.
- In order to match the look-and-feel of native apps, we must also match their performance.
- Great user experiences are created iteratively. It should only take a few seconds to seeing the result of code changes in a running app. React Native's architecture enables it to provide near-instant feedback during development.
- Teams can easily leverage the fast-growing ecosystem of high quality open source packages. Teams can also share business logic between Android, iOS, and the web. This helps them ship updates faster and reduce organizational silos between platform teams.
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
#!/usr/bin/env ruby | |
# gem install active_support | |
require 'active_support/inflector' | |
require 'active_support/core_ext/string' | |
# gem install webrick (only ruby3) | |
require 'webrick' | |
# gem install mechanize |