To do this in Android Studio go to Preferences > Editor > Code Style
and set Right margin (columns)
to 150
(or the line width you want)
Now go to File -> Settings > Editor > Code Style > Java > Wrapping and Braces
/* Applies to the entire body of the HTML document (except where overridden by more specific | |
selectors). */ | |
body { | |
margin: 25px; | |
background-color: rgb(240,240,240); | |
font-family: arial, sans-serif; | |
font-size: 14px; | |
} | |
/* Applies to all <h1>...</h1> elements. */ |
/** | |
* Luhn Class is an implementation of the Luhn algorithm that checks validity of a credit card number. | |
* | |
* @author <a href="http://www.chriswareham.demon.co.uk/software/Luhn.java">Chris Wareham</a> | |
* @version Checks whether a string of digits is a valid credit card number according to the Luhn algorithm. 1. Starting with the second to last digit and | |
* moving left, double the value of all the alternating digits. For any digits that thus become 10 or more, add their digits together. For example, | |
* 1111 becomes 2121, while 8763 becomes 7733 (from (1+6)7(1+2)3). 2. Add all these digits together. For example, 1111 becomes 2121, then 2+1+2+1 is | |
* 6; while 8763 becomes 7733, then 7+7+3+3 is 20. 3. If the total ends in 0 (put another way, if the total modulus 10 is 0), then the number is valid | |
* according to the Luhn formula, else it is not valid. So, 1111 is not valid (as shown above, it comes out to 6), while 8763 is valid (as shown | |
* above, it comes ou |
// Can currently do this | |
func titleForSection1(section: Int) -> String? { | |
switch section { | |
case 0: return "Foo" | |
case 1: return "Bar" | |
default: return nil | |
} | |
} | |
// But I want to do this to remove the redundant returns |
import com.jakewharton.rxrelay.PublishRelay; | |
import com.jakewharton.rxrelay.Relay; | |
import rx.Observable; | |
public class RxBus { | |
private static final RxBus INSTANCE = new RxBus(); | |
private final Relay<Object, Object> busSubject = PublishRelay.create().toSerialized(); |
/// This is free and unencumbered software released into the public domain. | |
/// | |
/// Anyone is free to copy, modify, publish, use, compile, sell, or | |
/// distribute this software, either in source code form or as a compiled | |
/// binary, for any purpose, commercial or non-commercial, and by any | |
/// means. | |
/// | |
/// In jurisdictions that recognize copyright laws, the author or authors | |
/// of this software dedicate any and all copyright interest in the | |
/// software to the public domain. We make this dedication for the benefit |
A string identifying the build system action being performed.
The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT
). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.
A string identifying the build system action being performed.
The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT
). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.
When working with online editor, the back gesture on a Mac can become very frustrating. Here are some helpful commands disable the back gesture:
# Disable back gesture in specific apps
# Chrome
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE
# FireFox
defaults write org.mozilla.firefox AppleEnableSwipeNavigateWithScrolls -bool FALSE
# Brave