Apache is running on port 80 and interfering with Valet.
- Stop Apache:
sudo /usr/sbin/apachectl stop - Restart Valet:
valet restart
| public class MyActivity extends Activity { | |
| @Override | |
| public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| final ComponentContext context = new ComponentContext(this); | |
| final Component component = Text.create(context) | |
| .text("Hello World!") |
| public class MyApplication extends Application { | |
| @Override | |
| public void onCreate() { | |
| super.onCreate(); | |
| SoLoader.init(this, false); | |
| } | |
| } |
| dependencies { | |
| // ... | |
| // Litho | |
| compile 'com.facebook.litho:litho-core:0.2.0' | |
| compile 'com.facebook.litho:litho-widget:0.2.0' | |
| provided 'com.facebook.litho:litho-annotations:0.2.0' | |
| annotationProcessor 'com.facebook.litho:litho-processor:0.2.0' | |
| // SoLoader |
| /** | |
| _____ _____ _ | |
| | __ \ / ____| | | | |
| | | | | ___| | _ __ _ _ _ __ | |_ ___ _ __ | |
| | | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__| | |
| | |__| | __/ |____| | | |_| | |_) | || (_) | | | |
| |_____/ \___|\_____|_| \__, | .__/ \__\___/|_| | |
| __/ | | | |
| |___/|_| | |
| */ |
| /** | |
| * Utility class for access to runtime permissions. | |
| */ | |
| public abstract class PermissionUtils { | |
| /** | |
| * Requests the fine location permission. If a rationale with an additional explanation should | |
| * be shown to the user, displays a dialog that triggers the request. | |
| */ | |
| public static void requestPermission(AppCompatActivity activity, int requestId, |
| <?php | |
| $http_status_codes = [100 => "Continue", 101 => "Switching Protocols", 102 => "Processing", 200 => "OK", 201 => "Created", 202 => "Accepted", 203 => "Non-Authoritative Information", 204 => "No Content", 205 => "Reset Content", 206 => "Partial Content", 207 => "Multi-Status", 300 => "Multiple Choices", 301 => "Moved Permanently", 302 => "Found", 303 => "See Other", 304 => "Not Modified", 305 => "Use Proxy", 306 => "(Unused)", 307 => "Temporary Redirect", 308 => "Permanent Redirect", 400 => "Bad Request", 401 => "Unauthorized", 402 => "Payment Required", 403 => "Forbidden", 404 => "Not Found", 405 => "Method Not Allowed", 406 => "Not Acceptable", 407 => "Proxy Authentication Required", 408 => "Request Timeout", 409 => "Conflict", 410 => "Gone", 411 => "Length Required", 412 => "Precondition Failed", 413 => "Request Entity Too Large", 414 => "Request-URI Too Long", 415 => "Unsupported Media Type", 416 => "Requested Range Not Satisfiable", 417 => "Expectation Failed", 418 => "I'm a teapot", 419 => "Authenti |
| (function() { | |
| var imageAddr = "https://upload.wikimedia.org/wikipedia/commons/2/2d/Snake_River_%285mb%29.jpg"; | |
| var downloadSize = 5245329; //bytes | |
| var oProgress = document.getElementById("speed"); | |
| function ShowProgressMessage(msg) { | |
| if (console) { | |
| if (typeof msg == "string") { | |
| console.log(msg); | |
| } else { |
| function checkSpeed(){ | |
| var start_time = Date.now(); | |
| var fileSizeCall = $.ajax({ | |
| type: "HEAD", | |
| url: "//tatocaster.me/20MB.zip", | |
| success: function(msg){ | |
| // 1sec == 1000ms . | |
| var timeSecs = Math.round((Date.now() - start_time)+3)/100; | |
| //1mbps == 1000kbps | |
| var sizeMB = fileSizeCall.getResponseHeader('Content-Length')/1000000; |
| public class RxBus { | |
| private static RxBus instance = null; | |
| private final Subject<Object, Object> _bus = new SerializedSubject<>(PublishSubject.create()); | |
| private static RxBus getInstance() { | |
| if (instance == null) { | |
| instance = new RxBus(); | |
| } | |
| return instance; | |
| } |