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
Packages | |
======== | |
- Encapsulate classes within a namespace | |
- Generally these take a reverse domain name format ending with class name (when fully qualified), e.g. com.company.classname | |
- Should map to directory structure and use reverse domain, e.g. root/com/company/classname | |
- java.lang is imported by default | |
- lowercase (though class name can have caps), underscores should be used for spaces | |
- java.* (core) and javax.* (standard extensions) are reserved | |
- It is better to be explicit when importing, rather than being implicit (using wildcards) | |
- 209 packages in Java SE 7 API |
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
Check for violations: | |
samhain -t check --foreground -p err -s none -l none -m none | |
Clear violations: | |
samhain -t update -l none --foreground |
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
mvn [<plugin>:]<goal> | |
- General use | |
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false | |
- Example project create | |
mvn test | |
- Run unit tests specified by pom.xml (need unit dependancies in pom) | |
mvn sonar:sonar |
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
<settings> | |
<profiles> | |
<profile> | |
<id>sonar</id> | |
<activation> | |
<activeByDefault>true</activeByDefault> | |
</activation> | |
<properties> | |
<sonar.jdbc.url> | |
jdbc:mysql://localhost:3306/sonar |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mycompany.app</groupId> | |
<artifactId>my-app</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>NAME</name> |
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
A few gard won lessons! | |
1. You cannot set expectations on a non-mocked method | |
2. Don't use multiple mocks of the same class and then inject these into another mock | |
3. When using at, this applies at an object level, not method | |
4. When using at, any mocked methods will be expected in the ordering | |
phpunit | |
- Standard use (consumes phpunit.xml.dist) |
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
Company Registration Number Formats English and Welsh companies have registration numbers that consist of 8 digits. Companies registered in Scotland and Northern Ireland and those registered by the Financial Services Authority have a 1 or 2 character alphabetic prefix. The following are possible values for the prefix. Value Description AC Assurance Company England and Wales FC Foreign Company England and Wales GE European Economic Interest Grouping (EEIG) England and Wales GN EEIG Northern Ireland GS EEIG Scotland IC Investment Company with Variable Capital (ICVC) England and Wales IP Industrial and Provident England and Wales LP Limited Partnership England and Wales NA Assurance Company Northern Ireland NF Foreign Company Northern Ireland NI Northern Ireland Company NL Limited Partnership Northern Ireland (This prefix is not applicable to CT and should not be used) NO Other Northern Ireland NP Industrial and Provident Northern Ireland NR Royal Charter Northern Ireland NZ Not Companies Act Northern Irelan |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.sonar.services</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/iboddington/apps/sonar-3.6/bin/macosx-universal-64/sonar.sh</string> | |
<string>start</string> |
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
pear clear-cache | |
pear update-channels | |
- Housekeeping | |
pear config-get php_dir | |
- Displays directory which should be included in php include_path for correct working of packages | |
pear list -a | |
- List installed packages by channel | |
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
<?php | |
class templateClass { | |
private $variable = 'pretest'; //Test variable | |
function __contruct() { | |
//Init | |
} |