start new:
tmux
start new with session name:
tmux new -s myname
nmap <C-m> ggVG<C-c><C-c> |
/** from http://www.reddit.com/r/programming/comments/mlbna/scala_feels_like_ejb_2/c31z0co */ | |
interface Pong<T> {} | |
class Ping<T> implements Pong<Pong<? super Ping<Ping<T>>>> { | |
static void Ping() { | |
Pong<? super Ping<Long>> Ping = new Ping<Long>(); | |
} | |
} | |
> javac Ping.java |
package com.richashworth.powermockexample; | |
import java.io.File; | |
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.util.List; | |
import static com.google.common.io.Files.readLines; | |
public final class DataProvider { |
package com.richashworth.powermockexample; | |
import java.util.List; | |
public class ResultsWriter { | |
public String getDataAsString(){ | |
StringBuilder builder = new StringBuilder(); | |
List<String> dataList = DataProvider.getData(); | |
for(String str: dataList){ |
package com.richashworth.powermockexample; | |
import org.junit.Before; | |
import org.junit.BeforeClass; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.powermock.api.mockito.PowerMockito; | |
import org.powermock.core.classloader.annotations.PrepareForTest; | |
import org.powermock.modules.junit4.PowerMockRunner; |
// Examples showing how to use the specification helpers | |
// | |
import akka.actor.ActorSystem | |
import akka.testkit.{TestKit, ImplicitSender} | |
import org.scalatest.{WordSpec, BeforeAndAfterAll} | |
import org.scalatest.matchers.MustMatchers | |
// Sequentially runs the tests, isolating the Fixture in each test. The Fixture carries the TestKit | |
// so each test gets its own ActorSystem | |
class MyAkkaTestSpec extends SequentialAkkaSpecWithIsolatedFixture { |
"For comprehension" is a another syntaxe to use map
, flatMap
and withFilter
(or filter) methods.
yield
keyword is used to aggregate values in the resulting structure.
This composition can be used on any type implementing this methods, like List
, Option
, Future
...
if ( 'text-image' == $format ) | |
$link_item .= '<p> <a href="' . get_bloginfo($rss_type) . '" title="' . esc_attr( $subscribe_to ) . '"><br/>' . esc_html__('RSS - ' . $type_text, 'jetpack'). '</a></p>'; |