text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>GNU Compiler Collection (GCC) Internals: Dump examples</title>

<meta name="description" content="GNU Compiler Collection (GCC) Internals: Dump examples">
<meta name="keywords" content="GNU Compiler Collection (GCC) Internals: Dump examples">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Optimization-info.html#Optimization-info" rel="up" title="Optimization info">
<link href="GENERIC.html#GENERIC" rel="next" title="GENERIC">
<link href="Dump-types.html#Dump-types" rel="prev" title="Dump types">

Previous: Dump types, Up: Optimization info   [Contents][Index]

9.7.6 Dump examples

gcc -O3 -fopt-info-missed=missed.all

outputs missed optimization report from all the passes into
<samp>missed.all</samp>.

As another example,

gcc -O3 -fopt-info-inline-optimized-missed=inline.txt

will output information about missed optimizations as well as
optimized locations from all the inlining passes into
<samp>inline.txt</samp>.

If the <var>filename</var> is provided, then the dumps from all the
applicable optimizations are concatenated into the <samp>filename</samp>.
Otherwise the dump is output onto <samp>stderr</samp>. If <var>options</var> is
omitted, it defaults to <samp>all-all</samp>, which means dump all
available optimization info from all the passes. In the following
example, all optimization info is output on to <samp>stderr</samp>.

gcc -O3 -fopt-info

Note that <samp>-fopt-info-vec-missed</samp> behaves the same as
<samp>-fopt-info-missed-vec</samp>.

As another example, consider

gcc -fopt-info-vec-missed=vec.miss -fopt-info-loop-optimized=loop.opt

Here the two output file names <samp>vec.miss</samp> and <samp>loop.opt</samp> are
in conflict since only one output file is allowed. In this case, only
the first option takes effect and the subsequent options are
ignored. Thus only the <samp>vec.miss</samp> is produced which containts
dumps from the vectorizer about missed opportunities.


text:
"""
Collector that reports amavis metrics as reported by amavisd-agent

#### Dependencies

* amavisd-agent must be present in PATH

"""

import os
import subprocess
import re

import diamond.collector
import diamond.convertor
from diamond.collector import str_to_bool

class AmavisCollector(diamond.collector.Collector):
    # From the source of amavisd-agent and it seems like the three interesting
    # formats are these:  ("x y/h", "xMB yMB/h", "x s y s/msg"),
    # so this, ugly as it is to hardcode it this way, it should be right.
    #
    # The other option would be to directly read and decode amavis' berkeley
    # db, and I don't even want to get there

    matchers = [
        re.compile(r'^\s*(?P<name>sysUpTime)\s+TimeTicks\s+(?P<time>\d+)\s+'
                   r'\([\w:\., ]+\)\s*$'),
        re.compile(r'^\s*(?P<name>[\w]+)\s+(?P<time>[\d]+) s\s+'
                   r'(?P<frequency>[\d.]+) s/msg\s+\([\w]+\)\s*$'),
        re.compile(r'^\s*(?P<name>[\w.-]+)\s+(?P<count>[\d]+)\s+'
                   r'(?P<frequency>[\d.]+)/h\s+(?P<percentage>[\d.]+) %'
                   r'\s\([\w]+\)\s*$'),
        re.compile(r'^\s*(?P<name>[\w.-]+)\s+(?P<size>[\d]+)MB\s+'
                   r'(?P<frequency>[\d.]+)MB/h\s+(?P<percentage>[\d.]+) %'
                   r'\s\([\w]+\)\s*$'),
    ]

    def get_default_config_help(self):
        config_help = super(AmavisCollector, self).get_default_config_help()
        config_help.update({
            'amavisd_exe': 'The path to amavisd-agent',
            'use_sudo': 'Call amavisd-agent using sudo',
            'sudo_exe': 'The path to sudo',
            'sudo_user': 'The user to use if using sudo',
        })
        return config_help

    def get_default_config(self):
        config = super(AmavisCollector, self).get_default_config()
        config.update({
            'path': 'amavis',
            'amavisd_exe': '/usr/sbin/amavisd-agent',
            'use_sudo': False,
            'sudo_exe': '/usr/bin/sudo',
            'sudo_user': 'amavis',
        })
        return config

    def collect(self):
        """
        Collect memory stats
        """
        try:
            if str_to_bool(self.config['use_sudo']):
                # Use -u instead of --user as the former is more portable. Not
                # all versions of sudo support the long form --user.
                cmdline = [
                    self.config['sudo_exe'], '-u', self.config['sudo_user'],
                    '--', self.config['amavisd_exe'], '-c', '1'
                ]
            else:
                cmdline = [self.config['amavisd_exe'], '-c', '1']
            agent = subprocess.Popen(cmdline, stdout=subprocess.PIPE)
            agent_out = agent.communicate()[0]
            lines = agent_out.strip().split(os.linesep)
            for line in lines:
                for rex in self.matchers:
                    res = rex.match(line)
                    if res:
                        groups = res.groupdict()
                        name = groups['name']
                        for metric, value in groups.items():
                            if metric == 'name':
                                continue
                            mtype = 'GAUGE'
                            if metric in ('count', 'time'):
                                mtype = 'COUNTER'
                            self.publish("{0}.{1}".format(name, metric),
                                         value, metric_type=mtype)

        except OSError as err:
            self.log.error("Could not run %s: %s",
                           self.config['amavisd_exe'],
                           err)
            return None

        return True

redpajama_set_name: RedPajamaGithub


text:
package org.geomajas.sld.geometry;

import java.io.Serializable;
import org.geomajas.annotation.Api;

/**
 * Schema fragment(s) for this class:...
 *
 * <pre>
 * <xs:element
 * xmlns:gml="http://www.opengis.net/gml"
 * xmlns:xs="http://www.w3.org/2001/XMLSchema"
 * type="gml:GeometryCollectionType" substitutionGroup="gml:_Geometry" name="MultiPoint"/>
 * </pre>
 *
 * @author Jan De Moerloose
 * @since 1.0.0
 */

@Api(allMethods = true)
public class MultiPointInfo extends AbstractGeometryCollectionInfo implements Serializable {

	private static final long serialVersionUID = 100;

	@Override
	@java.lang.SuppressWarnings("all")
	public java.lang.String toString() {
		return "MultiPointInfo()";
	}

	@Override
	@java.lang.SuppressWarnings("all")
	public boolean equals(final java.lang.Object o) {
		if (o == this) {
			return true;
		}
		if (!(o instanceof MultiPointInfo)) {
			return false;
		}
		final MultiPointInfo other = (MultiPointInfo) o;
		if (!other.canEqual((java.lang.Object) this)) {
			return false;
		}
		if (!super.equals(o)) {
			return false;
		}
		return true;
	}

	/**
	 * Is there a chance that the object are equal? Verifies that the other object has a comparable type.
	 *
	 * @param other other object
	 * @return true when other is an instance of this type
	 */
	public boolean canEqual(final java.lang.Object other) {
		return other instanceof MultiPointInfo;
	}

	@Override
	@java.lang.SuppressWarnings("all")
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = result * prime + super.hashCode();
		return result;
	}
}


text:
package de.saxsys.mvvmfx.examples.books;

import de.saxsys.mvvmfx.ViewModel;
import de.saxsys.mvvmfx.examples.books.backend.Book;
import de.saxsys.mvvmfx.examples.books.backend.Error;
import de.saxsys.mvvmfx.examples.books.backend.LibraryService;
import de.saxsys.mvvmfx.utils.commands.Action;
import de.saxsys.mvvmfx.utils.commands.Command;
import de.saxsys.mvvmfx.utils.commands.DelegateCommand;
import eu.lestard.advanced_bindings.api.ObjectBindings;
import javafx.beans.property.*;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;

import javax.inject.Singleton;
import java.util.List;
import java.util.function.Consumer;
import java.util.stream.Collectors;

@Singleton
public class MainViewModel implements ViewModel {

	private final LibraryService libraryService;
	private StringProperty searchString = new SimpleStringProperty("");

	private StringProperty bookTitle = new SimpleStringProperty();
	private StringProperty bookAuthor = new SimpleStringProperty();
	private StringProperty bookDescription = new SimpleStringProperty();

	private ObservableList<BookListItemViewModel> books = FXCollections.observableArrayList();

	private ObjectProperty<BookListItemViewModel> selectedBook = new SimpleObjectProperty<>();

	private StringProperty error = new SimpleStringProperty();

	private Command searchCommand;

	public MainViewModel(LibraryService libraryService) {
		this.libraryService = libraryService;

		searchCommand = new DelegateCommand(() -> new Action() {
			@Override
			protected void action() throws Exception {
				search();
			}
		});

		bookTitle.bind(ObjectBindings.map(selectedBook, bookItem -> bookItem.getBook().getTitle()));
		bookAuthor.bind(ObjectBindings.map(selectedBook, bookItem -> bookItem.getBook().getAuthor()));
		bookDescription.bind(ObjectBindings.map(selectedBook, bookItem -> bookItem.getBook().getDesc()));
	}

	public Command getSearchCommand() {
		return searchCommand;
	}

	void search() {
		Consumer<Error> errorHandler = err -> error.set(err.getMessage());

		final List<Book> result = libraryService.search(searchString.get(), errorHandler);

		books.clear();
		books.addAll(result
				.stream()
				.map(bookWithoutDescription -> libraryService.showDetails(bookWithoutDescription, errorHandler))
				.map(BookListItemViewModel::new)
				.collect(Collectors.toList()));
	}

	public StringProperty searchStringProperty() {
		return searchString;
	}

	public StringProperty bookTitleProperty() {
		return bookTitle;
	}

	public StringProperty bookAuthorProperty() {
		return bookAuthor;
	}

	public StringProperty bookDescriptionProperty() {
		return bookDescription;
	}

	public ObservableList<BookListItemViewModel> booksProperty() {
		return books;
	}

	public ObjectProperty<BookListItemViewModel> selectedBookProperty() {
		return selectedBook;
	}

	public StringProperty errorProperty() {
		return error;
	}
}


text:
package com.shapesecurity.shift.es2017.semantics;

import com.shapesecurity.functional.data.ImmutableList;
import com.shapesecurity.shift.es2017.parser.Parser;
import com.shapesecurity.shift.es2017.semantics.asg.Node;
import com.shapesecurity.shift.es2017.semantics.visitor.GetDescendents;
import org.junit.Test;

import javax.annotation.Nonnull;
import java.nio.charset.StandardCharsets;
import java.util.IdentityHashMap;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

public class GetDescendentsTest {

	// copied from JDK 10 java.lang.StringLatin1 to ensure consistency across JVM implementations
	private static int hashCode(byte[] value) {
		int h = 0;
		for (byte v : value) {
			h = 31 * h + (v & 0xff);
		}
		return h;
	}

	@Test
	public void testVisitor() throws Exception {
		String programText = "var z; typeof a; eval; ({ set a(b) { a = 0; }, get a(){} }).a = 0; " +
			"(function() { 'use strict'; try { undefined = 0; } catch (e) {} })(); " +
			"({a: 1}).a+(-1)+1-1*1/1%1|1&1^1<<1>>>1>>1; b = 1<1>1<=1>=1==1===1!=1!==!1;" +
			"b++; b in {}; f = (function (a) { return typeof 1;});" +
			"f(); f(1); f(1, []); f(1, [], null); f(1, [], null, this); f(1, [], null, this, /a/g); new f;" +
			"delete b; if (true) delete { a: 1}.a; if (false) ; else a = ~1; try { throw 'err'; } catch (e) {};" +
			"a instanceof Number; a = 2e308; a = 1.1; o = {}; (function() { 'use strict'; f(this); o.a = 1; delete o.a; })();" +
			"a = {'a':1}; for (b in a) ;" +
			"i = 1, j = 1; switch(i) { case --j: break; }" +
			"(function(a){arguments = {0:'a', 1:'b'}; arguments[0]=1; c = arguments[0]})(2);" +
			"(function A() { \n" +
			"  try { a = 1; return a;} catch(e) { a = 5; } finally { a = 2;}\n" +
			"})();" +
			"(function A() { \n" +
			"  label: try { } finally { break label; }; return 0;\n" +
			"})();";

		Semantics asg = Explicator.deriveSemantics(Parser.parseScript(programText));
		ImmutableList<Node> nodes = GetDescendents.getDescendants(asg.node);
		assertEquals(398, nodes.length);
		String allNodes = nodes.map(node -> node.getClass().getSimpleName()).foldLeft((acc, str) -> acc + "\n" + str, "");

		// hashing class names to avoid massive, unnecessary expectation
		// this hash will change if the ASG format/generation change, otherwise it should never change.
		assertEquals(139328831, hashCode(allNodes.getBytes(StandardCharsets.UTF_8)));
	}

	@Nonnull
	private static ImmutableList<Integer> getNodeLocations(@Nonnull ImmutableList<Node> nodes) {
		IdentityHashMap<Node, Integer> nodeOriginalLocation = new IdentityHashMap<>();

		return nodes.mapWithIndex((nodeIndex, node) -> {
			Integer originalLocation = nodeOriginalLocation.get(node);
			if (originalLocation == null) {
				nodeOriginalLocation.put(node, nodeIndex);
				return nodeIndex;
			} else {
				return originalLocation;
			}
		});
	}

	@Test
	public void testCyclicGraph() throws Exception {
		String programText = "x: {\n" +
			"  break x;\n" +
			"  break x;\n" +
			"  break x;\n" +
			"  break x;\n" +
			"  break x;\n" +
			"  break x;\n" +
			"  break x;\n" +
			"  break x;\n" +
			"}\n" +
			"{\n" +
			"  many(); things();\n" +
			"}";
		Semantics asg = Explicator.deriveSemantics(Parser.parseScript(programText));
		ImmutableList<Node> asgNodes = GetDescendents.getDescendants(asg.node);

		Semantics asgRebuilt = Util.rebuildSemantics(asg);
		ImmutableList<Node> asgRebuiltNodes = GetDescendents.getDescendants(asgRebuilt.node);

		assertEquals(asg, asgRebuilt);
		assertNotEquals(asgNodes, asgRebuiltNodes); // identity equals as Node doesn't implement equals

		ImmutableList<Integer> asgNodeLocations = getNodeLocations(asgNodes);
		ImmutableList<Integer> asgRebuiltNodeLocations = getNodeLocations(asgRebuiltNodes);
		assertEquals(asgNodeLocations, asgRebuiltNodeLocations);

		ImmutableList<Integer> monotonicExample = ImmutableList.empty();
		for (int i = asgNodeLocations.length - 1; i >= 0; --i) {
			monotonicExample = monotonicExample.cons(asgNodeLocations.length - 1 - i);
		}

		assertNotEquals(asgRebuilt, monotonicExample);
	}
}


text:
package tech.greenfield.vertx.irked.exceptions;

public class InvalidRouteConfiguration extends Exception {

	private static final long serialVersionUID = 4458613845508649189L;

	public InvalidRouteConfiguration(String message) {
		super(message);
	}

}


text:
<!doctype html>

  <meta charset="utf-8">
  <title></title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width">

  <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.css">
  <link rel="stylesheet" href="styles/main.css">
  <link rel="stylesheet" href="styles/ui-rect-select.css">

鼠标框选

ui-rect-select.js

 from the Yeoman team


text:
from __future__ import print_function
from BinPy.Gates import *

# In[2]:

# Initializing the NAND class

gate = NAND(0, 1)

# Output of the NAND gate

print (gate.output())

# In[3]:

# Input changes

# Input at index 1 is changed to 0

gate.setInput(1, 0)

# New Output of the NAND gate

print (gate.output())

# In[4]:

# Changing the number of inputs

# No need to set the number, just change the inputs

gate.setInputs(1, 1, 1, 1)

# To get the input states

print (gate.getInputStates())

# New output of the NAND gate

print (gate.output())

# In[5]:

# Using Connectors as the input lines

# Take a Connector

conn = Connector()

# Set Output of gate to Connector conn

gate.setOutput(conn)
# Put this connector as the input to gate1

gate1 = NAND(conn, 0)

# Output of the gate1

print (gate1.output())

# In[6]:

# Information about gate instance

print (gate)


text:
<?php

namespace Cms\Command;

use Cms\Orm\CmsCategoryQuery;
use Mmi\Command\CommandAbstract;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CategoryRebuildCommand extends CommandAbstract
{
    public const TEMP_NAME_SUFFIX = '#suffix#';

    /**
     * Execute
     */
    public function execute(InputInterface $input, OutputInterface $output): int
    {
        //doklejanie suffixa
        foreach ((new CmsCategoryQuery())
            ->whereParentId()->equals(null)->find() as $mainCategory) {
            $mainCategory->name .= self::TEMP_NAME_SUFFIX;
            $mainCategory->save();
            $mainCategory->name = str_replace(self::TEMP_NAME_SUFFIX, '', $mainCategory->name);
            $mainCategory->save();
        }
        $output->writeln('Category uris and paths rebuilt successfully.');
        return 0;
    }
}


text:
import json
from ansible.module_utils._text import to_text
from ansible.module_utils.network.common.utils import to_list
from ansible.module_utils.connection import Connection, ConnectionError

_DEVICE_CONFIGS = None

def get_connection(module):
    if hasattr(module, '_edgeos_connection'):
        return module._edgeos_connection

    capabilities = get_capabilities(module)
    network_api = capabilities.get('network_api')
    if network_api == 'cliconf':
        module._edgeos_connection = Connection(module._socket_path)
    else:
        module.fail_json(msg='Invalid connection type %s' % network_api)

    return module._edgeos_connection

def get_capabilities(module):
    if hasattr(module, '_edgeos_capabilities'):
        return module._edgeos_capabilities

    capabilities = Connection(module._socket_path).get_capabilities()
    module._edgeos_capabilities = json.loads(capabilities)
    return module._edgeos_capabilities

def get_config(module):
    global _DEVICE_CONFIGS

    if _DEVICE_CONFIGS is not None:
        return _DEVICE_CONFIGS
    else:
        connection = get_connection(module)
        out = connection.get_config()
        cfg = to_text(out, errors='surrogate_then_replace').strip()
        _DEVICE_CONFIGS = cfg
        return cfg

def run_commands(module, commands, check_rc=True):
    responses = list()
    connection = get_connection(module)

    for cmd in to_list(commands):
        if isinstance(cmd, dict):
            command = cmd['command']
            prompt = cmd['prompt']
            answer = cmd['answer']
        else:
            command = cmd
            prompt = None
            answer = None

        try:
            out = connection.get(command, prompt, answer)
        except ConnectionError as exc:
            module.fail_json(msg=to_text(exc))

        try:
            out = to_text(out, errors='surrogate_or_strict')
        except UnicodeError:
            module.fail_json(msg=u'Failed to decode output from %s: %s' %
                             (cmd, to_text(out)))

        responses.append(out)

    return responses

def load_config(module, commands, commit=False, comment=None):
    connection = get_connection(module)

    try:
        out = connection.edit_config(commands)
    except ConnectionError as exc:
        module.fail_json(msg=to_text(exc))

    diff = None
    if module._diff:
        out = connection.get('compare')
        out = to_text(out, errors='surrogate_or_strict')

        if not out.startswith('No changes'):
            out = connection.get('show')
            diff = to_text(out, errors='surrogate_or_strict').strip()

    if commit:
        try:
            out = connection.commit(comment)
        except ConnectionError:
            connection.discard_changes()
            module.fail_json(msg='commit failed: %s' % out)

    if not commit:
        connection.discard_changes()
    else:
        connection.get('exit')

    if diff:
        return diff


text:
Please see [https://github.com/CrescoEdge/quickstart](https://github.com/CrescoEdge/quickstart) for new Cresco repositories.

---

![](images/cresco_logo.png)
======

Cresco is a free and open source edge computing framework.

## [Quick Start](QuickStart.MD)

#### Cresco Framework Core
 * [Cresco-Agent](https://github.com/ResearchWorx/Cresco-Agent): The main runtime which manages the loading of Cresco Plugins and logging.
 * [Cresco-Agent-Controller-Plugin](https://github.com/ResearchWorx/Cresco-Agent-Controller-Plugin): The main communications plugin for the Cresco Framework which establishes channels for message passing between agents in a tiered system. At this time this plugin is **required** for operation.

#### Cresco Framework Optional Plugins
 * [Cresco-SysInfo-Plugin](https://github.com/ResearchWorx/Cresco-SysInfo-Plugin): This plugin provides computational resource utilization for the machine hosting the Cresco Agent as messages sent back to a Global Controller.

#### Cresco Framework Example Plugins
 * [Cresco-Skeleton-Plugin](https://github.com/ResearchWorx/Cresco-Skeleton-Plugin): This project exists as a basic starting point for building a custom Cresco plugin.

#### Cresco Agent Topology
Cresco agents, through their Cresco-Agent-Controller-Plugin, arrange themselves into a hierarchy of a global, with a single controller, regions, each with a single regional controller, and a set of agents inside a region. The following diagram illustrates this hierarchy:

![](images/CrescoTopology.png)

This topology allows for distributed control, meaning that an agent controls its plugins, a region controls its agents and the global controls the regions over which it is in charge.

#### Getting Started
Getting started with Cresco is fairly simple, with steps as follows:
 1. Download/update/confirm a [Java Runtime Environment](http://www.oracle.com/technetwork/java/javase/overview/index.html) (JRE, Java Runtime) 1.7 or greater.
 2. Download the [latest agent build](http://128.163.188.129:9998/job/Cresco-Agent/lastSuccessfulBuild/com.researchworx.cresco$cresco-agent/) and [latest agent-controller plugin build](http://128.163.188.129:9998/job/Cresco-Agent-Controller-Plugin/lastStableBuild/com.researchworx.cresco$cresco-agent-controller-plugin/)
 3. Modify the configuration files for the agent and plugins (please refer to the wiki for configuration information)
 4. Run the agent with `java jar cresco-agent-<version>.jar -f <agent configuration file>`

#### Further Reading
For a more in-depth explanation of Cresco, you can read the author's [dissertation](http://uknowledge.uky.edu/cgi/viewcontent.cgi?article=1061&context=cs_etds).

#### Why the name Cresco?

* Proto-Indo-European *ker ("to grow").
* Old Armenian սերիմ (serim, "be born") and սերեմ (serem, "bring forth")
* Latin creare ("become visible, multiply, augment")


text:
<?php

namespace app\models;

use Yii;
use yii\base\Model;
use app\models\TblUser;

class LoginForm extends Model
{
	public $username;
	public $password;

	private $_user;

	public function rules()
    {
        return [
            // username and password are both required
            [['username', 'password'], 'required'],
   			['password','validatePassword'],
        ];
    }

    public function validatePassword( $attribute, $params )
    {
    	 if ( !$this->hasErrors() )
    	 {
    	 	$user = $this->getUser();
            if (!$user || !$user->validatePassword($this->password))
            {
                $this->addError($attribute, 'Incorrect username or password.');
                $this->addError('username', '');
            }
        }
    }

	public function login()
	{
		if ( $this->validate() )
		{
			//return Yii::$app->user->login($this->getUser(),3600);
			echo 'success sya sa login';
			exit();

		}
		else
		{
			return false;
		}
	}

    protected function getUser()
    {
    	if ( $this->_user === null ) {
            $this->_user = TblUser::findByUsername($this->username);
        }
        return $this->_user;
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width initial-scale=1" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <title>How to add your profile photo to a page in Ghost</title>
  <meta name="description" content="Founder of Lost Leaf Studio, developer, consultant, cyclist, soccer fan, nature enthusiast and lover of beer.">
  <meta name="author" content="Josh Gerdes">
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  <meta name="twitter:card" content="summary">
  <meta name="twitter:title" content="Josh Gerdes">
  <meta name="twitter:description" content="Founder of Lost Leaf Studio, developer, consultant, cyclist, soccer fan, nature enthusiast and lover of beer.">

  <meta property="og:type" content="article">
  <meta property="og:title" content="Josh Gerdes">
  <meta property="og:description" content="Founder of Lost Leaf Studio, developer, consultant, cyclist, soccer fan, nature enthusiast and lover of beer.">

  <link rel="apple-touch-icon" sizes="57x57" href="/images/favicons/apple-touch-icon-57x57.png">
  <link rel="apple-touch-icon" sizes="60x60" href="/images/favicons/apple-touch-icon-60x60.png">
  <link rel="apple-touch-icon" sizes="72x72" href="/images/favicons/apple-touch-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="76x76" href="/images/favicons/apple-touch-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="114x114" href="/images/favicons/apple-touch-icon-114x114.png">
  <link rel="apple-touch-icon" sizes="120x120" href="/images/favicons/apple-touch-icon-120x120.png">
  <link rel="apple-touch-icon" sizes="144x144" href="/images/favicons/apple-touch-icon-144x144.png">
  <link rel="apple-touch-icon" sizes="152x152" href="/images/favicons/apple-touch-icon-152x152.png">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicons/apple-touch-icon-180x180.png">
  <link rel="icon" type="image/png" href="/images/favicons/favicon-32x32.png" sizes="32x32">
  <link rel="icon" type="image/png" href="/images/favicons/favicon-194x194.png" sizes="194x194">
  <link rel="icon" type="image/png" href="/images/favicons/favicon-96x96.png" sizes="96x96">
  <link rel="icon" type="image/png" href="/images/favicons/android-chrome-192x192.png" sizes="192x192">
  <link rel="icon" type="image/png" href="/images/favicons/favicon-16x16.png" sizes="16x16">
  <link rel="manifest" href="/images/favicons/manifest.json">
  <link rel="shortcut icon" href="/images/favicons/favicon.ico">
  <meta name="msapplication-TileColor" content="#ffc40d">
  <meta name="msapplication-TileImage" content="/images/favicons/mstile-144x144.png">
  <meta name="theme-color" content="#ffffff">

  <link rel="stylesheet" href="/css/main.css">
  <link rel="canonical" href="http://joshgerdes.com//2015/how-to-add-your-profile-photo-to-a-page-in-ghost/">
  <link rel="alternate" type="application/rss+xml" title="Josh Gerdes" href="/feed.xml">

Josh Gerdes

Founder of Lost Leaf Studio, developer, consultant, cyclist, soccer fan, nature enthusiast and lover of beer.

Blog

                  Twitter

                  LinkedIn

                  GitHub

                  Email

                RSS

      <time datetime="2 Feb 2015" class="post-meta__date date">2 Feb 2015</time> • on ghost test

How to add your profile photo to a page in Ghost

I thought with the new year I should spruce up my online presence. So I decided a new site was in order. I've really enjoyed what I've seen with Ghost so I decided to have a go with it. It's been smooth sailing so far and I've come across a few tricks that I thought I should share one.

If you're interested in adding you profile photo to a page and/or template just do the following:

Add this html to the location where you want your profile image shown:

<img src="" class="profile-image" alt="My Profile Photo"/>

Add this to your css file:

.profile-image {
      position: relative;
      width: 100px;
      height: 100px;
      border: 3px solid #fff;
      border-radius:100%;
}

And if all went well you'll see the profile image similar to what you see on this site. Enjoy.

  © 2017 Josh Gerdes. All rights reserved.


text:
"""A tool that generates the OpenAPI description."""
import os

from absl import app
from absl import flags

from grr_response_server.gui import api_call_router
from grr_response_server.gui.api_plugins import metadata as metadata_plugin

flags.DEFINE_string("local_json_path", "",
                    "Path of file to save the generated JSON to.")

def main(argv):
  del argv  # Unused.

  router = api_call_router.ApiCallRouterStub()
  openapi_handler = metadata_plugin.ApiGetOpenApiDescriptionHandler(router)
  openapi_handler_result = openapi_handler.Handle(None)
  openapi_description = openapi_handler_result.openapi_description

  local_json_folder_path = os.path.dirname(flags.FLAGS.local_json_path)
  os.makedirs(local_json_folder_path, exist_ok=True)
  with open(file=flags.FLAGS.local_json_path, mode="w") as file:
    file.write(openapi_description)

if __name__ == "__main__":
  app.run(main)


text:
// /* tslint:disable:no-unused-variable */

// import { TestBed, async, inject } from '@angular/core/testing';
// import { MensSeriesHandicapService } from './mens-series-handicap.service';

// describe('MensSeriesHandicapService', () => {
//   beforeEach(() => {
//     TestBed.configureTestingModule({
//       providers: [MensSeriesHandicapService]
//     });
//   });

//   it('should ...', inject([MensSeriesHandicapService], (service: MensSeriesHandicapService) => {
//     expect(service).toBeTruthy();
//   }));
// });


text:
package com.hitsujun.core.model;

import java.util.List;

import com.hitsujun.core.util.Pair;

import playn.core.Path;

public interface StrokePath extends Path {

	public void replay(Path path);
	public List<List<Pair<Float, Float>>> getDiscretePath();
	public void replayDiscrete(Path path, int step, float percent);
	public boolean neighbors(float x, float y, float threshold);
}


text:
module ActiveRecord #:nodoc:
  module Serialization
    def to_gviz(options = {})
      GvizSerializer.new(self, options).to_s
    end

    class GvizSerializer < ActiveRecord::Serialization::Serializer #:nodoc:
      def serialize
        "{c:[" + serializable_attributes.map { |a| a.value }.join(",") + "]}"
      end

      def serializable_attributes
        serializable_attributes = serializable_attribute_names.map { |name| Attribute.new(name, @record) }
        serializable_attributes.reject { |a| [:binary,:yaml].include?(a.type) }
      end

      class Attribute
        attr_reader :name, :value, :type

        def initialize(name, record)
          @name, @record = name, record

          @type = compute_type
          @value = compute_value
        end

        protected
          def compute_type
            type = @record.class.serialized_attributes.has_key?(name) ? :yaml : @record.class.columns_hash[name].type

            case type
            when :text
              :string
            when :time
              :timeofday
            when :integer
              :number
            when :float
              :number
            when :decimal
              :number
            else
              type
            end
          end

          def compute_value
            value = @record.send(name)

            return "null" if (value.nil? || value == "")

            case type
            when :string
              "{v:\'#{value}\'}"
            when :boolean
              "{v:\'#{value}\'}"
            when :number
              "{v:#{value}}"
            when :date
              "{v:new Date(#{value.year},#{value.month},#{value.day})}"
            when :datetime
              "{v:new Date(#{value.year},#{value.month},#{value.day},#{value.hour},#{value.min},#{value.sec})}"
            when :timestamp
              "{v:new Date(#{value.year},#{value.month},#{value.day},#{value.hour},#{value.min},#{value.sec})}"
            when :timeofday
              "{v:[#{value.hour},#{value.min},#{value.sec}]}"
            else
              "null"
            end
          end

      end
    end
  end
end


text:
package main

import (
	"github.com/ant0ine/go-json-rest/rest"
	"github.com/crunchydata/crunchy-postgresql-manager/logit"
	"github.com/crunchydata/crunchy-postgresql-manager/task"
	"log"
	"net/http"
	"time"
)

func main() {

	//fmt.Fprintln(os.Stderr, "this is an error message to stderr using Fprintln")
	logit.Info.Println("sleeping during startup to give DNS a chance")

	sleepTime, _ := time.ParseDuration("7s")
	time.Sleep(sleepTime)

	task.LoadSchedules()

	logit.Info.Println("taskserver starting")

	api := rest.NewApi()
	api.Use(rest.DefaultDevStack...)
	router, err := rest.MakeRouter(
		&rest.Route{"POST", "/status/add", task.StatusAdd},
		&rest.Route{"POST", "/status/update", task.StatusUpdate},
		&rest.Route{"POST", "/executenow", task.ExecuteNow},
		&rest.Route{"POST", "/reload", task.Reload},
	)
	if err != nil {
		log.Fatal(err)
	}
	api.SetApp(router)

	http.Handle("/api/", http.StripPrefix("/api", api.MakeHandler()))

	log.Fatal(http.ListenAndServe(":13001", nil))

}


text:
{% extends "WebsiteBundle:Default:index.html.twig" %}

{% block title %}
<title>Criador de Sites Grátis - Faça seu Site - WTIS</title>
{% endblock %}

{% block metas %}
{% set metaPageTopic = 'Wtis Soluções em Tecnologia e Marketing para Web' %}
{% set metaPageClassification = 'Wtis Soluções em Tecnologia e Marketing para Web' %}
{{ parent() }}
<meta name="description" content="Crie sites completos com poucos cliques. É grátis." />
<meta property="og:title" content="Produtos Wtis | Criador de Sites Grátis" />
<meta property="og:description" content="Crie sites completos com poucos cliques. É grátis." />
<meta property="og:url" content="{{ url(app.request.get('_route')) }}" />
<meta property="og:image" content="{{ app.request.uriForPath('/images/facebook_s.gif') | replace({'/app_dev.php': ''}) }}" />
<meta property="og:phone_number" content="{{ telefoneComercial }}">
{% endblock %}

{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('css/v2012.hospedagem.css') }}" type="text/css" media="screen" />
<link rel="stylesheet" href="{{ asset('css/v2012.hospedagem.recursos.css') }}" type="text/css" media="screen" />
{% endblock %}

{% block javascripts %}
{{ parent() }}

{% endblock %}

{% block body %}

Criador de Sites Grátis

Simplicidade e facilidade para criar seu site sem pagar nada

                    Com o Criador de Sites você pode produzir e atualizar seu site com facilidade, são centenas de templates totalmente customizáveis. Esta ferramenta é bastante simples e amigável, sem precisar se preocupar com questões técnicas muito menos com alguma experiência em desenvolvimento web.

Vantagens

Várias opções de layouts

Personalize as páginas do site

Edite o conteúdo de forma rápida com opções avançadas

Defina o título, descrição e palavras-chave para o site.

Customize as meta tags do seu site.

            {% include "WebsiteBundle:Produtos:include.hospedagem.recursos.right.html" %}

{% endblock %}


text:
package networksecuritygroup

// Copyright 2017 Microsoft Corporation
//
//    Licensed under the Apache License, Version 2.0 (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
//
//        http://www.apache.org/licenses/LICENSE-2.0
//
//    Unless required by applicable law or agreed to in writing, software
//    distributed under the License is distributed on an "AS IS" BASIS,
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//    See the License for the specific language governing permissions and
//    limitations under the License.

import (
	"encoding/xml"
	"fmt"

	"github.com/Azure/azure-sdk-for-go/services/classic/management"
)

const (
	createSecurityGroupURL           = "services/networking/networksecuritygroups"
	deleteSecurityGroupURL           = "services/networking/networksecuritygroups/%s"
	getSecurityGroupURL              = "services/networking/networksecuritygroups/%s?detaillevel=full"
	listSecurityGroupsURL            = "services/networking/networksecuritygroups"
	addSecurityGroupToSubnetURL      = "services/networking/virtualnetwork/%s/subnets/%s/networksecuritygroups"
	getSecurityGroupForSubnetURL     = "services/networking/virtualnetwork/%s/subnets/%s/networksecuritygroups"
	removeSecurityGroupFromSubnetURL = "services/networking/virtualnetwork/%s/subnets/%s/networksecuritygroups/%s"
	setSecurityGroupRuleURL          = "services/networking/networksecuritygroups/%s/rules/%s"
	deleteSecurityGroupRuleURL       = "services/networking/networksecuritygroups/%s/rules/%s"

	errParamNotSpecified = "Parameter %s is not specified."
)

// NewClient is used to instantiate a new SecurityGroupClient from an Azure client
func NewClient(client management.Client) SecurityGroupClient {
	return SecurityGroupClient{client: client}
}

// CreateNetworkSecurityGroup creates a new network security group within
// the context of the specified subscription
//
// https://msdn.microsoft.com/en-us/library/azure/dn913818.aspx
func (sg SecurityGroupClient) CreateNetworkSecurityGroup(
	name string,
	label string,
	location string) (management.OperationID, error) {
	if name == "" {
		return "", fmt.Errorf(errParamNotSpecified, "name")
	}
	if location == "" {
		return "", fmt.Errorf(errParamNotSpecified, "location")
	}

	data, err := xml.Marshal(SecurityGroupRequest{
		Name:     name,
		Label:    label,
		Location: location,
	})
	if err != nil {
		return "", err
	}

	requestURL := fmt.Sprintf(createSecurityGroupURL)
	return sg.client.SendAzurePostRequest(requestURL, data)
}

// DeleteNetworkSecurityGroup deletes the specified network security group from the subscription
//
// https://msdn.microsoft.com/en-us/library/azure/dn913825.aspx
func (sg SecurityGroupClient) DeleteNetworkSecurityGroup(
	name string) (management.OperationID, error) {
	if name == "" {
		return "", fmt.Errorf(errParamNotSpecified, "name")
	}

	requestURL := fmt.Sprintf(deleteSecurityGroupURL, name)
	return sg.client.SendAzureDeleteRequest(requestURL)
}

// GetNetworkSecurityGroup returns information about the specified network security group
//
// https://msdn.microsoft.com/en-us/library/azure/dn913821.aspx
func (sg SecurityGroupClient) GetNetworkSecurityGroup(name string) (SecurityGroupResponse, error) {
	if name == "" {
		return SecurityGroupResponse{}, fmt.Errorf(errParamNotSpecified, "name")
	}

	var securityGroup SecurityGroupResponse

	requestURL := fmt.Sprintf(getSecurityGroupURL, name)
	response, err := sg.client.SendAzureGetRequest(requestURL)
	if err != nil {
		return securityGroup, err
	}

	err = xml.Unmarshal(response, &securityGroup)
	return securityGroup, err
}

// ListNetworkSecurityGroups returns a list of the network security groups
// in the specified subscription
//
// https://msdn.microsoft.com/en-us/library/azure/dn913815.aspx
func (sg SecurityGroupClient) ListNetworkSecurityGroups() (SecurityGroupList, error) {
	var securityGroups SecurityGroupList

	response, err := sg.client.SendAzureGetRequest(listSecurityGroupsURL)
	if err != nil {
		return securityGroups, err
	}

	err = xml.Unmarshal(response, &securityGroups)
	return securityGroups, err
}

// AddNetworkSecurityToSubnet associates the network security group with
// specified subnet in a virtual network
//
// https://msdn.microsoft.com/en-us/library/azure/dn913822.aspx
func (sg SecurityGroupClient) AddNetworkSecurityToSubnet(
	name string,
	subnet string,
	virtualNetwork string) (management.OperationID, error) {
	if name == "" {
		return "", fmt.Errorf(errParamNotSpecified, "name")
	}
	if subnet == "" {
		return "", fmt.Errorf(errParamNotSpecified, "subnet")
	}
	if virtualNetwork == "" {
		return "", fmt.Errorf(errParamNotSpecified, "virtualNetwork")
	}

	data, err := xml.Marshal(SecurityGroupRequest{Name: name})
	if err != nil {
		return "", err
	}

	requestURL := fmt.Sprintf(addSecurityGroupToSubnetURL, virtualNetwork, subnet)
	return sg.client.SendAzurePostRequest(requestURL, data)
}

// GetNetworkSecurityGroupForSubnet returns information about the network
// security group associated with a subnet
//
// https://msdn.microsoft.com/en-us/library/azure/dn913817.aspx
func (sg SecurityGroupClient) GetNetworkSecurityGroupForSubnet(
	subnet string,
	virtualNetwork string) (SecurityGroupResponse, error) {
	if subnet == "" {
		return SecurityGroupResponse{}, fmt.Errorf(errParamNotSpecified, "subnet")
	}
	if virtualNetwork == "" {
		return SecurityGroupResponse{}, fmt.Errorf(errParamNotSpecified, "virtualNetwork")
	}

	var securityGroup SecurityGroupResponse

	requestURL := fmt.Sprintf(getSecurityGroupForSubnetURL, virtualNetwork, subnet)
	response, err := sg.client.SendAzureGetRequest(requestURL)
	if err != nil {
		return securityGroup, err
	}

	err = xml.Unmarshal(response, &securityGroup)
	return securityGroup, err
}

// RemoveNetworkSecurityGroupFromSubnet removes the association of the
// specified network security group from the specified subnet
//
// https://msdn.microsoft.com/en-us/library/azure/dn913820.aspx
func (sg SecurityGroupClient) RemoveNetworkSecurityGroupFromSubnet(
	name string,
	subnet string,
	virtualNetwork string) (management.OperationID, error) {
	if name == "" {
		return "", fmt.Errorf(errParamNotSpecified, "name")
	}
	if subnet == "" {
		return "", fmt.Errorf(errParamNotSpecified, "subnet")
	}
	if virtualNetwork == "" {
		return "", fmt.Errorf(errParamNotSpecified, "virtualNetwork")
	}

	requestURL := fmt.Sprintf(removeSecurityGroupFromSubnetURL, virtualNetwork, subnet, name)
	return sg.client.SendAzureDeleteRequest(requestURL)
}

// SetNetworkSecurityGroupRule adds or updates a network security rule that
// is associated with the specified network security group
//
// https://msdn.microsoft.com/en-us/library/azure/dn913819.aspx
func (sg SecurityGroupClient) SetNetworkSecurityGroupRule(
	securityGroup string,
	rule RuleRequest) (management.OperationID, error) {
	if securityGroup == "" {
		return "", fmt.Errorf(errParamNotSpecified, "securityGroup")
	}
	if rule.Name == "" {
		return "", fmt.Errorf(errParamNotSpecified, "Name")
	}
	if rule.Type == "" {
		return "", fmt.Errorf(errParamNotSpecified, "Type")
	}
	if rule.Priority == 0 {
		return "", fmt.Errorf(errParamNotSpecified, "Priority")
	}
	if rule.Action == "" {
		return "", fmt.Errorf(errParamNotSpecified, "Action")
	}
	if rule.SourceAddressPrefix == "" {
		return "", fmt.Errorf(errParamNotSpecified, "SourceAddressPrefix")
	}
	if rule.SourcePortRange == "" {
		return "", fmt.Errorf(errParamNotSpecified, "SourcePortRange")
	}
	if rule.DestinationAddressPrefix == "" {
		return "", fmt.Errorf(errParamNotSpecified, "DestinationAddressPrefix")
	}
	if rule.DestinationPortRange == "" {
		return "", fmt.Errorf(errParamNotSpecified, "DestinationPortRange")
	}
	if rule.Protocol == "" {
		return "", fmt.Errorf(errParamNotSpecified, "Protocol")
	}

	data, err := xml.Marshal(rule)
	if err != nil {
		return "", err
	}

	requestURL := fmt.Sprintf(setSecurityGroupRuleURL, securityGroup, rule.Name)
	return sg.client.SendAzurePutRequest(requestURL, "", data)
}

// DeleteNetworkSecurityGroupRule deletes a network security group rule from
// the specified network security group
//
// https://msdn.microsoft.com/en-us/library/azure/dn913816.aspx
func (sg SecurityGroupClient) DeleteNetworkSecurityGroupRule(
	securityGroup string,
	rule string) (management.OperationID, error) {
	if securityGroup == "" {
		return "", fmt.Errorf(errParamNotSpecified, "securityGroup")
	}
	if rule == "" {
		return "", fmt.Errorf(errParamNotSpecified, "rule")
	}

	requestURL := fmt.Sprintf(deleteSecurityGroupRuleURL, securityGroup, rule)
	return sg.client.SendAzureDeleteRequest(requestURL)
}


text:
from lazyloader import get_lazy_loader
from sparktk.jvm.jutils import JUtils
from sparktk.sparkconf import create_sc
from sparktk.loggers import loggers
from pyspark import SparkContext

import logging
logger = logging.getLogger('sparktk')

class TkContext(object):
    """TK Context - grounding object for the sparktk library"""

    def __init__(self, sc=None, **create_sc_kwargs):
        if not sc:
            sc = create_sc(**create_sc_kwargs)
        if type(sc) is not SparkContext:
            raise TypeError("sparktk context init requires a valid SparkContext.  Received type %s" % type(sc))
        self._sc = sc
        self._jtc = self._sc._jvm.org.trustedanalytics.sparktk.TkContext(self._sc._jsc)
        self._jutils = JUtils(self._sc)
        self._scala_sc = self._jutils.get_scala_sc()
        loggers.set_spark(self._sc, "off")  # todo: undo this/move to config, I just want it outta my face most of the time

    @property
    def sc(self):
        return self._sc

    @property
    def jutils(self):
        return self._jutils

    @property
    def models(self):
        """access to the various models of sparktk"""
        return get_lazy_loader(self, "models", implicit_kwargs={'tc': self})

    @property
    def frame(self):
        return get_lazy_loader(self, "frame", implicit_kwargs={'tc': self}).frame  # .frame to account for extra 'frame' in name vis-a-vis scala

    def load(self, path):
        """loads an object from the given path"""
        scala_obj = self._jtc.load(path)
        return self._create_python_proxy(scala_obj)

    def _create_python_proxy(self, scala_obj):
        """Create a python object for the scala_obj

        Convention is such that the python proxy object is available off the TkContext with the SAME
        path that the object has in Scala, starting with sparktk.

        Example:

        org.trustedanalytics.sparktk.models.clustering.kmeans.KMeansModel

        means a call to

        tc.models.clustering.kmeans.KMeansModel.load(tc, scala_obj)

        The signature is simply the python tc and the reference to the scala obj
        """
        name_parts = scala_obj.getClass().getName().split('.')
        relevant_path = ".".join(name_parts[name_parts.index('sparktk')+1:])
        cmd = "tc.%s.load(tc, scala_obj)" % relevant_path
        logger.debug("tkcontext._create_python_proxy cmd=%s", cmd)
        proxy = eval(cmd, {"tc": self, "scala_obj": scala_obj})
        return proxy

    @property
    def agg(self):
        """access to the aggregation function enumeration"""
        from sparktk.frame.ops.group_by import agg
        return agg


text:
var GameObject = require('./GameObject');

/*===================================================*\
 * Smoke()
\*===================================================*/
var Smoke = GameObject.extend({
  /*=========================*\
   * Properties
  \*=========================*/
  getState: function() {
    return {
      id: this._id,
      x: this.x,
      y: this.y,
      duration: this.duration,
      timeStart : this.timeStart,
      type: this.type,
      angle: this.angle,
      bank: this.bank,
      velocity: this.velocity
    };
  },
  setState: function(value) {
    if (value.id != this.getId())
    {
      throw Error('The Smoke ids do not match in \'set state()\'!');
    }

    this.x = value.x;
    this.y = value.y;
    this.duration = value.duration;
    this.timeStart = value.timeStart;
    this.type = value.type;
    this.angle = value.angle;
    this.bank = value.bank;
    this.velocity = value.velocity;
  },
  /*=========================*\
   * Methods
  \*=========================*/
  init: function (parent, id, x, y, angle, callback) {
    this._super(parent, id || this.getId());

    this.GLOBALS = {
      VELOCITY_MAX: 600,
      VELOCITY_MIN: 0
    };

    this.timeStart = (new Date()).getTime();
    this.duration = (Math.random() * 2.0 + 1.0) * 1000.0;
    this.bank = -1 + (Math.random() * 2);
    this.velocity = 0;
    this.accelerator = 0;
    this.x = x;
    this.y = y;
    this.angle = angle;
    this.sprite = undefined;

    this.callback = callback;

    this.type = 'smoke';
  },
  update:function (elapsed) {
    this._super(elapsed);

    var elapsed = (new Date()).getTime() - this.timeStart,
      ratio = 1.0 - (elapsed / this.duration);

    if (ratio < 0.1)
      this.destroy();
  },
  updatePhaser: function (phaser) {
    this._super(phaser);

    var elapsed = (new Date()).getTime() - this.timeStart,
      ratio = 1.0 - (elapsed / this.duration);

    this.sprite.setLife(ratio);

    if (ratio < 0.1)
      this.destroy();
  },
  buildSprite: function (phaser) {
    this.sprite = phaser.add.smoke(this.x, this.y);
  },
  destroy: function () {
    if (this.callback)
      this.callback();

    this.destroyed = true;

    if (this.sprite)
    {
      this.sprite.destroy(true);
      this.sprite = null;
    }
  }
});

/*===================================================*\
 * Export (nodejs and browser agent)
\*===================================================*/
module.exports = Smoke;


text:
package org.gradle.language.jvm.internal;

import org.gradle.api.file.SourceDirectorySet;
import org.gradle.api.internal.file.DefaultSourceDirectorySet;
import org.gradle.api.internal.file.FileResolver;
import org.gradle.language.base.FunctionalSourceSet;
import org.gradle.language.base.internal.AbstractLanguageSourceSet;
import org.gradle.language.jvm.JvmResourceSet;

import javax.inject.Inject;

public class DefaultJvmResourceSet extends AbstractLanguageSourceSet implements JvmResourceSet {

    @Inject
    public DefaultJvmResourceSet(String name, FunctionalSourceSet parent, FileResolver fileResolver) {
        super(name, parent, "JVM resources", new DefaultSourceDirectorySet("source", fileResolver));
    }

    public DefaultJvmResourceSet(String name, SourceDirectorySet source, FunctionalSourceSet parent) {
        super(name, parent, "JVM resources", source);
    }
}


text:
from airflow import DAG
from airflow.providers.cncf.kubernetes.operators import kubernetes_pod
from airflow.providers.google.cloud.transfers import gcs_to_bigquery

default_args = {
    "owner": "Google",
    "depends_on_past": False,
    "start_date": "2021-03-01",
}

with DAG(
    dag_id="imdb.reviews",
    default_args=default_args,
    max_active_runs=1,
    schedule_interval="@once",
    catchup=False,
    default_view="graph",
) as dag:

    # Run CSV transform within kubernetes pod
    reviews_transform_csv = kubernetes_pod.KubernetesPodOperator(
        task_id="reviews_transform_csv",
        startup_timeout_seconds=600,
        name="reviews",
        namespace="composer",
        service_account_name="datasets",
        image_pull_policy="Always",
        image="{{ var.json.imdb.container_registry.run_csv_transform_kub }}",
        env_vars={
            "SOURCE_GCS_BUCKET": "{{ var.value.composer_bucket }}",
            "SOURCE_GCS_OBJECT": "data/imdb/reviews/aclImdb_v1.tar.gz",
            "SOURCE_URL": '{"title_link": "https://datasets.imdbws.com/title.basics.tsv.gz"}',
            "SOURCE_FILE": '{"user_review_data": "./files/aclImdb_v1.tar.gz", "title_data": "./files/title_basics.tsv.gz"}',
            "EXTRACT_HERE": "./files",
            "TARGET_CSV_FILE": "./files/data_output.csv",
            "TARGET_GCS_BUCKET": "{{ var.value.composer_bucket }}",
            "TARGET_GCS_PATH": "data/imdb/reviews/data_output.csv",
            "PIPELINE_NAME": "reviews",
            "CSV_HEADERS": '["review", "split", "label", "movie_id", "reviewer_rating", "movie_url", "title"]',
            "RENAME_MAPPINGS": '{"review": "review", "split": "split", "label": "label", "movie_id": "movie_id", "reviewer_rating": "reviewer_rating", "movie_url": "movie_url", "title": "title"}',
        },
        resources={"request_memory": "4G", "request_cpu": "1"},
    )

    # Task to load CSV data to a BigQuery table
    load_reviews_to_bq = gcs_to_bigquery.GCSToBigQueryOperator(
        task_id="load_reviews_to_bq",
        bucket="{{ var.value.composer_bucket }}",
        source_objects=["data/imdb/reviews/data_output.csv"],
        source_format="CSV",
        destination_project_dataset_table="imdb.reviews",
        skip_leading_rows=1,
        allow_quoted_newlines=True,
        write_disposition="WRITE_TRUNCATE",
        schema_fields=[
            {
                "name": "review",
                "type": "STRING",
                "description": "User review's in IMDb.",
                "mode": "NULLABLE",
            },
            {
                "name": "split",
                "type": "STRING",
                "description": "It has two categories test and train.",
                "mode": "NULLABLE",
            },
            {
                "name": "label",
                "type": "STRING",
                "description": "It has three categories Negative, Positive and Unsupervised. All Unsupervised label has only split equals-to train.",
                "mode": "NULLABLE",
            },
            {
                "name": "movie_id",
                "type": "STRING",
                "description": "UniqueId for the movie in IMDb.",
                "mode": "NULLABLE",
            },
            {
                "name": "reviewer_rating",
                "type": "INTEGER",
                "description": "Reviewer rating for particular movie in IMDb. For train-unsupervised, reviewer_rating is NULL.",
                "mode": "NULLABLE",
            },
            {
                "name": "movie_url",
                "type": "STRING",
                "description": "Movie url for corresponding movie_id",
                "mode": "NULLABLE",
            },
            {
                "name": "title",
                "type": "STRING",
                "description": "Title of the movie for corresponding movie_id",
                "mode": "NULLABLE",
            },
        ],
    )

    reviews_transform_csv >> load_reviews_to_bq


text:
package com.kza.rsite.admin.controller;

import com.kza.rsite.admin.service.LoggerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by kza on 2015/9/16.
 */
@Controller
@RequestMapping("system")
public class SystemController {

    @Autowired
    private LoggerService loggerService;

    @RequestMapping(value = "/logger")
    public void logger(HttpServletRequest request, HttpServletResponse response) {
        logged("hello", "world !");
    }

    private String logged(String str1, String str2) {
        return loggerService.logged(str1, str2);
    }
}


text:
import React, { Component } from 'react';
import FormControl from 'react-bootstrap/lib/FormControl'

class SearchBar extends Component {

  constructor(props){
    super(props)
    this.handleChange = this.handleChange.bind(this)
  }

  handleChange(e) {
    let { onChange } = this.props
    onChange(e.target.value)
  }

  render() {
    let { value } = this.props
    return(
          <FormControl
            type="text"
            value={value}
            placeholder="Filter by request path..."
            onChange={this.handleChange}
          />
    )
  }
}

export default SearchBar;


text:
package com.optimuscode.core.java.compiler;

import javax.tools.DiagnosticCollector;
import javax.tools.JavaFileObject;

/**
 * Created with IntelliJ IDEA.
 * User: sujay
 * Date: 9/9/13
 * Time: 8:03 PM
 * To change this template use File | Settings | File Templates.
 */
public interface JavaCompileResult {
    public void execute(DiagnosticCollector<JavaFileObject> d);
    public String getClassOutputLocation();
}


text:
package com.ibm.watson.assistant.v2.model;

import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/** Log. */
public class Log extends GenericModel {

  @SerializedName("log_id")
  protected String logId;

  protected MessageRequest request;
  protected MessageResponse response;

  @SerializedName("assistant_id")
  protected String assistantId;

  @SerializedName("session_id")
  protected String sessionId;

  @SerializedName("skill_id")
  protected String skillId;

  protected String snapshot;

  @SerializedName("request_timestamp")
  protected String requestTimestamp;

  @SerializedName("response_timestamp")
  protected String responseTimestamp;

  protected String language;

  @SerializedName("customer_id")
  protected String customerId;

  /**
   * Gets the logId.
   *
   *
A unique identifier for the logged event.
   *
   * @return the logId
   */
  public String getLogId() {
    return logId;
  }

  /**
   * Gets the request.
   *
   *
A stateful message request formatted for the Watson Assistant service.
   *
   * @return the request
   */
  public MessageRequest getRequest() {
    return request;
  }

  /**
   * Gets the response.
   *
   *
A response from the Watson Assistant service.
   *
   * @return the response
   */
  public MessageResponse getResponse() {
    return response;
  }

  /**
   * Gets the assistantId.
   *
   *
Unique identifier of the assistant.
   *
   * @return the assistantId
   */
  public String getAssistantId() {
    return assistantId;
  }

  /**
   * Gets the sessionId.
   *
   *
The ID of the session the message was part of.
   *
   * @return the sessionId
   */
  public String getSessionId() {
    return sessionId;
  }

  /**
   * Gets the skillId.
   *
   *
The unique identifier of the skill that responded to the message.
   *
   * @return the skillId
   */
  public String getSkillId() {
    return skillId;
  }

  /**
   * Gets the snapshot.
   *
   *
The name of the snapshot (dialog skill version) that responded to the message (for example,
   * `draft`).
   *
   * @return the snapshot
   */
  public String getSnapshot() {
    return snapshot;
  }

  /**
   * Gets the requestTimestamp.
   *
   *
The timestamp for receipt of the message.
   *
   * @return the requestTimestamp
   */
  public String getRequestTimestamp() {
    return requestTimestamp;
  }

  /**
   * Gets the responseTimestamp.
   *
   *
The timestamp for the system response to the message.
   *
   * @return the responseTimestamp
   */
  public String getResponseTimestamp() {
    return responseTimestamp;
  }

  /**
   * Gets the language.
   *
   *
The language of the assistant to which the message request was made.
   *
   * @return the language
   */
  public String getLanguage() {
    return language;
  }

  /**
   * Gets the customerId.
   *
   *
The customer ID specified for the message, if any.
   *
   * @return the customerId
   */
  public String getCustomerId() {
    return customerId;
  }
}


text: A command line explorer for nx files.


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CompareSortAlgorithms
{
    public enum DataType
    {
        Double,
        Int,
        String
    }
}


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.Protocols.TestTools.StackSdk.Security.KerberosLib
{
    /*
    TicketFlags     ::= KerberosFlags
        -- reserved(0),
        -- forwardable(1),
        -- forwarded(2),
        -- proxiable(3),
        -- proxy(4),
        -- may-postdate(5),
        -- postdated(6),
        -- invalid(7),
        -- renewable(8),
        -- initial(9),
        -- pre-authent(10),
        -- hw-authent(11),
        -- the following are new since 1510
        -- transited-policy-checked(12),
        -- ok-as-delegate(13)
    */
    public class TicketFlags : KerberosFlags
    {

        public TicketFlags()
            : base()
        {
        }

        public TicketFlags(string s)
            : base(s)
        {

        }
    }
}


text:
package fr.acinq.bitcoin

import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
import java.math.BigInteger
import java.nio.ByteOrder

import fr.acinq.bitcoin.Crypto.{PrivateKey, PublicKey, Scalar}
import fr.acinq.bitcoin.Protocol._
import scodec.bits.ByteVector

/**
  * see https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
  */
object DeterministicWallet {

  case class KeyPath(path: Seq[Long]) {
    def lastChildNumber: Long = if (path.isEmpty) 0L else path.last

    def derive(number: Long) = KeyPath(path :+ number)

    override def toString = path.map(KeyPath.childNumberToString).foldLeft("m")(_ + "/" + _)
  }

  object KeyPath {
    val Root = KeyPath(Nil)

    /**
      *
      * @param path key path. A list of integers separated by a `/`. May start with "/" or "m/". A single quote appended
      *             at the end means use the hardened version of the ley index (example: m/44'/0'/0'/0)
      * @return a KeyPath instance
      */
    def apply(path: String): KeyPath = {
      def toNumber(value: String): Long = if (value.last == '\'') hardened(value.dropRight(1).toLong) else value.toLong

      val path1 = path.stripPrefix("m").stripPrefix("/")
      if (path1.isEmpty) KeyPath.Root else new KeyPath(path1.split('/').map(toNumber))
    }

    def childNumberToString(childNumber: Long) = if (isHardened(childNumber)) ((childNumber - hardenedKeyIndex).toString + "'") else childNumber.toString
  }

  implicit def keypath2longseq(input: KeyPath): Seq[Long] = input.path

  implicit def longseq2keypath(input: Seq[Long]): KeyPath = KeyPath(input)

  val hardenedKeyIndex = 0x80000000L

  def hardened(index: Long): Long = hardenedKeyIndex + index

  def isHardened(index: Long): Boolean = index >= hardenedKeyIndex

  case class ExtendedPrivateKey(secretkeybytes: ByteVector, chaincode: ByteVector, depth: Int, path: KeyPath, parent: Long) {

    lazy val privateKey: PrivateKey = PrivateKey(Scalar(secretkeybytes), compressed = true)

    lazy val publicKey: PublicKey = privateKey.publicKey
  }

  object ExtendedPrivateKey {
    def decode(input: String, parentPath: KeyPath = KeyPath.Root): (Int, ExtendedPrivateKey) = {
      val (prefix, bin) = Base58Check.decodeWithIntPrefix(input)
      val bis = new ByteArrayInputStream(bin.toArray)
      val depth = Protocol.uint8(bis)
      val parent = Protocol.uint32(bis, ByteOrder.BIG_ENDIAN)
      val childNumber = Protocol.uint32(bis, ByteOrder.BIG_ENDIAN)
      val chaincode = Protocol.bytes(bis, 32)
      require(bis.read() == 0)
      val secretkeybytes = Protocol.bytes(bis, 32)
      (prefix, ExtendedPrivateKey(secretkeybytes, chaincode, depth, parentPath.derive(childNumber), parent))
    }
  }

  def encode(input: ExtendedPrivateKey, prefix: Int): String = {
    val out = new ByteArrayOutputStream()
    writeUInt8(input.depth, out)
    writeUInt32(input.parent.toInt, out, ByteOrder.BIG_ENDIAN)
    writeUInt32(input.path.lastChildNumber.toInt, out, ByteOrder.BIG_ENDIAN)
    out.write(input.chaincode.toArray)
    out.write(0)
    out.write(input.secretkeybytes.toArray)
    val buffer = ByteVector.view(out.toByteArray)
    Base58Check.encode(prefix, buffer)
  }

  @deprecated("use encode(priv, prefix (xpriv or tpriv for example)) instead", "v0.9.17")
  def encode(input: ExtendedPrivateKey, testnet: Boolean): String = encode(input, if (testnet) tprv else xprv)

  case class ExtendedPublicKey(publickeybytes: ByteVector, chaincode: ByteVector, depth: Int, path: KeyPath, parent: Long) {
    require(publickeybytes.length == 33)
    require(chaincode.length == 32)

    def publicKey: PublicKey = PublicKey(publickeybytes)
  }

  object ExtendedPublicKey {
    def decode(input: String, parentPath: KeyPath = KeyPath.Root): (Int, ExtendedPublicKey) = {
      val (prefix, bin) = Base58Check.decodeWithIntPrefix(input)
      val bis = new ByteArrayInputStream(bin.toArray)
      val depth = Protocol.uint8(bis)
      val parent = Protocol.uint32(bis, ByteOrder.BIG_ENDIAN)
      val childNumber = Protocol.uint32(bis, ByteOrder.BIG_ENDIAN)
      val chaincode = Protocol.bytes(bis, 32)
      val publickeybytes = Protocol.bytes(bis, 33)
      (prefix.toInt, ExtendedPublicKey(publickeybytes, chaincode, depth, parentPath.derive(childNumber), parent))
    }
  }

  def encode(input: ExtendedPublicKey, prefix: Int): String = {
    val out = new ByteArrayOutputStream()
    writeUInt8(input.depth, out)
    writeUInt32(input.parent.toInt, out, ByteOrder.BIG_ENDIAN)
    writeUInt32(input.path.lastChildNumber.toInt, out, ByteOrder.BIG_ENDIAN)
    out.write(input.chaincode.toArray)
    out.write(input.publickeybytes.toArray)
    val buffer = ByteVector.view(out.toByteArray)
    Base58Check.encode(prefix, buffer)
  }

  @deprecated("use encode(pub, prefix (xpub or tpub for example)) instead", "v0.9.17")
  def encode(input: ExtendedPublicKey, testnet: Boolean): String = encode(input, if (testnet) tpub else xpub)

  /**
    *
    * @param seed random seed
    * @return a "master" private key
    */
  def generate(seed: ByteVector): ExtendedPrivateKey = {
    val I = Crypto.hmac512(ByteVector.view("Bitcoin seed".getBytes("UTF-8")), seed)
    val IL = I.take(32)
    val IR = I.takeRight(32)
    ExtendedPrivateKey(IL, IR, depth = 0, path = List.empty[Long], parent = 0L)
  }

  /**
    *
    * @param input extended private key
    * @return the public key for this private key
    */
  def publicKey(input: ExtendedPrivateKey): ExtendedPublicKey = {
    ExtendedPublicKey(input.publicKey.toBin, input.chaincode, depth = input.depth, path = input.path, parent = input.parent)
  }

  /**
    *
    * @param input extended public key
    * @return the fingerprint for this public key
    */
  def fingerprint(input: ExtendedPublicKey): Long = uint32(new ByteArrayInputStream(Crypto.hash160(input.publickeybytes).take(4).reverse.toArray))

  /**
    *
    * @param input extended private key
    * @return the fingerprint for this private key (which is based on the corresponding public key)
    */
  def fingerprint(input: ExtendedPrivateKey): Long = fingerprint(publicKey(input))

  /**
    *
    * @param parent extended private key
    * @param index  index of the child key
    * @return the derived private key at the specified index
    */
  def derivePrivateKey(parent: ExtendedPrivateKey, index: Long): ExtendedPrivateKey = {
    val I = if (isHardened(index)) {
      val buffer = 0.toByte +: parent.secretkeybytes
      Crypto.hmac512(parent.chaincode, buffer ++ writeUInt32(index.toInt, ByteOrder.BIG_ENDIAN))
    } else {
      val pub = publicKey(parent).publickeybytes
      Crypto.hmac512(parent.chaincode, pub ++ writeUInt32(index.toInt, ByteOrder.BIG_ENDIAN))
    }
    val IL = I.take(32)
    val IR = I.takeRight(32)
    val p = new BigInteger(1, IL.toArray)
    if (p.compareTo(Crypto.curve.getN) >= 0) {
      throw new RuntimeException("cannot generated child private key")
    }

    val key = Scalar(IL).add(parent.privateKey)
    if (key.isZero) {
      throw new RuntimeException("cannot generated child private key")
    }
    val buffer = key.toBin.take(32)
    ExtendedPrivateKey(buffer, chaincode = IR, depth = parent.depth + 1, path = parent.path.derive(index), parent = fingerprint(parent))
  }

  /**
    *
    * @param parent extended public key
    * @param index  index of the child key
    * @return the derived public key at the specified index
    */
  def derivePublicKey(parent: ExtendedPublicKey, index: Long): ExtendedPublicKey = {
    require(!isHardened(index), "Cannot derive public keys from public hardened keys")

    val I = Crypto.hmac512(parent.chaincode, parent.publickeybytes ++ writeUInt32(index.toInt, ByteOrder.BIG_ENDIAN))
    val IL = I.take(32)
    val IR = I.takeRight(32)
    val p = new BigInteger(1, IL.toArray)
    if (p.compareTo(Crypto.curve.getN) >= 0) {
      throw new RuntimeException("cannot generated child public key")
    }
    val Ki = Scalar(p).toPoint.add(parent.publicKey)
    if (Ki.isInfinity) {
      throw new RuntimeException("cannot generated child public key")
    }
    val buffer = ByteVector.view(Ki.getEncoded(true))
    ExtendedPublicKey(buffer, chaincode = IR, depth = parent.depth + 1, path = parent.path.derive(index), parent = fingerprint(parent))
  }

  def derivePrivateKey(parent: ExtendedPrivateKey, chain: Seq[Long]): ExtendedPrivateKey = chain.foldLeft(parent)(derivePrivateKey)

  def derivePrivateKey(parent: ExtendedPrivateKey, keyPath: KeyPath): ExtendedPrivateKey = derivePrivateKey(parent, keyPath.path)

  def derivePublicKey(parent: ExtendedPublicKey, chain: Seq[Long]): ExtendedPublicKey = chain.foldLeft(parent)(derivePublicKey)

  def derivePublicKey(parent: ExtendedPublicKey, keyPath: KeyPath): ExtendedPublicKey = derivePublicKey(parent, keyPath.path)

  // p2pkh mainnet
  val xprv = 0x0488ade4
  val xpub = 0x0488b21e

  // p2sh-of-p2wpkh mainnet
  val yprv = 0x049d7878
  val ypub = 0x049d7cb2

  // p2wpkh mainnet
  val zprv = 0x04b2430c
  val zpub = 0x04b24746

  // p2pkh testnet
  val tprv = 0x04358394
  val tpub = 0x043587cf

  // p2sh-of-p2wpkh testnet
  val uprv = 0x044a4e28
  val upub = 0x044a5262

  // p2wpkh testnet
  val vprv = 0x045f18bc
  val vpub = 0x045f1cf6
}


text:
package com.google.ads.googleads.v11.enums;

public interface InteractionTypeEnumOrBuilder extends
    // @@protoc_insertion_point(interface_extends:google.ads.googleads.v11.enums.InteractionTypeEnum)
    com.google.protobuf.MessageOrBuilder {
}


text:
{% macro add(image, request, size) -%}

  <button onClick="openledger.list.addToListForm(event)" title="Save to List" alt="Save to List"
      {% if size == "large" %}
      class="button success fi-list-bullet">
      Save to List

      {% else %}
      class="button success tiny fi-list-bullet">

      {% endif %}
  </button>

  <form class="add-to-list animated" action="#" method="GET" data-logged-in="{{ request.user.is_authenticated }}"
    onClick="event.stopPropagation()">
    <input type="text" name="title" value="" autocomplete="off"  placeholder="Save to new or existing list" size="40"/>

    <input type="hidden" name="identifier" value="{{ image.identifier }}" />
  </form>

{% endmacro -%}


text:
class Rumember
  class List < Abstract

    reader :name, :filter
    boolean_reader :archived, :deleted, :locked, :smart
    integer_reader :id, :position
    alias to_s name

    def params
      {'list_id' => id}
    end

    def tasks
      dispatch('tasks.getList')['tasks']['list']['taskseries'].map do |ts|
        Task.new(self, ts)
      end
    end

  end
end


text:
{% load staticfiles %}

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="{% static "bootstrap/css/bootstrap.min.css" %}" rel="stylesheet">

    <link href="{% static "font-awesome/css/font-awesome.min.css" %}" rel="stylesheet">

    <title>{% block title %}{% endblock %}</title>
    <link rel="stylesheet" type="text/css" href="{% static "css/style.css" %}" media="screen" />
    <link rel="stylesheet" type="text/css" href="{% static "css/print.css" %}" media="print" />

            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                Toggle navigation

            </button>

{% block header_icon %}{% endblock %}

{% block headline %}{% endblock %}

{% block head-message %}{% endblock %}

    {% block breadcrum %}
    {% endblock %}

    {% block content %}
    {% endblock %}

Powered by Python, Django and Bootstrap

License: MIT


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/datastream/v1alpha1/datastream_resources.proto

package com.google.cloud.datastream.v1alpha1;

public interface MysqlProfileOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.datastream.v1alpha1.MysqlProfile)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Required. Hostname for the MySQL connection.
   *

   *
   * string hostname = 1 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The hostname.
   */
  java.lang.String getHostname();
  /**
   *
   *
   *

   * Required. Hostname for the MySQL connection.
   *

   *
   * string hostname = 1 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The bytes for hostname.
   */
  com.google.protobuf.ByteString getHostnameBytes();

  /**
   *
   *
   *

   * Port for the MySQL connection, default value is 3306.
   *

   *
   * int32 port = 2;
   *
   * @return The port.
   */
  int getPort();

  /**
   *
   *
   *

   * Required. Username for the MySQL connection.
   *

   *
   * string username = 3 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The username.
   */
  java.lang.String getUsername();
  /**
   *
   *
   *

   * Required. Username for the MySQL connection.
   *

   *
   * string username = 3 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The bytes for username.
   */
  com.google.protobuf.ByteString getUsernameBytes();

  /**
   *
   *
   *

   * Required. Input only. Password for the MySQL connection.
   *

   *
   *
   * string password = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];
   *
   *
   * @return The password.
   */
  java.lang.String getPassword();
  /**
   *
   *
   *

   * Required. Input only. Password for the MySQL connection.
   *

   *
   *
   * string password = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];
   *
   *
   * @return The bytes for password.
   */
  com.google.protobuf.ByteString getPasswordBytes();

  /**
   *
   *
   *

   * SSL configuration for the MySQL connection.
   *

   *
   * .google.cloud.datastream.v1alpha1.MysqlSslConfig ssl_config = 5;
   *
   * @return Whether the sslConfig field is set.
   */
  boolean hasSslConfig();
  /**
   *
   *
   *

   * SSL configuration for the MySQL connection.
   *

   *
   * .google.cloud.datastream.v1alpha1.MysqlSslConfig ssl_config = 5;
   *
   * @return The sslConfig.
   */
  com.google.cloud.datastream.v1alpha1.MysqlSslConfig getSslConfig();
  /**
   *
   *
   *

   * SSL configuration for the MySQL connection.
   *

   *
   * .google.cloud.datastream.v1alpha1.MysqlSslConfig ssl_config = 5;
   */
  com.google.cloud.datastream.v1alpha1.MysqlSslConfigOrBuilder getSslConfigOrBuilder();
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension-point id="languagesupport" name="EclipseForce language support" schema="schema/net.fmoraes.eclipseforces.languagesupport.exsd"/>
   <extension
         point="org.eclipse.ui.views">
      <view
            category="net.fmoraes.eclipseforces.views"
            class="net.fmoraes.eclipseforces.ProblemListView"
            icon="icons/codeforces.png"
            id="net.fmoraes.eclipseforces.ProblemListView"
            name="Problem List"
            restorable="true">
      </view>
      <category
            id="net.fmoraes.eclipseforces.views"
            name="EclipseForces">
      </category>
      <view
            category="net.fmoraes.eclipseforces.views"
            class="net.fmoraes.eclipseforces.ContestListView"
            icon="icons/codeforces.png"
            id="net.fmoraes.eclipseforces.ContestListView"
            name="Contest List"
            restorable="true">
      </view>
      <view
            allowMultiple="false"
            category="net.fmoraes.eclipseforces.views"
            class="net.fmoraes.eclipseforces.ProblemStatementView"
            icon="icons/codeforces.png"
            id="net.fmoraes.eclipseforces.ProblemStatementView"
            name="Problem Statement"
            restorable="true">
      </view>
   </extension>
   <extension
         point="net.fmoraes.eclipseforces.languagesupport">
      <languagesupport
            class="net.fmoraes.eclipseforces.java.JavaLanguageSupport"
            language="Java">
      </languagesupport>
   </extension>
   <extension
         point="org.eclipse.ui.preferencePages">
      <page
            class="net.fmoraes.eclipseforces.PreferencesPage"
            id="net.fmoraes.eclipseforces.PreferencesPage"
            name="EclipseForces">
      </page>
      <page
            category="net.fmoraes.eclipseforces.PreferencesPage"
            class="net.fmoraes.eclipseforces.java.JavaPreferencesPage"
            id="net.fmoraes.eclipseforces.java.JavaPreferencesPage"
            name="Java">
      </page>
   </extension>
   <extension
         point="org.eclipse.core.runtime.preferences">
      <initializer
            class="net.fmoraes.eclipseforces.java.PreferenceInitializer">
      </initializer>
   </extension>
   <extension
         point="org.eclipse.jdt.core.classpathVariableInitializer">
      <classpathVariableInitializer
            variable="ECLIPSEFORCES"
            class="net.fmoraes.eclipseforces.util.EclipseForcesVariableInitializer"/>
   </extension>
   <extension
         point="org.eclipse.ui.handlers">
      <handler
            class="net.fmoraes.eclipseforces.java.AddTestCase"
            commandId="net.fmoraes.eclipseforces.commands.addTestCase">
          <activeWhen>
            <or>
             <with variable="activeMenuSelection">
               <iterate ifEmpty="false">
                 <adapt type="org.eclipse.core.resources.IResource">
                   <test property="org.eclipse.core.resources.name" value="*Test.java"/>
                 </adapt>
               </iterate>
             </with>
             <with variable="activeEditorInput">
                 <adapt type="org.eclipse.core.resources.IResource">
                   <test property="org.eclipse.core.resources.name" value="*Test.java"/>
                 </adapt>
             </with>
            </or>
          </activeWhen>
      </handler>
   </extension>
   <extension
         point="org.eclipse.ui.bindings">
      <key
            commandId="net.fmoraes.eclipseforces.commands.addTestCase"
            contextId="org.eclipse.ui.contexts.window"
            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
            sequence="M1+6">
      </key>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
          <menuContribution
                locationURI="popup:org.eclipse.ui.popup.any?after=additions">
              <menu id="net.fmoraes.eclipseforces.menus" label="Eclipseforces">
                  <command
                      commandId="net.fmoraes.eclipseforces.commands.addTestCase"
                      id="net.fmoraes.eclipseforces.menus.addTestCase"
                      mnemonic="A">
                      <visibleWhen>
                        <or>
                         <with variable="activeMenuSelection">
                           <iterate ifEmpty="false">
                             <adapt type="org.eclipse.core.resources.IResource">
                               <test property="org.eclipse.core.resources.name" value="*Test.java"/>
                             </adapt>
                           </iterate>
                         </with>
                         <with variable="activeEditorInput">
                             <adapt type="org.eclipse.core.resources.IResource">
                               <test property="org.eclipse.core.resources.name" value="*Test.java"/>
                             </adapt>
                         </with>
                        </or>
                      </visibleWhen>
                  </command>
              </menu>
          </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <command
            categoryId="net.fmoraes.eclipseforces.commands"
            id="net.fmoraes.eclipseforces.commands.addTestCase"
            name="Add Testcase">
      </command>
      <category
            id="net.fmoraes.eclipseforces.commands"
            name="EclipseForces">
      </category>
   </extension>

</plugin>