-
Stop the docker daemon:
sudo service docker stop
-
Add a configuration file to tell the docker daemon what is the location of the data directory:
sudo vim /etc/docker/daemon.json
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
// Usage - MainActivity | |
val collapsible = myCardView.buildCollapsible() | |
myButton.onClick { | |
collapsible.toggle() | |
} | |
// ============================================================================================================================ | |
package your_package | |
import android.animation.ValueAnimator | |
import android.support.v7.widget.CardView |
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
public class BaseController : Controller | |
{ | |
protected IActionResult GetActionResult(RepositoryResult repositoryResult) | |
{ | |
// TODO | |
return default; | |
} | |
} |
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
// Contract | |
interface INormalize{ | |
fun order() | |
fun normalize() | |
fun getScore() | |
} |
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
// Contracts | |
interface IBookRepository{ | |
@Nullable | |
String getBook(Long id); | |
List<Object> getBooksByDescription(String description); | |
List<Object> getBooksByDescriptionOrder(String description); |
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
def main(a, b, operation): | |
result = None | |
if operation == "sum": | |
result = a + b | |
elif operation == "sub": | |
result = a - b | |
elif operation == "mult": | |
result = a * b |
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
class Calculator: | |
def __init__(self, a, b): | |
self._a = a | |
self._b = b | |
pass | |
def calculate(self, operation): | |
if operation == "sum": |
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
class Calculator: | |
@abstractmethod | |
def calculate(self, a, b): | |
raise NotImplemented() | |
class SumCalculator(Calculator): | |
def calculate(self, a, b): | |
return a + b |
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
import org.mockito.Mockito.mock | |
inline fun <reified TClass> easyMock(): TClass = mock(TClass::class.java) | |
// ---------- Usage | |
// Before |
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
const originalConsoleWarn = console.warn; | |
global.console.warn = (...args) => { | |
const propTypeFailures = [/Warning: componentWillMount/]; | |
if (propTypeFailures.some(p => p.test(args[0]))) { | |
return; | |
} | |
originalConsoleWarn.call(console, ...args); | |
}; | |
// eslint-disable-next-line no-console |
OlderNewer