This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
This code has an unreachable catch block and the Java compiler does not produce an error it produces a warning. I can't figure out why. Please help!
class ParentException extends Exception {}
class ChildException extends ParentException {}
public class Scratch {
public static void foo() throws ChildException {}
public static void main(String args[]) {
try {
##Description While studying for the OCAJP8 exam I have created hundreds (if not more) of small code examples that help test my knowledge. The purpose of this document is to help myself and others test their knowledge of Java 8 in preparation for the OCAJP8 exam. Use this document as-is or as a starting point to create your own question bank. Feel free to contribute by commenting on this gist.
At some point it might make sense to turn this gist into a proper repo for better organization of code and contributions.
This is a living document
<?php | |
namespace CQRSSample\Domain\Model | |
{ | |
/** | |
* Please read this. It may be interesting to you. You can ridicule me ONLY if you read the whole thing. | |
* | |
* CQRS is NOT about different data sources and is NOT about Event Sourcing. | |
* CQRS IS about breaking out your reads and writes. It's powerful and simple! |
<?php | |
namespace Application\Catalog\ValueObject; | |
class AvailableVenues | |
{ | |
public function __construct($isOnline, $isInClassroom) | |
{ | |
// set properties as bools | |
} |
<?php | |
namespace Application; | |
use Zend\EventManager\EventInterface; | |
use Zend\ModuleManager\Feature\BootstrapListenerInterface; | |
class Module implements BootstrapListenerInterface, | |
{ | |
/** |
<?php | |
use Zend\ModuleManager\Feature\ServiceProviderInterface; | |
class Module implements ServiceProviderInterface | |
{ | |
public function getServiceConfig() | |
{ | |
return array( | |
'blamo.service' => function($sm) { |
<?php | |
namespace Application\Cache; | |
use Zend\Cache\Storage\StorageInterface as Storage; | |
interface CacheAwareInterface | |
{ | |
public function setCache(Storage $cache); | |
} |