text:
package com.google.template.soy.jssrc.dsl;

import static com.google.common.truth.Truth.assertThat;
import static com.google.template.soy.exprtree.Operator.PLUS;
import static com.google.template.soy.jssrc.dsl.Expression.LITERAL_TRUE;
import static com.google.template.soy.jssrc.dsl.Expression.arrayLiteral;
import static com.google.template.soy.jssrc.dsl.Expression.construct;
import static com.google.template.soy.jssrc.dsl.Expression.dontTrustPrecedenceOf;
import static com.google.template.soy.jssrc.dsl.Expression.fromExpr;
import static com.google.template.soy.jssrc.dsl.Expression.id;
import static com.google.template.soy.jssrc.dsl.Expression.ifExpression;
import static com.google.template.soy.jssrc.dsl.Expression.not;
import static com.google.template.soy.jssrc.dsl.Expression.number;
import static com.google.template.soy.jssrc.dsl.Expression.stringLiteral;
import static com.google.template.soy.jssrc.dsl.Statement.forLoop;
import static com.google.template.soy.jssrc.dsl.Statement.ifStatement;
import static com.google.template.soy.jssrc.dsl.Statement.returnValue;
import static com.google.template.soy.jssrc.dsl.Statement.throwValue;
import static com.google.template.soy.jssrc.dsl.Statement.treatRawStringAsStatementLegacyOnly;

import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.template.soy.jssrc.dsl.ClassExpression.MethodDeclaration;
import com.google.template.soy.jssrc.internal.JsSrcNameGenerators;
import com.google.template.soy.jssrc.restricted.JsExpr;
import java.util.ArrayList;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/** Tests for {@link CodeChunk}. */
@RunWith(JUnit4.class)
public final class CodeChunkTest {

  private static final Joiner JOINER = Joiner.on('\n');
  private CodeChunk.Generator cg;

  @Before
  public void setUp() {
    cg = CodeChunk.Generator.create(JsSrcNameGenerators.forLocalVariables());
  }

  @Test
  public void testSingleExprIsPreserved() {
    JsExpr expr = new JsExpr("1 + 2", PLUS.getPrecedence());
    Expression chunk = fromExpr(expr, ImmutableList.of());
    assertThat(chunk.getCode()).isEqualTo("1 + 2;");
    assertThat(chunk.isRepresentableAsSingleExpression()).isTrue();
    assertThat(chunk.singleExprOrName()).isSameInstanceAs(expr);
  }

  @Test
  public void testDependentChunks1() {
    Expression var = cg.declarationBuilder().setRhs(number(3).divideBy(number(4))).build().ref();
    Statement statement =
        ifStatement(var.doubleEqualsNull(), id("expensiveFunction").call().asStatement()).build();
    Expression tmp =
        cg.declarationBuilder()
            .setRhs(var.times(number(5)))
            .build()
            .ref()
            .withInitialStatement(statement);
    assertThat(tmp.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = 3 / 4;",
                "if ($tmp == null) {",
                "  expensiveFunction();",
                "}",
                "const $tmp$$1 = $tmp * 5;"));
  }

  @Test
  public void testDependentChunks2() {
    Expression var = cg.declarationBuilder().setRhs(id("foo").dotAccess("bar")).build().ref();
    Statement statement =
        ifStatement(var.doubleEqualsNull(), id("expensiveFunction").call().asStatement()).build();
    assertThat(statement.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = foo.bar;", "if ($tmp == null) {", "  expensiveFunction();", "}"));
  }

  @Test
  public void testDependentChunks3() {
    Expression var = cg.declarationBuilder().setRhs(number(1).times(number(2))).build().ref();
    Statement statement =
        ifStatement(var.doubleEqualsNull(), id("expensiveFunction").call().asStatement()).build();
    assertThat(statement.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = 1 * 2;", "if ($tmp == null) {", "  expensiveFunction();", "}"));
  }

  @Test
  public void testIfEmpty() {
    Expression var = cg.declarationBuilder().setRhs(number(1).plus(number(2))).build().ref();
    Statement statement =
        ifStatement(
                var.doubleEqualsNull(),
                // That's as it should be, since empty blocks are useless.
                Statement.treatRawStringAsStatementLegacyOnly("", ImmutableList.of()))
            .build();
    assertThat(statement.getCode())
        .isEqualTo(JOINER.join("const $tmp = 1 + 2;", "if ($tmp == null) {", "}"));
  }

  @Test
  public void testIf1() {
    Expression var =
        cg.declarationBuilder().setMutable().setRhs(number(1).plus(number(2))).build().ref();
    Statement statement =
        ifStatement(var.doubleEqualsNull(), var.assign(number(3)).asStatement()).build();
    assertThat(statement.getCode())
        .isEqualTo(JOINER.join("let $tmp = 1 + 2;", "if ($tmp == null) {", "  $tmp = 3;", "}"));
  }

  @Test
  public void testIf2() {
    Expression var =
        cg.declarationBuilder()
            .setMutable()
            .setRhs(construct(id("VeryExpensiveCtor")))
            .build()
            .ref();
    Statement statement =
        Statement.of(
            var.dotAccess("veryExpensiveMethod").call().asStatement(),
            ifStatement(var.doubleEqualsNull(), var.assign(LITERAL_TRUE).asStatement()).build());
    assertThat(statement.getCode())
        .isEqualTo(
            JOINER.join(
                "let $tmp = new VeryExpensiveCtor();",
                "$tmp.veryExpensiveMethod();",
                "if ($tmp == null) {",
                "  $tmp = true;",
                "}"));
  }

  @Test
  public void testIf3() {
    Expression var = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Statement statement =
        ifStatement(var.dotAccess("isFoo").call(), var.dotAccess("doFoo").call().asStatement())
            .addElseIf(var.dotAccess("isBar").call(), var.dotAccess("doBar").call().asStatement())
            .setElse(var.dotAccess("doSomethingElse").call().asStatement())
            .build();
    assertThat(statement.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = new Foo();",
                "if ($tmp.isFoo()) {",
                "  $tmp.doFoo();",
                "} else if ($tmp.isBar()) {",
                "  $tmp.doBar();",
                "} else {",
                "  $tmp.doSomethingElse();",
                "}"));
  }

  @Test
  public void testFor() {
    String localVar = "myVar";
    Expression initial = number(100);
    Expression limit = number(300);
    Expression increment = number(10);
    Statement body = id("fn").call().asStatement();

    Statement forChunk = forLoop(localVar, initial, limit, increment, body);
    assertThat(forChunk.getCode())
        .isEqualTo(
            JOINER.join("for (let myVar = 100; myVar < 300; myVar += 10) {", "  fn();", "}"));

    initial = id("initialFn").call();
    limit = id("limitFn").call();
    increment = id("incrementFn").call();
    body = id("fn").call().asStatement();

    forChunk = forLoop(localVar, initial, limit, increment, body);
    assertThat(forChunk.getCode())
        .isEqualTo(
            JOINER.join(
                "for (let myVar = initialFn(); myVar < limitFn(); myVar += incrementFn()) {",
                "  fn();",
                "}"));
  }

  @Test
  public void testFor_InitialStatements() {
    String localVar = "myVar";

    Expression foo = cg.declarationBuilder().setRhs(id("foo")).build().ref();
    Expression initial = foo.withInitialStatement(foo.dotAccess("method").call().asStatement());

    Expression bar = cg.declarationBuilder().setRhs(id("bar")).build().ref();
    Expression limit = bar.withInitialStatement(bar.dotAccess("method").call().asStatement());

    Expression baz = cg.declarationBuilder().setRhs(id("baz")).build().ref();
    Expression increment = baz.withInitialStatement(baz.dotAccess("method").call().asStatement());

    Statement body = Statement.of(id("fn").call().asStatement(), id("fn2").call().asStatement());

    Statement forChunk = forLoop(localVar, initial, limit, increment, body);

    assertThat(forChunk.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = foo;",
                "$tmp.method();",
                "const $tmp$$1 = bar;",
                "$tmp$$1.method();",
                "const $tmp$$2 = baz;",
                "$tmp$$2.method();",
                "for (let myVar = $tmp; myVar < $tmp$$1; myVar += $tmp$$2) {",
                "  fn();",
                "  fn2();",
                "}"));
  }

  @Test
  public void testInitialStatementInElseIfIsConditionallyEvaluated() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("veryExpensiveMethod").call().asStatement());

    Expression bar = cg.declarationBuilder().setRhs(construct(id("Bar"))).build().ref();
    Expression barWithStatement =
        bar.withInitialStatement(bar.dotAccess("causeNPE").call().asStatement());

    Statement conditional =
        ifStatement(
                not(fooWithStatement.dotAccess("isInitialized").call()),
                id("initializeFoo").call().asStatement())
            .addElseIf(
                not(barWithStatement.dotAccess("isInitialized").call()),
                id("initializeBar").call().asStatement())
            .setElse(id("runBackupCode").call().asStatement())
            .build();
    assertThat(conditional.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = new Foo();",
                "$tmp.veryExpensiveMethod();",
                "if (!$tmp.isInitialized()) {",
                "  initializeFoo();",
                "} else {",
                "  const $tmp$$1 = new Bar();",
                "  $tmp$$1.causeNPE();",
                "  if (!$tmp$$1.isInitialized()) {",
                "    initializeBar();",
                "  } else {",
                "    runBackupCode();",
                "  }",
                "}"));
  }

  @Test
  public void testFieldAccessExpr1() {
    Expression expr = id("foo").bracketAccess(number(1).minus(number(2)));
    assertThat(expr.getCode()).isEqualTo("foo[1 - 2];"); // trailing semicolon
    assertThat(expr.singleExprOrName().getText()).isEqualTo("foo[1 - 2]"); // no trailing semicolon
    assertThat(expr.isRepresentableAsSingleExpression()).isTrue();
  }

  @Test
  public void testFieldAccessExpr2() {
    Expression var =
        cg.declarationBuilder().setRhs(construct(id("VeryExpensiveCtor"))).build().ref();
    Expression varWithStatement =
        var.withInitialStatement(var.dotAccess("veryExpensiveMethod").call().asStatement());

    Expression bracketAccess = id("foo").bracketAccess(varWithStatement);
    // The chunk inside the brackets cannot be represented as a single expression,
    // so it's extracted to a local variable.
    assertThat(bracketAccess.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = new VeryExpensiveCtor();",
                "$tmp.veryExpensiveMethod();",
                "foo[$tmp];"));
  }

  @Test
  public void testTemporary() {
    Expression first =
        cg.declarationBuilder().setRhs(construct(id("VeryExpensiveCtor"))).build().ref();
    assertThat(first.doubleEquals(first).getCode())
        .isEqualTo("const $tmp = new VeryExpensiveCtor();\n$tmp == $tmp;");
  }

  /**
   * TODO(brndn): multiple assignments could collapse to an expression using the comma operator:
   * foo, bar. But the benefit to the gencode is doubtful, and it certainly impairs its
   * readability.
   */
  @Test
  public void testMultipleAssignmentsDoNotCollapseToExpression() {
    Expression first = cg.declarationBuilder().setMutable().setRhs(id("foo")).build().ref();
    Expression second = first.assign(id("bar"));
    assertThat(second.isRepresentableAsSingleExpression()).isFalse();
    assertThat(second.getCode()).isEqualTo(JOINER.join("let $tmp = foo;", "$tmp = bar;"));
  }

  @Test
  public void testInitialStatementsAreExecutedOnce_1() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveInit").call().asStatement());
    Statement conditional =
        ifStatement(
                fooWithStatement.dotAccess("isInitialized").call(),
                fooWithStatement.dotAccess("launch").call().asStatement())
            .build();
    assertThat(conditional.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = new Foo();",
                "$tmp.expensiveInit();",
                "if ($tmp.isInitialized()) {",
                "  $tmp.launch();",
                "}"));
  }

  @Test
  public void testInitialStatementsAreExecutedOnce_2() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveInit").call().asStatement());
    // fooWithStatement is used only inside the branches...
    Expression conditional =
        ifExpression(id("shouldProceed").call(), fooWithStatement.dotAccess("proceed").call())
            .setElse(fooWithStatement.dotAccess("abort").call())
            .build(cg);
    // ...so it is initialized once in each branch:
    assertThat(conditional.getCode())
        .isEqualTo(
            JOINER.join(
                "let $tmp$$1;",
                "if (shouldProceed()) {",
                "  const $tmp = new Foo();",
                "  $tmp.expensiveInit();",
                "  $tmp$$1 = $tmp.proceed();",
                "} else {",
                "  const $tmp = new Foo();",
                "  $tmp.expensiveInit();",
                "  $tmp$$1 = $tmp.abort();",
                "}"));
  }

  @Test
  public void testInitialStatementsAreExecutedOnce_3() {
    Expression dosPrompt = cg.declarationBuilder().setRhs(construct(id("DosPrompt"))).build().ref();
    Expression dosPromptWithSyscall =
        dosPrompt.withInitialStatement(dosPrompt.dotAccess("obscureSyscall").call().asStatement());
    Statement conditional =
        ifStatement(
                id("shouldAbort").call(),
                dosPromptWithSyscall.dotAccess("abort").call().asStatement())
            .addElseIf(
                id("shouldRetry").call(),
                dosPromptWithSyscall.dotAccess("retry").call().asStatement())
            .setElse(id("fail").call().asStatement())
            .build();
    assertThat(conditional.getCode())
        .isEqualTo(
            JOINER.join(
                "if (shouldAbort()) {",
                "  const $tmp = new DosPrompt();",
                "  $tmp.obscureSyscall();",
                "  $tmp.abort();",
                "} else if (shouldRetry()) {",
                "  const $tmp = new DosPrompt();",
                "  $tmp.obscureSyscall();",
                "  $tmp.retry();",
                "} else {",
                "  fail();",
                "}"));
  }

  @Test
  public void testSimpleConditionalUsesTernaryExpression() {
    Expression ternary = ifExpression(id("foo"), id("bar")).setElse(id("baz")).build(cg);
    assertThat(ternary.getCode()).isEqualTo("foo ? bar : baz;");
  }

  @Test
  public void testConditionalWithNonExpressionPredicateUsesTernaryExpression() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());
    Expression ternary =
        ifExpression(fooWithStatement.doubleEqualsNull(), id("bar")).setElse(id("baz")).build(cg);
    assertThat(ternary.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = new Foo();", "$tmp.expensiveMethod();", "$tmp == null ? bar : baz;"));
  }

  @Test
  public void testConditionalWithNonExpressionConsequentDoesntUseTernaryExpression() {
    VariableDeclaration foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build();
    Statement fooWithStatement =
        Statement.of(foo, foo.ref().dotAccess("expensiveMethod").call().asStatement());
    Statement ternary =
        ifStatement(id("shouldProceed").call(), fooWithStatement)
            .setElse(id("baz").asStatement())
            .build();
    assertThat(ternary.getCode())
        .isEqualTo(
            JOINER.join(
                "if (shouldProceed()) {",
                "  const $tmp = new Foo();",
                "  $tmp.expensiveMethod();",
                "} else {",
                "  baz;",
                "}"));
  }

  @Test
  public void testConditionalWithNonExpressionAlternateDoesntUseTernaryExpression() {
    VariableDeclaration foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build();
    Statement fooWithStatement =
        Statement.of(foo, foo.ref().dotAccess("expensiveMethod").call().asStatement());
    Statement ternary =
        ifStatement(id("shouldProceed").call(), id("bar").asStatement())
            .setElse(fooWithStatement)
            .build();
    assertThat(ternary.getCode())
        .isEqualTo(
            JOINER.join(
                "if (shouldProceed()) {",
                "  bar;",
                "} else {",
                "  const $tmp = new Foo();",
                "  $tmp.expensiveMethod();",
                "}"));
  }

  @Test
  public void testAssignmentToValueOfConditional_Simple() {
    Expression conditional = ifExpression(id("foo"), id("bar")).setElse(id("baz")).build(cg);
    Expression var = cg.declarationBuilder().setMutable().setRhs(id("blah")).build().ref();
    Expression assignment = var.assign(conditional);
    assertThat(assignment.getCode())
        .isEqualTo(JOINER.join("let $tmp = blah;", "$tmp = foo ? bar : baz;"));
  }

  @Test
  public void testAssignmentToValueOfConditional_Complex() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());
    Expression conditional = ifExpression(id("foo"), fooWithStatement).setElse(id("baz")).build(cg);
    assertThat(conditional.getCode())
        .isEqualTo(
            JOINER.join(
                "let $tmp$$1;",
                "if (foo) {",
                "  const $tmp = new Foo();",
                "  $tmp.expensiveMethod();",
                "  $tmp$$1 = $tmp;",
                "} else {",
                "  $tmp$$1 = baz;",
                "}"));
  }

  @Test
  public void testMapLiteralLookup() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());
    Expression map =
        cg.declarationBuilder().setRhs(Expression.objectLiteral(ImmutableMap.of())).build().ref();
    Expression mapAssignment = map.bracketAccess(stringLiteral("foo")).assign(fooWithStatement);
    assertThat(mapAssignment.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp$$1 = {};",
                "const $tmp = new Foo();",
                "$tmp.expensiveMethod();",
                "$tmp$$1['foo'] = $tmp;"));
  }

  @Test
  public void testObjectLiteral() {
    Expression objectLiteral =
        Expression.objectLiteral(
            ImmutableMap.of(
                "plus", number(15).plus(Expression.number(4)), "string", stringLiteral("hello")));

    assertThat(objectLiteral.getCode()).isEqualTo("{plus: 15 + 4, string: 'hello'};");

    objectLiteral =
        Expression.objectLiteralWithQuotedKeys(ImmutableMap.of("quoted", stringLiteral("orange")));

    assertThat(objectLiteral.getCode()).isEqualTo("{'quoted': 'orange'};");
  }

  @Test
  public void testAppropriateParensInTernary() {
    Expression conditional =
        ifExpression(id("a").assign(id("b")).doubleEquals(id("c")), id("d"))
            .setElse(id("e"))
            .build(cg);
    assertThat(conditional.getCode())
        .isEqualTo("(a = b) == c ? d : e;");
  }

  @Test
  public void testExprsThatAreNotRepresentableAsSingleExpressions() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());

    assertThat(fooWithStatement.getCode())
        .isEqualTo(JOINER.join("const $tmp = new Foo();", "$tmp.expensiveMethod();"));
    assertThat(fooWithStatement.singleExprOrName().getText()).isEqualTo("$tmp");

    Expression val2 = fooWithStatement.doubleEqualsNull();
    assertThat(val2.getCode())
        .isEqualTo(
            JOINER.join("const $tmp = new Foo();", "$tmp.expensiveMethod();", "$tmp == null;"));
    assertThat(val2.singleExprOrName().getText()).isEqualTo("$tmp == null");

    Statement val3 = cg.declarationBuilder().setRhs(val2.plus(number(1))).build();
    assertThat(val3.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = new Foo();",
                "$tmp.expensiveMethod();",
                "const $tmp$$1 = ($tmp == null) + 1;")); // + binds tighter than ==, so protect ==
  }

  @Test
  public void testPrecedence() {
    Expression call = id("a").plus(id("b")).call(id("c"), id("d"));
    assertThat(call.getCode()).isEqualTo("(a + b)(c, d);");

    Expression ternary = ifExpression(id("a").assign(id("b")), id("c")).setElse(id("d")).build(cg);
    assertThat(ternary.getCode()).isEqualTo("(a = b) ? c : d;");
  }

  @Test
  public void testPrecedenceForLeafs() {
    Expression negate = not(id("a"));
    assertThat(negate.getCode()).isEqualTo("!a;");
    negate = not(id("a").plus(id("b")));
    // The argument to not() is a structured code chunk with lower precedence.
    // It should be parenthesized.
    assertThat(negate.getCode()).isEqualTo("!(a + b);");
    negate = not(fromExpr(new JsExpr("a + b", PLUS.getPrecedence()), ImmutableList.of()));
    // Even though the argument to not() is a flat JsExpr, its precedence is preserved,
    // so it should be parenthesized.
    assertThat(negate.getCode()).isEqualTo("!(a + b);");
  }

  @Test
  public void testAssociativity_assignment() {
    Expression leaf = id("a").assign(id("b"));
    Expression branch = leaf.assign(id("c"));
    // assignment is right-associative, so requires parens when appearing as the left operand...
    assertThat(branch.getCode()).isEqualTo("(a = b) = c;");

    leaf = id("b").assign(id("c"));
    branch = id("a").assign(leaf);
    // ...but not when appearing as the right operand.
    assertThat(branch.getCode()).isEqualTo("a = b = c;");
  }

  @Test
  public void testAssociativity_ternary() {
    Expression leaf = ifExpression(id("a"), id("b")).setElse(id("c")).build(cg);
    Expression branch = ifExpression(leaf, id("d")).setElse(id("e")).build(cg);
    // ?: is right-associative, so requires parens when appearing as the left operand...
    assertThat(branch.getCode()).isEqualTo("(a ? b : c) ? d : e;");

    leaf = ifExpression(id("c"), id("d")).setElse(id("e")).build(cg);
    branch = ifExpression(id("a"), id("b")).setElse(leaf).build(cg);
    // ...but not when appearing as the right operand.
    assertThat(branch.getCode()).isEqualTo("a ? b : c ? d : e;");
  }

  @Test
  public void testBadPrecedenceOfJsExpr() {
    JsExpr wrongPrecedence = new JsExpr(
        "a / b",
        Integer.MAX_VALUE); // should be Operator.DIVIDE_BY.getPrecedence()
    Expression bad = not(fromExpr(wrongPrecedence, ImmutableList.of()));
    assertThat(bad.getCode()).isEqualTo("!a / b;");
    Expression good = not(dontTrustPrecedenceOf(wrongPrecedence, ImmutableList.of()));
    assertThat(good.getCode()).isEqualTo("!(a / b);");
  }

  @Test
  public void testAnd_BothOperandsRepresentableAsSingleExprs() {
    Expression and = id("a").and(id("b"), cg);
    assertThat(and.getCode()).isEqualTo("a && b;");
  }

  @Test
  public void testAnd_FirstOperandNotRepresentableAsSingleExpr() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());

    // The first operand is always evaluated, so no explicit short-circuiting logic is needed.
    Expression and = fooWithStatement.and(id("a"), cg);
    assertThat(and.getCode())
        .isEqualTo(JOINER.join("const $tmp = new Foo();", "$tmp.expensiveMethod();", "$tmp && a;"));
  }

  @Test
  public void testAnd_SecondOperandNotRepresentableAsSingleExpr() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());

    // The second operand is evaluated only if the first operand evals as true.
    Expression and = id("a").and(fooWithStatement, cg);
    assertThat(and.getCode())
        .isEqualTo(
            JOINER.join(
                "let $tmp$$1 = a;",
                "if ($tmp$$1) {",
                "  const $tmp = new Foo();",
                "  $tmp.expensiveMethod();",
                "  $tmp$$1 = $tmp;",
                "}"));
  }

  @Test
  public void testAnd_NeitherOperandRepresentableAsSingleExpr() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());

    Expression bar = cg.declarationBuilder().setRhs(construct(id("Bar"))).build().ref();
    Expression barWithStatement =
        bar.withInitialStatement(bar.dotAccess("anotherExpensiveMethod").call().asStatement());

    // The second operand is evaluated only if the first operand evals as true.
    Expression and = fooWithStatement.and(barWithStatement, cg);
    assertThat(and.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = new Foo();",
                "$tmp.expensiveMethod();",
                "let $tmp$$2 = $tmp;",
                "if ($tmp$$2) {",
                "  const $tmp$$1 = new Bar();",
                "  $tmp$$1.anotherExpensiveMethod();",
                "  $tmp$$2 = $tmp$$1;",
                "}"));
  }

  @Test
  public void testOr_BothOperandsRepresentableAsSingleExprs() {
    Expression or = id("a").or(id("b"), cg);
    assertThat(or.getCode()).isEqualTo("a || b;");
  }

  @Test
  public void testOr_FirstOperandNotRepresentableAsSingleExpr() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());

    // The first operand is always evaluated, so no explicit short-circuiting logic is needed.
    Expression or = fooWithStatement.or(id("a"), cg);
    assertThat(or.getCode())
        .isEqualTo(JOINER.join("const $tmp = new Foo();", "$tmp.expensiveMethod();", "$tmp || a;"));
  }

  @Test
  public void testOr_SecondOperandNotRepresentableAsSingleExpr() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());

    // The second operand is evaluated only if the first operand is false.
    Expression or = id("a").or(fooWithStatement, cg);
    assertThat(or.getCode())
        .isEqualTo(
            JOINER.join(
                "let $tmp$$1 = a;",
                "if (!$tmp$$1) {",
                "  const $tmp = new Foo();",
                "  $tmp.expensiveMethod();",
                "  $tmp$$1 = $tmp;",
                "}"));
  }

  @Test
  public void testOr_NeitherOperandRepresentableAsSingleExpr() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());

    Expression bar = cg.declarationBuilder().setRhs(construct(id("Bar"))).build().ref();
    Expression barWithStatement =
        bar.withInitialStatement(bar.dotAccess("anotherExpensiveMethod").call().asStatement());

    // The second operand is evaluated only if the first operand is false.
    Expression or = fooWithStatement.or(barWithStatement, cg);
    assertThat(or.getCode())
        .isEqualTo(
            JOINER.join(
                "const $tmp = new Foo();",
                "$tmp.expensiveMethod();",
                "let $tmp$$2 = $tmp;",
                "if (!$tmp$$2) {",
                "  const $tmp$$1 = new Bar();",
                "  $tmp$$1.anotherExpensiveMethod();",
                "  $tmp$$2 = $tmp$$1;",
                "}"));
  }

  @Test
  public void testExpressionAsStatement() {
    Expression expression = Expression.THIS.dotAccess("myVar");
    Statement statement = expression.asStatement();

    assertThat(statement.getCode()).isEqualTo("this.myVar;");

    statement =
        expression.asStatement(
            JsDoc.builder().addParameterizedAnnotation("private", "string").build());

    assertThat(statement.getCode())
        .isEqualTo(JOINER.join("/** @private {string} */", "this.myVar;"));
  }

  @Test
  public void testDeclarations() {
    // First use an automatic var name for the declaration.
    VariableDeclaration decl = cg.declarationBuilder().setRhs(id("bar")).build();
    // Even though this is the whole program, the var is declared.
    assertThat(decl.getCode()).isEqualTo("const $tmp = bar;");
    // If this is being used in another chunk, the var must be declared to prevent re-evaluation
    Expression use = decl.ref().call(decl.ref());
    assertThat(use.getCode()).isEqualTo(JOINER.join("const $tmp = bar;", "$tmp($tmp);"));
    // If the program is partially being built elsewhere,
    // something could reference the variable, so we need to keep it.
    assertThat(decl.getStatementsForInsertingIntoForeignCodeAtIndent(0))
        .isEqualTo("const $tmp = bar;\n");

    // Now use a custom var name for the declaration.
    decl = VariableDeclaration.builder("foo").setRhs(id("bar")).build();
    // Even though this is the whole program, the var is declared.
    assertThat(decl.getCode()).isEqualTo("const foo = bar;");
    // If this is being used in another chunk, foo must be declared to prevent re-evaluation
    use = decl.ref().call(decl.ref());
    assertThat(use.getCode()).isEqualTo(JOINER.join("const foo = bar;", "foo(foo);"));
    // If the program is partially being built elsewhere, something could reference foo
    // so we need to keep it.
    assertThat(decl.getStatementsForInsertingIntoForeignCodeAtIndent(0))
        .isEqualTo("const foo = bar;\n");
    assertThat(use.getStatementsForInsertingIntoForeignCodeAtIndent(0))
        .isEqualTo(JOINER.join("const foo = bar;", "foo(foo);\n"));
  }

  @Test
  public void testCustomIndentation() {
    // need to use code chunks that aren't CodeChunk.WithValues to avoid being turned into a ternary
    Statement statement =
        ifStatement(id("foo"), Statement.returnValue(id("bar").call()))
            .setElse(Statement.returnValue(id("baz").dotAccess("method").call()))
            .build();
    assertThat(statement.getStatementsForInsertingIntoForeignCodeAtIndent(2))
        .isEqualTo(
            JOINER.join(
                "  if (foo) {",
                "    return bar();",
                "  } else {",
                "    return baz.method();",
                "  }\n"));

    Statement decl = VariableDeclaration.builder("blah").setRhs(number(2)).build();
    assertThat(decl.getStatementsForInsertingIntoForeignCodeAtIndent(4))
        .isEqualTo("    const blah = 2;\n");
  }

  @Test
  public void testReturn() {
    Statement returnStatement = returnValue(id("blah"));
    assertThat(returnStatement.getCode()).isEqualTo("return blah;");

    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());
    returnStatement = returnValue(fooWithStatement);
    assertThat(returnStatement.getCode())
        .isEqualTo(
            JOINER.join("const $tmp = new Foo();", "$tmp.expensiveMethod();", "return $tmp;"));
  }

  @Test
  public void testReturnNothing() {
    Statement returnNothingStatement = Statement.returnNothing();
    assertThat(returnNothingStatement.getCode()).isEqualTo("return;");
  }

  @Test
  public void testThrow() {
    Statement throwStatement = throwValue(construct(id("Error"), stringLiteral("blah")));
    assertThat(throwStatement.getCode()).isEqualTo("throw new Error('blah');");

    Expression foo =
        cg.declarationBuilder().setRhs(construct(id("Error"), stringLiteral("blah"))).build().ref();
    throwStatement = throwValue(foo);
    assertThat(throwStatement.getCode())
        .isEqualTo(JOINER.join("const $tmp = new Error('blah');", "throw $tmp;"));
  }

  @Test
  public void testEquality() {
    assertThat(arrayLiteral(ImmutableList.of(construct(id("Foo")))))
        .isEqualTo(arrayLiteral(ImmutableList.of(construct(id("Foo")))));
  }

  @Test
  public void testCollectRequires() {
    Statement chunk =
        ifStatement(
                id("a"),
                treatRawStringAsStatementLegacyOnly(
                    "foo",
                    ImmutableList.of(GoogRequire.create("foo.bar"), GoogRequire.create("foo.baz"))))
            .setElse(
                treatRawStringAsStatementLegacyOnly(
                    "foo", ImmutableList.of(GoogRequire.create("foo.quux"))))
            .build();
    final List<String> namespaces = new ArrayList<>();
    chunk.collectRequires(r -> namespaces.add(r.symbol()));
    assertThat(namespaces).containsExactly("foo.bar", "foo.baz", "foo.quux");
  }

  @Test
  public void testSwitch_simple() {
    Expression foo = id("foo");
    Statement switchStatement =
        Statement.switchValue(foo.dotAccess("getStuff").call())
            .addCase(
                ImmutableList.of(stringLiteral("bar")), foo.dotAccess("bar").call().asStatement())
            .addCase(
                ImmutableList.of(stringLiteral("baz"), stringLiteral("quux")),
                foo.dotAccess("bazOrQuux").call().asStatement())
            .setDefault(foo.dotAccess("somethingElse").call().asStatement())
            .build();
    assertThat(switchStatement.getCode())
        .isEqualTo(
            JOINER.join(
                "switch (foo.getStuff()) {",
                "  case 'bar':",
                "    foo.bar();",
                "    break;",
                "  case 'baz':",
                "  case 'quux':",
                "    foo.bazOrQuux();",
                "    break;",
                "  default:",
                "    foo.somethingElse();",
                "}"));
  }

  @Test
  public void testSwitch_withInitialStatements() {
    Expression foo = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression fooWithStatement =
        foo.withInitialStatement(foo.dotAccess("expensiveMethod").call().asStatement());

    Expression foo2 = cg.declarationBuilder().setRhs(construct(id("Foo"))).build().ref();
    Expression foo2WithStatement =
        foo2.withInitialStatement(foo2.dotAccess("anotherExpensiveMethod").call().asStatement());

    Statement switchStatement =
        Statement.switchValue(fooWithStatement.dotAccess("getStuff").call())
            .addCase(
                ImmutableList.of(stringLiteral("bar")), id("someFunction").call().asStatement())
            .addCase(
                ImmutableList.of(stringLiteral("baz"), foo2WithStatement),
                fooWithStatement.dotAccess("bazOrFoo2").call().asStatement())
            .setDefault(fooWithStatement.dotAccess("somethingElse").call().asStatement())
            .build();
    assertThat(switchStatement.getCode())
        .isEqualTo(
            JOINER.join(
                // The initial statements of the switch expression are hoisted to the top
                "const $tmp = new Foo();",
                "$tmp.expensiveMethod();",
                // The initial statements of all the case labels are hoisted to the top
                "const $tmp$$1 = new Foo();",
                "$tmp$$1.anotherExpensiveMethod();",
                "switch ($tmp.getStuff()) {",
                "  case 'bar':",
                // The initial statements of the case bodies are not hoisted
                "    someFunction();",
                "    break;",
                "  case 'baz':",
                "  case $tmp$$1:",
                "    $tmp.bazOrFoo2();",
                "    break;",
                "  default:",
                "    $tmp.somethingElse();",
                "}"));
  }

  @Test
  public void testJsDocSingleLine() {
    JsDoc.Builder jsDocBuilder = JsDoc.builder();
    jsDocBuilder.addParameterizedAnnotation("type", "boolean");
    VariableDeclaration variable =
        VariableDeclaration.builder("foo").setJsDoc(jsDocBuilder.build()).build();
    assertThat(variable.getCode()).isEqualTo(JOINER.join("/** @type {boolean} */", "let foo;"));
  }

  @Test
  public void testClassExpression() {
    JsDoc.Builder jsDocBuilder = JsDoc.builder();
    jsDocBuilder.addParam("num", "number");
    Statement body = returnValue(id("num").plus(Expression.number(1)));
    MethodDeclaration method = MethodDeclaration.create("addOne", jsDocBuilder.build(), body);
    ClassExpression fooClass = ClassExpression.create(ImmutableList.of(method));
    VariableDeclaration fooClassExpression =
        VariableDeclaration.builder("FooClassTemplate").setRhs(fooClass).build();
    assertThat(fooClassExpression.getCode())
        .isEqualTo(
            JOINER.join(
                "const FooClassTemplate = class {",
                "  /** @param {number} num */",
                "  addOne(num) {",
                "    return num + 1;",
                "  }",
                "};"));

    ClassExpression fooSubclass =
        ClassExpression.create(id("BaseClassTemplate"), ImmutableList.of(method));
    VariableDeclaration fooSubclassExpression =
        VariableDeclaration.builder("FooClassTemplate").setRhs(fooSubclass).build();
    assertThat(fooSubclassExpression.getCode())
        .isEqualTo(
            JOINER.join(
                "const FooClassTemplate = class extends BaseClassTemplate {",
                "  /** @param {number} num */",
                "  addOne(num) {",
                "    return num + 1;",
                "  }",
                "};"));
  }

  // Regression test for b/150716365 where we would exibit exponential behavior collecting requires
  // from variables with lots of transitive references.
  @Test
  public void testQuadraticVariableDeclaration() {
    GoogRequire theOneRequire = GoogRequire.create("foo.bar");
    Expression root =
        VariableDeclaration.builder("root")
            .setGoogRequires(ImmutableSet.of(theOneRequire))
            .setRhs(Expression.number(1))
            .build()
            .ref();

    for (int i = 0; i < 1000; i++) {
      root = VariableDeclaration.builder("tmp" + i).setRhs(root.plus(root)).build().ref();
    }
    ImmutableSet.Builder<GoogRequire> requiresBuilder = ImmutableSet.builder();
    root.collectRequires(requiresBuilder::add);
    assertThat(requiresBuilder.build()).containsExactly(theOneRequire);
  }
}


Belgrade rentals are ideal solution if you need accommodation in Belgrade.
Belgrade Beer Fest™ is on average, the biggest beer festival in Southeastern Europe. Within 5 days, over 500.000 people visit the festival. The large number of visitors is mostly due to basic festival principles: free entrance, an exceptional music program, and a wide range of foreign and domestic beer brands.
Belgrade Beer Fest™ was founded in year 2003. In ten years of its existence over 5.5 million visitors could have seen more than 450 free music performances, tasted more than 90 beer brands and participated in numerous social campaigns.
The festival has received numerous awards. One of them is the recommendation of the British newspaper "The Independent", which ranked Belgrade Beer Fest™ in year 2005, among 20 world events that must be visited. Professor Dennis Wilcox, in his book, "PR Strategies and Tactics" which is being used in over 350 universities around the globe, stated Belgrade Beer Fest™ as a positive example of marketing and PR campaign. With regard to large social campaign "I choose to recycle", whose aims were the strengthening of the environmental awareness of citizens and the purchasing of recycling containers for Belgrade schools, marketing magazine "Taboo" awarded the Festival as the marketing event of the year 2009.


Welcome to the home of The Old Bookshelf, situated in Campbeltown on the West Coast of Scotland. Our wee bookshop holds over 15,000 New, Antiquarian, Out of Print and Used titles available for immediate despatch. We maintain a wide general stock, specialising in local, Scottish, maritime and military. Out of print and new titles are catalogued every day.
We work hard to make sure that every book is carefully examined and the condition is individually and accurately described. Each of our books is very carefully packaged to ensure that it arrives at its new home in the condition that it left the shop. In the event of a problem please contact us within 14 days of receipt to discuss how we can best rectify the situation.


text:
Pope Francis. Photo Credit: Korean Culture and Information Service (Jeon Han), Wikipedia Commons.
1 Entertainment Religion
Archbishop Chaput: New Pope Francis Movie Is Beautiful Tribute
May 17, 2018 CNA 0 Comments
By CNA
The upcoming film, "Pope Francis: A Man of his Word," has won praise from Archbishop Charles Chaput of Philadelphia, who applauded the movie's compelling portrayal of the Holy Father.
The director "weaves an on-going, intimate, one-on-one interview with the pope throughout the film. It's a hugely effective technique; one has a sense that Francis is looking directly at, speaking directly to, the individual viewer," the archbishop wrote in a May 14 column.
The hour-and-a-half documentary offers an intimate look at the pope's travels, acts of charity, and speeches. It shows the pope's response to social issues around the world, including immigration and the value of family life.
Distributed by Focus Features, the movie will be released in select theaters on May 18. Archbishop Chaput reviewed the film at an early screening. Additionally, Cardinal Blase Cupich of Chicago hosted a screening and discussion on May 14.
The film is co-written and directed by German filmmaker Wim Wenders. Nominated for three Academy Awards, Wenders' previous films include "Wings of Desire," "Buena Vista Social Club," and "Salt of the Earth."
The director's work is largely "marked by a Christian-inspired spirituality," Archbishop Chaput said, pointing to filmmaker's Catholic upbringing.
"He focuses compellingly on the pope's concern for the environment, the poor, and immigrants. He also captures the pope's vigorous commitment to marriage, the family, and the complementarity of men and women."
Among the most powerful scenes, Archbishop Chaput said, are the pope's visits to "immigrants, the poor, the sick, the Shoah memorial Yad Vashem in Israel, and the Western Wall in Jerusalem."
The archbishop did critique the film on a few points, saying the movie felt too lengthy and did not fully portray Catholic teachings on the human person.
"Wenders also misses (or avoids) the opportunity to present the holistic Catholic vision of human dignity that Francis serves, i.e., the reason why Catholic concerns for the unborn child, the disabled, the elderly, the environment, and the immigrant are inextricably linked in a network of priorities."
Additionally, he said the film was incomplete in its portrayal of Saint Francis of Assisi, who inspired Cardinal Jorge Bergoglio to take on the name of Pope Francis.
"Its portrait of Francis of Assisi, while useful to the narrative, is selective and only lightly acquainted with the real saint, who was a complex and formidable man concerned for Creation as a reflection of God's glory, not as a limited natural resource."
However, Archbishop Chaput said, they flaws do not detract from the beauty and substance of the film. He encouraged Catholics to support "Pope Francis: A Man of his Word," coming to theaters this Friday.
"Wenders and Focus Features (and the Holy Father himself) deserve our gratitude for offering the world such an exceptional encounter with the Successor of Peter. May it touch thousands of hearts."
← Separatist Ideas Spreading In Ethnic Russian Regions From Murmansk To Vladivostok – OpEd
Syria: Military Moving Troops To Aleppo For Fresh Offensive →
The Catholic News Agency (CNA) has been, since 2004, one of the fastest growing Catholic news providers to the English speaking world. The Catholic News Agency takes much of its mission from its sister agency, ACI Prensa, which was founded in Lima, Peru, in 1980 by Fr. Adalbert Marie Mohm (†1986).

redpajama_set_name: RedPajamaCommonCrawl


HAYWAY Episode 30 - Pasto, Colombia #Festive500 - How are you? Where are you?
Best wishes for you two for 2016…………….. and take care!!!!!!
I just found your podcast and I love it. I am a cyclist and I love finding and listening to cycling podcasts especially while riding. Anyway to answer your questions I am great and I am in Jacksonville, Florida USA.
Wow, so lovely to hear from you Jelle! We have such nice memories of that night in Nidrum. Best wishes for 2016.


text:
Home » U.S. veteran and Sublime Doughnuts owner Kamal Grant shares business tips for veteran entrepreneurs
U.S. veteran and Sublime Doughnuts owner Kamal Grant shares business tips for veteran entrepreneurs
Images courtesy of Sublime Doughnuts
On Veteran's Day, we honored United States veterans and those who are actively serving our country in the military. One of those former servicemen is Kamal Grant, owner of Sublime Doughnuts in Atlanta, Georgia.
Upon graduating high school, Grant joined the Navy and was stationed in San Diego on the USS John Young. Grant used his enlistment in the Navy as an opportunity to pursue his dream as a world class baker and business owner.
"Being in the U.S. Navy taught me discipline and the value of organization. Coming in as a teenager straight out of high school, I realized the importance of structure and that a chain of command isn't necessarily a bad thing. In fact, organization and structure helps to keep the whole team focused, productive and motivated, and is critical in running a business and preparing your business for the future," Grant says. "Not to mention, I learned the significance of dressing and looking your best, which is important when it comes to how people treat and respect you."
Serving as a baker on the USS John Young, Grant quickly gained the praise of his shipmates because of the delicious cinnamon rolls he baked. He learned how to listen to what people liked or disliked and made sure to incorporate those learnings into his formulas.
The Navy not only gave Grant an opportunity to bake (and on a large scale), but his travels around the world exposed him to international culinary treats that combined flavors and textures that he had not been accustomed to in the U.S.
"While overseas, I experienced a lot of different cultures and learned new techniques. I realized it's not just about the flavors, it's about textures and other elements that make a baked treat memorable. My international travels with the Navy taught me how to be a good baker and pastry chef, and inspired many of my recipes today by allowing me to better understand different aspects of what made products good," Grant says.
Kamal Grant's time in the U.S. Navy has influenced how he runs his business today.
"For example, when we were in Singapore, we watched local bakers make ice cream sandwiches using bread instead of cookies like we do in America. That gave me the idea for our doughnut ice cream sandwiches at Sublime Doughnuts. I realized using sweet bread, like doughnuts, for ice cream sandwiches is just as delicious while also being something new for our customers to experience."
After his time in the Navy, Grant's love for baking led him to the Culinary Institute of America. He studied at the Institute from 2002 until 2004 where he focused on high end desserts, plate presentations, classical techniques, and the flavors and textures of award-winning chefs.
In 2008, a quick stop to purchase doughnuts one day in Atlanta led him to notice a for-lease sign for an empty shop. Grant knew it was his time to act, and not long after he opened Sublime Doughnuts. Over a decade later, Grant's business has flourished into one of the most inventive doughnut shops in the country and one that can be credited with leading the gourmet doughnut trend that is currently sweeping the nation.
Grant offers advice for his fellow veterans who are looking to rejoin civilian life and even start their own businesses.
"If you're a veteran looking to start a business, or any aspiring entrepreneur, my advice is to just do it. Don't hesitate – go out there and put a business plan together. Once you have a solid business plan in place and you're on the right track, start looking into business loans and working with your bank," Grants says.
"While starting a business can be intimidating, there are a lot of resources and special benefits out there for veteran entrepreneurs, so it's a matter of finding what's right for your business and your short and long-term goals. When creating a business plan, make sure to do your research and talk with your banker. I worked closely with my bank, Chase for Business, to familiarize myself with special veteran benefits, and take advantage of waived fees and discounts. My banker helped make the process easy so I could focus on what I love – baking."
Grant credits his SBA business loan for veterans and banking with Chase for Business for helping him secure the financing he needed to start and grow his business – and turn his dream of a doughnut shop into a reality.
Business Management Sweet Goods
Nutella owner agrees to buy Nestlé's U.S. confectionery business
WWII veteran opens boozy bakery at the age of 93
Panera brings in McDonald's veteran as new chief operations officer
Sublime Doughnuts' Wheel O' Doughnuts
Kolache Factory offers free breakfast to veterans and active military on Veteran's Day


text:
Novak Djokovic unlikely to play at Australian Open over Covid-19 vaccination rules says player's father
Novak Djokovic is unlikely to play at the Australian Open unless rules over Covid-19 vaccinations are relaxed, says his father Srdjan Djokovic.
Unvaccinated players will not be allowed to compete at the 2022 event and defending champion Djokovic, 34, has declined to disclose his status.
"Under these blackmails and conditions, he probably won't [play]," Srdjan Djokovic told Serb TV.
"I wouldn't do that. And he's my son, so you decide for yourself."
World number one Djokovic has won the Australian Open a record nine times and is level on 20 Grand Slam wins with Roger Federer and Rafael Nadal.
Spaniard Nadal says he plans to play at the tournament, which runs from 17-30 January in Melbourne, but Federer will miss the event as he recovers from knee surgery.
Australian Open tournament director Craig Tiley has said that 85% of professional players are vaccinated and he expects that figure to be "between 90-95%" by the time of the event at which fans and staff will also be banned if unvaccinated.
"As far as vaccines and non-vaccines are concerned, it is the personal right of each of us whether we will be vaccinated or not," said Srdjan Djokovic in quotes reported by news website B92 from his interview with Serbia's TV Prva.
"No-one has the right to enter into our intimacy."


MELVIN J. PRINCE, M.D.; PHILLIP C. SCHAEFER, Ph.D.; RALPH S. GOLDSMITH, M.D.; ARTHUR B. CHAUSMER, M.D., Ph.D.
ARTHUR B. CHAUSMER, M.D., Ph.D.
Grant support: in part from the Jeanne B. Kempner Scholarship Fund, the Department of Internal Medicine, University of Texas Medical Branch; grant RR-73, General Clinical Research Centers Program of the Division of Research Resources, National Institutes of Health; Veterans Administration; and research grant AM 18349, National Institutes of Health.
▸Requests for reprints should be addressed to Melvin J. Prince, M.D.; 2125 Pine Street; Abilene, TX 79601.
Seven siblings with hyperphosphatemic tumoral calcinosis were studied using metabolic measures. Serum phosphorus and 1,25-dihydroxycholecalciferol concentrations were significantly increased and serum parathyroid hormone and 25-hydroxycholecalciferol concentrations were significantly decreased in these subjects. Metabolic balance studies done in three of the siblings showed positive calcium and phosphorus balances, reflected by increased gastrointestinal absorption and decreased renal excretion. These data suggest that a hereditary abnormality of vitamin D metabolism may be present in patients with hyperphosphatemic tumoral calcinosis. Failure of the normal feedback mechanism regulating the 25-hydroxy-1-alpha-hydroxylase enzyme is suggested as the major cause. Although this defect could lead to many of the metabolic abnormalities seen in these patients, the overall contribution of altered vitamin D metabolism to the pathogenesis of tumoral calcinosis is not fully understood.
Published: Ann Intern Med. 1982;96(5):586-591.
Huge tumoral calcinosis mimicking a sarcoma.
Indian J Pathol Microbiol ;62(2):337-338.


text:
Home/Energy/Energy Certificate
Harold Fezer 1938
Adapted from an article by Harold Fezer in Technocracy, Series A, number 10, July, 1937. Distributed as a pamphlet starting late 1938.
In this day of computers, credit cards, and microchips, an addendum should be included.
Rather than a book of paper "Energy Certificates", it is now possible that a plastic card similar to today's credit card with a microchip embedded would be more convenient. The chip could contain all the information required, as described in this booklet.
However, since the same information would be provided in whatever form best suits the latest technology, an understanding of the concept of the "Energy Certificate" as explained herein will help in providing that information.
The Application of Science To The Means Whereby We Live
Through countless centuries man has found his own security in the insecurity of others, has found his own economic and cultural haven at the expense of poverty and subservience in the majority, has found that a higher station in life was possible only for the few, not the multitude.
Throughout man's history a gigantic effort has been going on to erase from the face of the earth all evil between individuals, races, and nations. The approach has been an attempt at reforming and converting the individual with the hope that sufficient numbers of "good" men and women gathered in all lands might allow a lasting agreement upon the existing physical conflicts to be achieved. There is no need to picture here the futility of this approach and its very evident failure to accomplish the idealistic dreams.
It is perhaps one of the major ironies of history that a new and the only adequate approach should have been projected and offered by certain interpreters of applied physical science who distinctly disclaim as their motivating force all idealistic searches for truth, love, peace, harmony, and other imponderables.
These interpreters, men of science, undertook an analysis of the operational problems of the North American Continental area. From this analysis they synthesized a technological design of social operation which they predicted as the next most probable form of social control in this area. It was objectively presented. By it, human history can become for the first time a planned progression, based on an a quantitative analysis of the continental totality, as contrasted with the old haphazard increment of the components peculiar to evolution; i.e. the planned arrival of the fittest, instead of the mere survival of the fittest.
It is precisely the intricate immenseness of the Continental Problems arising in the control and operation of a unique high-energy civilization that requires and results in a unique and entirely new social methodology.
Energy, The Cause
The increase of energy-consuming devices in a high-energy civilization tends to nullify all concepts of `value' inherent in those previous ages. The rate of extraneous energy consumption on this Continental area has reached an order of magnitude which results in a plethora of goods and services beyond the manageable limits of our present control technique.
When power is used in vast quantities the resultant is an abundance of goods and services. Never in history has man faced the technical problem of distributing an achieved abundance. His efforts in the past have been directed toward philosophical speculation as to how abundance might be achieved. Now, abundance has been thrust upon him by technology. One technical problem has been solved, but man, not realizing that he is faced with another technical problem, has turned to philosophic speculation to solve the distribution conundrum.
The availability and use of vast quantities of power opens up many vistas of possible human achievement hitherto seen only as shifting mirages by utopian dreamers of history. It realizes the physical fact of abundance. It contains within itself the technique whereby that abundance can be distributed. It provides, not just another variation of the method of haphazard exchange now in operation throughout the world, but a technique of menstruation, a physical accounting system on a Continental order of magnitude. This Continental accounting system in operation would be the arrival of certainty in all human physical requirements.
Social Design Now Possible
Science and technology have developed the method of research and analysis. Man is now an adept with honor-roll of achievement in the discovery and classification of physical knowledge by which he has constructed energy consuming devices that have created a new world. Today, the data are available. More research is being conducted than ever before. No area on earth excels the Continent of North America in this respect. In the matter of design too, science and technology have made strides, but only in the minutiae of science and technology.
Man has designed and constructed enormous dams, power plants, canals, but he has never designed and constructed a continental hydrology. Man has designed streamlined trains, and magnificent railroad terminals, but never an integrated, continental system of low cost rail transportation. Man has designed automobiles and highways, but never a superhighway system with control of traffic origination and load factor. Man has designed mammoth strip steel mills, but not an automatic steel sequence from iron ore to finished product. Man has built haphazard Price System economies and political empires, but never has he designed a self-contained technologically controlled social mechanism.
In other words, the design of the past has been but the design of the minutiae, the working up from the part to the whole; and not the design of the whole leading down into the microcosmic parts of the entity. When a continental social mechanism is designed as an operational totality, then and then only, will the results of the whole exceed the sum of its parts. When and only when, all the factors relevant to the operation of a social mechanism are measurable, is a planned social structure possible. With immeasurable factors, effective social planning is impossible. Today, the predominant immeasurable factor is `price' which explains why neither the United States or Russia, nor any other area on earth has been able to affect a planned economy.
But of course science and technology have never had the opportunity, until four decades ago, to design in this manner. Science and technology are comparatively new. They have been engaged in building with the tools of the knowledge at hand. They have never looked upon the social order, unless it is in a Jekyll and Hyde escape from their laboratory. Therefore, the discovery of the importance of the energy factor in social measurement was made by a scientist who never left his laboratory–a scientist whose laboratory was a Continent.
Measurement by Energy Cost
The dislocation of the commodity exchange method of distributing goods and services, and economics in general, became apparent after World War I. The disrupted conditions at that time led to an investigation which in turn uncovered the astounding, yet almost obvious, fact that the only common denominator of all commodities and services is energy.
The scientists, who pointed this out, simply proposed to measure the total amount of energy used by the Continent in a given period; measure the energy cost of physical production and use these measurements as a basis for the regulation of all Continental production and distribution.
The Price System
The Price System grew out of the days of scarcity, when trading his crude materials, or stealing them, was the only way in which man could acquire the articles which he required. Through complex ramifications the trading system has grown until it is now the overwhelming structure of finance, business, commerce, and politics, in short, the Price System in toto–a gigantic structure, but still just a method of exchanging goods, springing from the ancient custom and necessity of barter. No intention or pretense is made of accurate mensuration or control; no physical accounting is involved; no accurate predictions can be made; and no stabilization can be assured. The Price System is simply a method of erratic exchange. In scarcity it sufficed well enough as an exchange method; in abundance it cannot even do that.
When the possibility of assuring accurate measurement of all goods and services in quantitative physical terms was announced, it was treated with scorn by all of the institutions of the Price System. To take science out of the laboratory, and apply it to social operations was considered heretical. But now the inevitability of such development is fast becoming accepted. Those who are blind to the acceptance of this new thing will be like those who refused to accept the coming of the railroad. They will have to accept it or remove themselves from its sphere. Let us add that it is a long, cold swim to the next continent.
Facts and Social Progression
Physical development has made the next step mandatory; and Technocracy, grown from the work of interpreters of science previously mentioned, now states the following unqualified facts: that we live on the North American Continent; that this Continent has abundant resources; that its population is the most nearly homogeneous of any like area on the earth; that we have designed, built and are operating the largest and most complex array of technological equipment in existence; that we have more men and women technically trained than any other area on earth; that we have the highest average consumption of extraneous energy per capita of any continent.
Technocracy also states: that there need be no restriction of our physical standard of living due to inadequate resources; that we can only continue toward maximum physical consumption by the increased substitution of kilowatt-hours for man hours, and by a continuous improvement of our equipment; that we will be forced to greater and greater integration of our physical equipment; that we will be forced to adopt a technological administration of all sequences of social operations.
This then is our social progression whether we like it or not. If we do not accept these physical conditions, and refuse to adopt a method of control capable of administering these processes, there is only the other alternative–complete abandonment of our technological developments, with the consequent chaos. It is not likely that we will permit that catastrophe. The American people are going to demand that we move forward; and they, the American people, are going to conscript their leaders, the technologist, scientists, and engineers, to lead them to a New America.
The following sections are not yet available for this online version:
Scientific Control
The Technate will put into operation a Continental control of all flow lines of production and distribution–a Continental statistics expressing the desires of every citizen in his choice of consumable goods and available services. This system will do the following things in a physical entity where abundance is certain;
Register on a continuous 24-hour time period basis the total net conversion of energy, which would determine (a) the availability of energy for Continental plant construction and maintenance, (b) the amount of physical wealth available in the form of the total population during the balance load period.
By means of the registration of energy converted and consumed, make possible a balanced load period.
Provide a continuous 24-hour inventory of all production and consumption.
Provide a specific registration of the type, kind, size, etc., of all goods and services, where produced, and where used.
Provide specific registration of the consumption of each individual, plus a record and description of the individual.
Allow the citizen the widest latitude of choice in consuming his individual share of Continental physical wealth.
Distribute goods and services to every member of the population.
The operation problem of producing Continental abundance is without precedence in the social history of man. The magnitude of this operational problem prescribes that there can be only a unique solution. The physical wealth of Continental abundance can be produced only by the technological application of extraneous energy to all means of production and distribution, namely, to the means whereby human beings live. This Continental production of abundance therefore will necessitate the largest per capita consumption of extraneous energy possible of achievement, consonant with maximum conservation of natural resources.
The degradation of this volume of extraneous energy on the Continent in the process of producing abundance would require the maximum efficiency at the closest approach to full load operation. It is obvious that the production of the physical wealth of Continental abundance will be attained only with human toil at a minimum, and it therefore follows that the unique solution of this operational problem must be the accurate measurement of all extraneous energy converted on the Continental area, and the continuous recording of its allocated degradation in providing the citizens of this continent with the physical wealth of abundance for individual consumption. Science and technology have no values; only measurement. The only method known to science in the measurement of the cost of all physical operations is that mount of energy consumed per unit mass, per unit time, per unit distance. Technocracy presents the only metrical control of the conversion and consumption of extraneous energy on this Continental area.
The Energy Certificate
The total amount of certificates which will be issued will represent the total amount of net energy converted in the making of goods and the provision of services. All operating, replacement, maintenance, and expansion costs (in energy) of the Continental complex, all costs of commercial services and provisions (such as local transportation, public health, and minimum housing space for each individual) are deducted before the net energy is arrived at.
The conversion of human energy does not enter into this calculation since it amounts to below 2 percent of the total consumed energy. The individual's share is not based upon his contribution of work of effort to the total operations of the area. There is no theory of labor `value'–or of any other `value'.
Individual Consuming Privileges
Every adult above 25 years of age will receive as his share of purchasing power an equal part of the total net consumed energy, and from birth to the twenty-fifth year every individual will receive a maintenance allowance.
The certificate will be issued directly to the individual. It is non-transferable and non-negotiable, and therefore it cannot be stolen, lost, loaned, borrowed, or given away. It is non-cumulative, therefore cannot be saved; and does not bear interest. It need not be spent but loses its validity after a designated time period.
The female will receive the same amount of purchasing power as the male, and receive it entirely independent of him.
The energy certificate represents equal, though not identical, purchasing power for every adult living on this Continent. In itself it represents nothing of value. It is much in the nature of a blank check–a scrap of paper.
The certificate is valid only for the purchase of items individually consumable. Means of production and distribution are not obtainable by the individual. The individual owns nothing beyond his immediate personal implements and apparel. For example, he does not own an automobile but merely pays for the use of transportation facilities on a time-distance basis.
Technocracy's mechanics of social control will permit no curtailment or differentiated increases of individual purchasing power.
The available use forms and services will most probably be beyond the consuming power of the individual.
Social Decision
The certificate furnishes the individual with the means of maximum social expression and decision, since purchasing power is the only means whereby the individual as such can participate in directing the variations possible within the limits prescribed by the energy determinants of the area wherein he lives. The rate of flow of goods and services in abundant quantities can be controlled by no other mechanism than an exact means of distribution such as the energy certificate provides. Incidentally, the energy certificate is not applicable to any society operating under scarcity conditions, or any area dependent beyond a certain maximum upon other areas for its supply of energy and resources.
The energy certificate eliminates both the basis and need of all social work, charity, and philanthropy. It will reduce crime to but a small fraction of what exists today. That fraction will fall into the field of pathology. The reduction will not be due to any change in human nature, but to the absence of objects of `value' and the lack of gain to be had. The element of a chance to win or the risk to lose disappears.
This means of distribution, based on a determinable change of physical cost per unit produced and of service provided, is not subject to fluctuations of `value.'
Identifying the Citizen
The energy certificate* will be made of water-marked paper and be issued in strips folded into rectangular booklets small enough to be carried conveniently in the pocket. [No illustration yet]
It will have one of three colors, to identify the person to whom it is being issued (hereafter called the holder) as being in the age-group below 25, between 25 and 45, or above 45.
On the one side will be printed a diagonal line whose direction will indicate the sex of the holder. Upper right to lower left will indicate it has been issued to a female; upper left to lower right (as in the figure), to a male.
On the opposite side will be printed a number indicating the date of issue, a new series being issued approximately every 30 days (see `180′). If the certificates are used up before the amount spendable is exhausted, additional blanks will be easily procurable.
In the middle of the certificate will be water-marked in large figures the dates of the period during which it will be valid (see `1967-68′). This whole-time period will always include a full balanced load period, which at the present time would be about 14 to 15 months.
At the bottom will be three lines containing various figures and letters–code. Reading from left to right along the top line, the first box will contain the holder's Registration Number, given at birth (the `9038. L. 16794′)' part of which will be the Number of the Regional Division in which the holder was born (the 9038).
The second box will contain the Number of the Regional Division in which the certificates has been issued, and in which the holder will have lived and functioned during the period for which it was issued (the `8141′).
The third box will contain a series of digits which, coded according to a modified Dewey Decimal System, will show at a glance the exact place of the holder in the Technate's functional structure. Reading from left to right, the first digit (or number) will designate the Functional Sequence in which the holder of the certificate works. This will be followed by a raised decimal point. The next digit will designate the particular Division of the Functional Sequence in which he works (whether for example, in design, Construction, Operations, or Maintenance). The next separated by several points, will be set off by another point and designate the particular Department of the Section in which he works. The last digit (or number) will be set off another point and designate the Unit in which the holder is employed. Still further subdivisions can be made if necessary.
In the figure the series of digits in the third box reads, `8.33…16.3.' This would indicate that the holder is employed in the Iron and Steel Sequence (the `8′), in the Steel Division (the first `3″), in the Operations Section (the next `3′), in the 16 Department of that Section, the Blast Furnace Department (the `16′), and the Blowing Engine Unit of that Blast Furnace Department (the last `3′).
The last box of the top line will contain two numbers. The first will indicate the total number of men employed in the Unit designated by the last digit in the preceding box; and the second will be the number of this particular holder in that group. In the figure these numbers read `22. . .11.' This would mean that the holder is number 11 of a total of 22 blowing engine operators in the Blast Furnace Department of this Section, Division, and sequence.
The code so far described, together with the contents of the last box of the second line (the serial number of the certificate, `Z. 97321′), is imprinted on the certificate prior to its issuance to the holder; therefore it is already on the certificate when it is presented for purchase. The remaining figures of the second line, and those of the third line, are carbon coded on the certificate at the time of purchase.
Measuring Consumption
The first number in the first box of the second line will indicate the total units of purchasing power remaining–before the purchase–at the disposal of the holder within the time period for which the certificate was issued. The second number will represent the physical cost of the purchase(s) just made. The total remaining units of purchasing power, obtained by subtracting the second number from the first, will be automatically coded upon the succeeding certificate, ready for the next purchase. In the figure, before the purchase was made, the holder had at his disposal 13090 units, and his purchase amounted to 23 units. The sum remaining to be coded on the succeeding certificate therefore is 13067.
The second box will contain the day of the year and the time of day at which the purchase is made. In the figure, `205 . . . 21.05′ would show the purchase as having been made on the 205th day of year at five minutes after the 21st hour (the time, of course, being figured on a 24 hour basis) .
In the third box will be the serial designation of the recording machine registering the purchase (here `H') and the number of purchase (here `76302′).
The fourth box as mentioned above will contain the serial number of the certificate (here `Z.97321′).
In the lowest of the three lines will be boxes providing for four purchases—if they consist of the same merchandise (say shoes or shirts only). The first box of a used certificate will contain series of digits and letters, again coded according to the modified Dewey Decimal System, which will specify exactly what the purchase was. In the figure the `34.46 . . . 11.e7.8′ would indicate that the article made by the Leather Sequence—leather after it has left the animal—(the`34′), that the article was a pair of low shoes (the `4′) , that they were men's shoes (the`6″), size 11 (the `11″), width E (the `E'), of the last number 7 (the `7″), and of the style number 8 (the `8″).
At the same time the holder surrenders the certificate for some service or goods he will place his signature in the space provided,
For the Production Sequences
The carbon codlings called for allow the use of electronic devices. By means of these devices it will be possible to register automatically and virtually instantaneously the date, time, amount and type of purchase as well as the complete record of the individual making the purchase. Total tabulations for the Continent or any part of the Continent will be quickly available at all times. It will be seen how indispensable this system–carbon coding and energy certificate—will be for the maintenance of adequate production schedules and sufficient stocks. By it, many kinds of checks can be quickly made. If necessary an individual's movements may be traced by his purchases across the Continent,
Technological Accounting
We find the energy certificate to be, then a methodology of technological accounting—a methodology which applies the same rigid mensuration that our mass-production of today employs, and has the employ, in its swiftly moving flow lines of intricate equipment and multifarious products.
Inflation, deflation, fiat money, social dividends etc. are—and have to be—dismissed as instruments suitable for the distribution of an abundance of goods and services. They all presuppose a condition of scarcity with its corollaries of value: demand and supply, haphazard and meager flow of goods and services, and a political interference control superimposed upon the functions of a national economy.
Today, wealth is measured according to the possession of the medium of exchange. A person's possession may have originated through channels ethical or unethical, legal or illegal, socially detrimental or beneficial; but once in possession of the medium of exchange the holder may apply it with little thought to social responsibilities, the only limiting factors being his shrewdness and the volume of tokens at his command. And under modern corporate enterprise the volume at his command will far surpass that in his actual possession. The Technate will not prohibit by legalities these uses or abuses: the energy certificate mechanism automatically excludes all possibilities of their occurrence.
The energy certificate is a methodology of mensuration and in use becomes a dependent, invariable, and integral part of the total operations. By contrast, all media of exchange represent `values,' fictitious or only ostensibly based upon physical objects, distinctly apart from or merely a unit of the totality of operations. The medium of exchange must always be restricted to processes of evaluation, and can never be a process of mensuration,
The energy certificate will not partake of that miraculous feature of a medium of exchange, expansion at a compound rate of interest. And it has nothing to do with that other convenient property of a medium of exchange which allows manipulation in such a manner as to result in a handsome multiplication of the leaven with which the first transaction is effected. We must mention, here, that the original nest egg may have been a borrowed one. Few laymen have bothered themselves to trace deposits and bank loans logically through a series of transactions. A Truly munificent golden cow has been milked for its cream by the financial world.
Values and Marx
The disappearance of `values' in tangible objects with the advancing technology approaching full automaticity is a fundamental factor not anticipated by Marxian theory of `values,' nor by any other social philosophy. The disappearance of `value' automatically invalidates all social philosophies as potential solutions of our social problems. Social philosophies are based on assumed moral values of human effort.
Previously, that item which was scarcest and involved the largest expenditure of human effort was the highest in `value.' Now, in a sea of abundance, one who stubbornly holds fast to a social philosophy and values is much like the poor hen who with bewilderment watches the ducklings she has hatched take to the water. She herself lacks the webbed feet required for swimming, and cannot understand such peculiar goings-on.
As a case in point, let us consider one material without which no life can continue on this globe–air. Air has never yet been subjected to the operations of trading, financing, mortgaging, loaning, borrowing, evaluating, or any other manipulations of the Price System. Why? Because its bountiful supply has never permitted the creation of a demand. With it there never has existed the opportunity of introducing the concepts of `value' and human labor which form the basis of Marxian theory.
The characteristics of air can be duplicated with any other needful thing, if we establish the requirement of abundance.
There might be much said in disposing of Major Douglas' Social Credit theory, Fischer's commodity dollar, Soddy's treatment of monetary structure, and other such schemes. In theory they differ, but in application they all deal in evaluation and therefore must be declared inapplicable in an era of abundance where there are no values. It did not happen that Soddy, an outstanding scientist, came remarkably close to the projection of the unique civilization required in an era of abundance–but ere too late he remembered that he was an English gentleman, inescapably charged with the preservation of all that for which Oxonian tradition stands.
The energy certificate furnishes the molecular mass with a medium whereby it presents its mandate unequivocally and continually to the administrative mechanism, without representation, delegation, referendum, or any other device of previous social administration.
The Energy certificate is the only instrument of distribution which can be used in this Continent's emerging era of abundance.
There can be no era of abundance without a New America.
The energy certificate will be the instrument of distribution in the New America.
* Footnote: This description must not be taken to represent the Energy Certificate as it will appear in a Technate. When the Technate is installed the most modern data processing extant at that time will be used.
"The injection of monetary concepts into all discussions of national wealth and income wholly confuses the people as to the actual issues at stake, and furthermore serve as a handy screen behind which, with a little word juggling, the business-political operators of the Price System can continue their profitable activities without being too greatly embarrassed by outside interference. It is high time that the significance of national wealth and income be understood by every citizen on the North American Continent."
–HOWARD SCOTT
By Secretary CHQ Technocracy|2019-11-14T06:10:43-08:00April 4th, 2014|Energy|1 Comment
TO BEGIN THE JOURNEY by George Wright
Response to a letter – George Wright
Joseph Stevens 2015-07-28 at 7:38 pm
It is a tragedy that we have encouraged social entropy and allowed such loss through careless divergence and excess. 100 years ago wildcats blindly bore into earth's reservoirs; conserving only the black carbon for it's market value while they forced the pressure and gases into the atmosphere. Today, we are like human flares that bleed off the excess, ignoring the value of work, input, and time. Why? Because none are accountable and most lack foresight: In a closed system energy is transferred, little is lost. Meanwhile, across the globe another spike of free input for someone else becomes a driver for their whole. But, here at home it will only increase the already imbalanced need for a lethargic class of state dependents who bleed off their energy over time, casting off their tools of existence it will less like the bronze age , and more like the plastic people who are formidable in entropy. Future anthropologists will unearth their newspapers and still be able to read them. The price tags will still be on their precious items–.99 cents, dollar tree, and no more than dollar store. Your proposal is like solving the San Onofre power excess that used to force the power companies to bleed electricity into the ground every night. Their solution was to harness the dam using it as a battery. The problem was at night when people were asleep and they did not use all that the grid was holding and so excess force dumping to balance the load. But, some engineer recognised both the factors at play: obvious waste and the potential for conservation; which in turn translated to a decreased need of input somewhere in the system, by balancing an existing energy consumer (output as waste) returning it to it's former value as an input within the system. (San Onofre powers the water back up to the reservoir through pipes during the night. At daybreak the San Onofre Nuclear Power Plant goes back online to serve the grid. Next, the water at the dam makes power all day as it drains the upper reservoir, and the process starts over–a free battery that only someone with vision and foresight enough was able to tap. Technocracy is that spirit. The time to implement is now. There must be action, and just as the current will make it's rounds in the circuit– it will be the charge that when diffused, peer reviewed, and posted in the commons will be the roadmap to our future system and survival. Sadly, the current with no direction will only serve to return and crush itself and short circuit the whole. By the way, I first heard of your organisation last night and I will be reading more in the future.


Odds are when you wake up in the morning, you grab your phone and start scrolling. In that moment the world is at your fingertips. A world that is at its best in almost every measurable way – healthier, happier, and more educated. But how are you helping to shape this world? Career is a cornerstone of modern life and yet 85 percent of people worldwide feel disengaged at work. However, when you add meaning to this equation, things drastically change. People want to put purpose at the center of their lives, but lack the connections needed to do so. And if we do nothing, this trend will not change as new generations already trust themselves more than traditional institutions to solve the world's problems.
We can no longer solve from the top-down, we have to empower from the bottom-up and unite the world. People will only feel like they trust the world around them when they have a hand in creating it. Particularly today, when the world is so divided. This might seem like a huge obstacle to overcome, but in reality it is an opportunity. A chance to connect the world, inside and out.
From customers, to employees, from suppliers to sales partners – nearly every stakeholder that surrounds a company's ecosystem, expects the company to do better to make the world a better place. Companies that lead with purpose, not only meet these expectations, they go well beyond. Just take a look at IKEA, taking their core business – well-designed, functional furnishings – and using it to build award-winning, solar-powered refugee shelters. Or Unilever, harnessing their brand power to push efforts to clean up "toxic content" in sponsored media. When we as company leaders align our business goals with a global agenda that drives progress, we inspire our employees to do the same.
In a lot of ways, technology is the only fast, adaptive, and personalized solution that we have to build a stronger connection between companies and causes. People also expect technology to be part of the solution because it is what they are used to. Two-thirds of the world is online and half of the global adult population owns a smartphone, with numbers climbing each day. Add to this, the rapid rise of cloud-based networks means our communities are being built and lived online.
At Patagonia, they are using technology to create a "dating site" for grassroots activism. Patagonia Action Network will match individuals to organizations tackling environmental issues such as land, water, climate, and biodiversity in their communities. We applaud their efforts. In fact, at Salesforce.org we are leveraging the most innovative technology available to create a one network solution for giving, volunteering, fundraising, and advocating for any cause and at any time. A network where you can find personal opportunities to make a difference, connect to the nonprofits you admire, and have a complete history of your impact, wherever and whenever – a mobile platform for a mobile world. We know the world is at our fingertips. The time is now to do something good with it.
To usher in this new era of corporate philanthropy, Salesforce.org is partnering with United Way to combine innovation at scale with global impact at scale, creating the perfect storm: Salesforce.org Philanthropy Cloud was announced this week. We're connecting extraordinary dots. Now you can align corporate responsibility with employee-driven values with global goals all in one click. And it won't stop there, employees will create and track their philanthropic footprints – allowing them to fully own the good they do.
To learn more, read our blog feature this month on this revolutionary new network for good.
Salesforce.org Philanthropy Cloud is expected to be generally available in Summer 2018.
United Way is the exclusive re-seller and will provide content and services to help corporate partners connect their employee engagement programs through Salesforce.org Philanthropy Cloud.
Salesforce.org Philanthropy Cloud will support North American employee giving to any eligible nonprofit in the United States of America or Canada.


Looking for entry level scuba dive courses? Come to Cebu! We got you covered, we have flexible packages that suits your preference.
Scuba diving is an activity that is reserved for certified divers. This means that one has to have a valid, recognized certification from a training agency such as PADI. Should you wish to try scuba diving without the certification course, read more about the PADI Discover Scuba Diving program that we offer.
The Open Water diver certification is the entry level rating which allows you to participate in scuba diving activities, trips or fun dives without having the need for an instructor to directly supervise your dives. Our courses come with an eLearning module that enables you to complete the theory portion of the course at your home or workplace, at your own pace and time. You only come to use to participate in your 2 day dive training conducted by verifiable, qualified and experienced PADI instructors and instructor trainers. When you are looking to take your open water course in Cebu, there is no better place to do it than with Dive Funatics.
We have awesome group deals for you. For a minimum of 3 participants, you get even more discounts.
It is important that you complete your independent study (eLearning) prior to the start of your training with us.
Download the Medical Questionnaire here and go through each of the questions. If you answer YES to any of the questions, it is important that you secure a written and signed medical clearance from your doctor prior to the start of your training. Please note that we cannot enter the water unless you either have ALL NO answers, or with a written and signed medical clearance from your medical doctor.


There are certain times of the year when you need to strengthen your inner micro-biome and the holidays is one of those times. Find out how in this upcoming show. 'Tis the season to be happy! It's easy, fun, and delicious!
For many years, and way before I found cultured foods, we would travel to my mom's house in Virginia for Christmas. It was a twenty-hour car ride from my home in Kansas City and we would often drive all night to get there so the kids would sleep. We would always be exhausted by the time we arrived at my mom's home. In anticipation of our arrival, my family would make buckets – and I mean buckets! – of sugar cookies. . .


text:
Norah L. Jones quoted in article "When Should Charities Throw In Together?"
The New York Times 11/04/16
Below is an excerpt:
When descendants move away — or disagree with one another on the mission — there are options.
Norah L. Jones, a partner at the law firm Quarles & Brady, said it was difficult to find another family foundation that shared the same goals. "It's often hard enough to balance these things within one family," she said.
But she has worked with families that want to find ways to collaborate on administrative matters or share office space.
She said she had also seen funding collaborations between foundations that work in a similar field. While these are often less formal than they would be between public charities, they can exist for a specific cause and then fall away.
Originally published in The New York Times, November 4, 2016


text:
Canadian cops' history of agents provocateurs and the G20
Cory Doctorow 2:38 am Mon Jun 28, 2010
My inbox this morning is full of emails from friends in Toronto who want to remind me that the Canadian police have a history of building up an enormous security presence for international events and then using agents provocateurs who commit and incite acts of violence, which, in turn, leads to the use of the large police presence to shut down the legit protest.
Here's the details from the Montebello, Quebec NAFTA summit in 2007: Undercover cops tried to incite violence in Montebello: union leader; Quebec police admit they went undercover at Montebello protest:
In the footage filmed Monday afternoon, three burly men with bandanas and other covers over their faces push through protesters toward a line of riot police. One of the men has a rock in his hand.
As they move forward, Coles and other union leaders dressed in suits order the men to put the rock down and leave, accuse them of being police agents provocateurs, and try unsuccessfully to unmask them.
In the end, they squeeze behind the police line, where they are calmly handcuffed.
Humberto da Silva from Sindicalista TV notes, "It strikes me that these two cruisers were abandoned exactly where the anarchist kids were headed. There was no threat to the police, and that the riot police were actually present to escort the drivers out of the area when the vehicles were abandoned. I am trying to piece together the sequence of events leading up to the abandoning of these vehicles in an area that was entirely surrounded by riot cops. The individual in this footage I took is wearing what looks remarkably like a tactical backpack, all strapped up. He wore no mask and was trying to incite others to vandalize the cruiser and turn over the other cruiser (which was parked where the pylons were originally placed) which was burned. He struck me as a provocateur."
I don't know if I agree (wearing a tactical backpack is a good idea if you're planning on committing crimes because you're a criminal as much as it's useful if you're a cop or provocateur), but those are some very odd facts in a city where CDN$1B has been spent to make the most airtight police-state in Canadian history.
Toronto's secret ID law used to arrest G20 protestor
Just a mellow afternoon at the G20
Several kilos of uranium, addressed to UK-based Iranian business, seized at Heathrow airport
British authorities discovered a package containing "several kilos of uranium" at Heathrow airport. The uranium was not sufficiently pure to be used in a thermonuclear bomb, but it could be… READ THE REST
Here are the hysterical "Best News Bloopers of 2022" (video)
We'll keep laughing as long as they keep fucking that chicken! READ THE REST
The affects and effects of news consumption in the UK
The phrase, "I don't watch the news; it depresses me," is common. News makes us think and feel. Learning about a news event, the framing by the media, and the… READ THE REST
Stay warm and toasty while unpredictable winter weather rages with this Personal Desk Heater
We thank our sponsor for making this content possible; it is not written by the editorial staff nor does it necessarily reflect its views. Once winter rolls around and we… READ THE REST
This ridiculously cool light will instantly change the vibe in any room.
We thank our sponsor for making this content possible; it is not written by the editorial staff nor does it necessarily reflect its views. When you realize you need a… READ THE REST
In an emergency, this practical multi-tool is sure to come in handy
We thank our sponsor for making this content possible; it is not written by the editorial staff nor does it necessarily reflect its views. You've got your emergency kit ready, right? While… READ THE REST


Saydrah has had her ExoSym device for about eight months now and says it not only has allowed her to regain control of her life, but it has saved her from suffering from chronic pain – something she didn't think would be possible without amputation. Living for the beauty of each sunrise and sunset, Saydrah is back on the trails – hiking and biking nearly every day and not just your up and back loop – Saydrah bikes 620ft of elevation gain near her home, hikes to the top about 1.5 miles up and then rides back home another 3 miles! #amazing While her ankle still does tend to swell at times, she's found that Swiftwick compression socks really help to keep the inflammation in check. Saydrah also maintains a solid stretching program inclusive of yoga poses which she says helps to keep her body limber.


text:
Да́нни Вие́йра да Ко́ста (; ) — немецкий футболист, защитник клуба «Майнц 05».

Клубная карьера
Данни да Коста — воспитанник «Винфридии Мюльхайм» и леверкузенского «Байера». Дебютировал в первой команде «фармацевтов» 16 декабря 2010 года в матче Лиги Европы против «Атлетико Мадрид».

24 сентября 2011 года защитник впервые сыграл в матче Бундеслиги, заменив во втором тайме игры с «Баварией» Карима Беллараби.

Всего в сезоне 2011/12 да Коста сыграл 6 матчей в чемпионате Германии, в которых отметился одной голевой передачей (в матче с «Майнцем»).

Летом 2012 года футболист отправился в аренду в «Ингольштадт 04».

В сезоне 2017/18 Данни Да Коста подписал контракт с «Айнтрахтом» из Франкфурта до 30 июня 2021 года.

Достижения
«Ингольштадт 04»
 Победитель Второй Бундеслиги: 2014/15

«Айнтрахт»
 Обладатель Кубка Германии: 2017/18
 Победитель Лиги Европы УЕФА: 2021/22

Статистика
.

Источник:

Примечания

Футболисты Германии
Игроки сборной Германии по футболу (до 21 года)
Игроки ФК «Байер 04»
Игроки ФК «Байер 04 II»
Игроки ФК «Ингольштадт 04»
Игроки ФК «Ингольштадт 04 II»
Игроки ФК «Айнтрахт» Франкфурт-на-Майне
Игроки ФК «Майнц 05»

redpajama_set_name: RedPajamaWikipedia