text:
package samples;

import com.slack.api.app_backend.interactive_components.response.ActionResponse;
import com.slack.api.app_backend.slash_commands.response.SlashCommandResponse;
import com.slack.api.bolt.App;
import com.slack.api.bolt.AppConfig;
import com.slack.api.bolt.util.JsonOps;
import util.ResourceLoader;
import util.TestSlackAppServer;

public class AttachmentActionSample {

    public static void main(String[] args) throws Exception {
        AppConfig config = ResourceLoader.loadAppConfig();
        App app = new App(config);

        // src/test/resources/attachments/message1.json
        String firstMessage = ResourceLoader.load("attachments/message1.json");
        app.command("/view", (req, ctx) -> {
            ctx.respond(JsonOps.fromJson(firstMessage, SlashCommandResponse.class));
            return ctx.ack();
        });

        // src/test/resources/action_response/message1.json
        String secondMessage = ResourceLoader.load("action_response/message1.json");
        app.attachmentAction("wopr_game", (req, ctx) -> {
            ctx.logger.info("attachment action - {}", req.getPayload());
            ctx.respond(JsonOps.fromJson(secondMessage, ActionResponse.class));
            return ctx.ack();
        });

        TestSlackAppServer server = new TestSlackAppServer(app);
        server.start();
    }

}


text:
package chav1961.purelib.sql;

import java.sql.NClob;

/**
 *
This class implements in-memory {@linkplain NClob} to use in the SQL.

 *
This class is not thread-safe.

 *
 * @see chav1961.purelib.sql
 * @author Alexander Chernomyrdin aka chav1961
 * @since 0.0.2
 */
public class InMemoryLittleNClob extends InMemoryLittleClob implements NClob {
	/**
	 *
Create empty NClob

	 */
	InMemoryLittleNClob(){
		super();
	}

	/**
	 *
Create NCLob with the initial content

	 * @param content initial conent if th NClob
	 */
	InMemoryLittleNClob(final char[] content){
		super(content);
	}

	/**
	 *
Create Clob with the initial content

	 * @param content initial content
	 */
	InMemoryLittleNClob(final String content){
		super(content);
	}

	@Override
	public String toString() {
		return "SimpleLittleNClob [length=" + gca.length() + "]";
	}
}

redpajama_set_name: RedPajamaGithub


text:
<style include="history-clusters-shared-style">
  :host(:not([is-top-menu])) {
    opacity: 0; /* Hides the element while keeping it in tab order. */
  }

  :host(:not([is-top-menu]):-webkit-any(:focus-within, :hover)) {
    opacity: 1;
  }

  :host(:not([is-top-menu])) #openAllButton,
  :host(:not([is-top-menu])) #removeAllButton {
    display: none;
  }

  #actionMenuButton {
    --cr-icon-button-margin-end: 8px;
  }

  :host([is-top-menu]) #actionMenuButton {
    --cr-icon-button-icon-size: 24px;
  }

  :host([is-cluster-menu]) #removeSelfButton {
    display: none;
  }
</style>

<cr-icon-button id="actionMenuButton" class="icon-more-vert"
    title="$i18n{actionMenuDescription}" aria-haspopup="menu"
    on-click="onActionMenuButtonClick_">
</cr-icon-button>

<cr-lazy-render id="actionMenu">
  <template>
    <cr-action-menu role-description="$i18n{actionMenuDescription}">
      <button id="openAllButton" class="dropdown-item"
          on-click="onOpenAllButtonClick_">
        $i18n{openAllInTabGroup}
      </button>
      <button id="removeSelfButton" class="dropdown-item"
          on-click="onRemoveSelfButtonClick_">
        $i18n{removeFromHistory}
      </button>
      <button id="removeAllButton" class="dropdown-item"
          on-click="onRemoveAllButtonClick_">
        $i18n{removeAllFromHistory}
      </button>
    </cr-action-menu>
  </template>
</cr-lazy-render>


text:
from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    def _fromUtf8(s):
        return s

try:
    _encoding = QtGui.QApplication.UnicodeUTF8
    def _translate(context, text, disambig):
        return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
    def _translate(context, text, disambig):
        return QtGui.QApplication.translate(context, text, disambig)

class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(209, 134)
        self.horizontalLayout = QtGui.QHBoxLayout(Form)
        self.horizontalLayout.setSpacing(0)
        self.horizontalLayout.setMargin(0)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.horizSplitter = QtGui.QSplitter(Form)
        self.horizSplitter.setOrientation(QtCore.Qt.Horizontal)
        self.horizSplitter.setObjectName(_fromUtf8("horizSplitter"))
        self.ctrlSplitter = QtGui.QSplitter(self.horizSplitter)
        self.ctrlSplitter.setOrientation(QtCore.Qt.Vertical)
        self.ctrlSplitter.setObjectName(_fromUtf8("ctrlSplitter"))
        self.cameraGroupBox = QtGui.QGroupBox(self.ctrlSplitter)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.cameraGroupBox.setFont(font)
        self.cameraGroupBox.setObjectName(_fromUtf8("cameraGroupBox"))
        self.gridLayout = QtGui.QGridLayout(self.cameraGroupBox)
        self.gridLayout.setMargin(0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.recordCheck = QtGui.QCheckBox(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.recordCheck.setFont(font)
        self.recordCheck.setChecked(True)
        self.recordCheck.setObjectName(_fromUtf8("recordCheck"))
        self.gridLayout.addWidget(self.recordCheck, 0, 0, 1, 1)
        self.displayCheck = QtGui.QCheckBox(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.displayCheck.setFont(font)
        self.displayCheck.setChecked(True)
        self.displayCheck.setObjectName(_fromUtf8("displayCheck"))
        self.gridLayout.addWidget(self.displayCheck, 0, 1, 1, 1)
        self.triggerModeCombo = QtGui.QComboBox(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.triggerModeCombo.setFont(font)
        self.triggerModeCombo.setObjectName(_fromUtf8("triggerModeCombo"))
        self.gridLayout.addWidget(self.triggerModeCombo, 1, 0, 1, 2)
        self.triggerCheck = QtGui.QCheckBox(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.triggerCheck.setFont(font)
        self.triggerCheck.setObjectName(_fromUtf8("triggerCheck"))
        self.gridLayout.addWidget(self.triggerCheck, 2, 0, 1, 2)
        self.releaseBetweenRadio = QtGui.QRadioButton(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.releaseBetweenRadio.setFont(font)
        self.releaseBetweenRadio.setObjectName(_fromUtf8("releaseBetweenRadio"))
        self.gridLayout.addWidget(self.releaseBetweenRadio, 3, 0, 1, 2)
        self.releaseAfterRadio = QtGui.QRadioButton(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.releaseAfterRadio.setFont(font)
        self.releaseAfterRadio.setChecked(True)
        self.releaseAfterRadio.setObjectName(_fromUtf8("releaseAfterRadio"))
        self.gridLayout.addWidget(self.releaseAfterRadio, 4, 0, 1, 2)
        self.plotSplitter = QtGui.QSplitter(self.horizSplitter)
        self.plotSplitter.setOrientation(QtCore.Qt.Vertical)
        self.plotSplitter.setObjectName(_fromUtf8("plotSplitter"))
        self.imageView = ImageView(self.plotSplitter)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.imageView.sizePolicy().hasHeightForWidth())
        self.imageView.setSizePolicy(sizePolicy)
        self.imageView.setObjectName(_fromUtf8("imageView"))
        self.horizontalLayout.addWidget(self.horizSplitter)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        Form.setWindowTitle(_translate("Form", "Form", None))
        self.cameraGroupBox.setTitle(_translate("Form", "Camera", None))
        self.recordCheck.setText(_translate("Form", "Record", None))
        self.displayCheck.setText(_translate("Form", "Display", None))
        self.triggerCheck.setToolTip(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<meta name=\"qrichtext\" content=\"1\" />\n"
"
Checking this forces the camera to start after all
\n"
"
other devices in the task have started so that it
\n"
"
can correctly act as a starting trigger.
", None))
        self.triggerCheck.setText(_translate("Form", "Camera triggers task", None))
        self.releaseBetweenRadio.setText(_translate("Form", "Release between tasks", None))
        self.releaseAfterRadio.setText(_translate("Form", "Release after sequence", None))

from acq4.pyqtgraph import ImageView


text:
clear
clc

n = 5;
rng default;
real_covariance = rand(n, n);
real_covariance = 0.5*(real_covariance + real_covariance');
real_covariance = real_covariance + n*eye(n);

real_covariance;
test = real_covariance(:,n);
known_matrix = real_covariance(1:(n-1), 1:(n-1));
known_inverse = inv(known_matrix);
altering = known_inverse .* test(1:(n-1));

known_inverse
test
inverse_mat(known_inverse, test)
inv(real_covariance)


text:
package com.bms.gateway.server.domain;

public class Greeting {
	private long id;
	private String greeting;

	public Greeting(){}

	public Greeting(long id, String greeting) {
		this.id = id;
		this.greeting = greeting;
	}

	public void setId(long id) {
		this.id = id;
	}

	public void setGreeting(String greeting) {
		this.greeting = greeting;
	}

	public long getId() {
		return id;
	}

	public String getGreeting() {
		return greeting;
	}

	@Override
	public String toString() {
		return "Greeting [id=" + id + ", greeting=" + greeting + "]";
	}
}


text:
**Overpass** — _an open source web font family_

+Sponsored by [Red Hat](http://www.redhat.com), Inspired by [Highway Gothic](http://en.wikipedia.org/wiki/Highway_Gothic), Designed by [Delve Fonts](http://www.delvefonts.com)

For more information, please visit  [overpassfont.org](http://www.overpassfont.org  "overpassfont.org")

---
## Contributors

#### Designers
* Delve Withrington
* Dave Bailey
* Thomas Jockin

#### Reviewers
* Jakub Steiner
* Ben Dubrovsky
* Andy Fitzsimon

## License

Copyright 2016 Red Hat, Inc.,

This Font Software is dual licensed under the SIL Open Font License and the GNU Lesser General Public License,
LGPL 2.1 : http://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
OFL  1.1  : http://scripts.sil.org/OFL

## Which font?

### TL;DR

* Pick your font family and then select from the `'complete'` directory.
  * If you are on Windows pick a font with the `'Windows Compatible'` suffix.
    * This includes specific tweaks to ensure the font works on Windows, in particular monospace identification and font name length limitations
  * If you are limited to monospaced fonts (because of your terminal, etc) then pick a font with the `'Mono'` suffix.
    * This denotes that the Nerd Font glyphs will be monospaced not necessarily that the entire font will be monospaced

### Ligatures

By the *Nerd Font* policy, the variant with the `'Mono'` suffix is not supposed to have any ligatures.
Use the non-*Mono* variants to have ligatures.

### Explanation

Once you narrow down your font choice of family (`Droid Sans`, `Inconsolata`, etc) and style (`bold`, `italic`, etc) you have 2 main choices:

#### `Option 1: Download already patched font`

 * download an already patched font from the `complete` folder
   * This is most likely the one you want. It includes **all** of the glyphs from all of the glyph sets. Only caution here is that some fonts have glyphs in the _same_ code point so to include everything some had to be moved to alternate code points.

#### `Option 2: Patch your own font`

 * patch your own variations with the various options provided by the font patcher (see each font's readme for full list of combinations available)
   * This is the option you want if the font you use is _not_ already included or you want maximum control of what's included
   * This contains a list of _all permutations_ of the various glyphs. E.g. You want the font with only [Octicons][octicons] or you want the font with just [Font Awesome][font-awesome] and [Devicons][vorillaz-devicons]. The goal is to provide every combination possible in this folder.

For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ-and-Troubleshooting#which-font)

[vim-devicons]:https://github.com/ryanoasis/vim-devicons
[vorillaz-devicons]:https://vorillaz.github.io/devicons/
[font-awesome]:https://github.com/FortAwesome/Font-Awesome
[octicons]:https://github.com/primer/octicons
[gabrielelana-pomicons]:https://github.com/gabrielelana/pomicons
[Seti-UI]:https://atom.io/themes/seti-ui
[ryanoasis-powerline-extra-symbols]:https://github.com/ryanoasis/powerline-extra-symbols
[SIL-RFN]:http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web_fonts_and_RFNs#14cbfd4a


text:
package cn.com.sparkle.firefly.net.systemserver;

import java.io.PrintWriter;

import org.apache.log4j.Logger;

import cn.com.sparkle.firefly.Constants;
import cn.com.sparkle.firefly.config.Configuration;
import cn.com.sparkle.firefly.protocolprocessor.Protocol;
import cn.com.sparkle.firefly.protocolprocessor.ProtocolManager;
import cn.com.sparkle.firefly.protocolprocessor.ProtocolProcessorChain;
import cn.com.sparkle.firefly.protocolprocessor.negotiation.AbstractServerProtocolNegotiationProcessor;

public class SystemServerProtocolNegotiationProcessor extends AbstractServerProtocolNegotiationProcessor {

	private final static Logger logger = Logger.getLogger(SystemServerProtocolNegotiationProcessor.class);

	private Configuration conf;

	public SystemServerProtocolNegotiationProcessor(ProtocolManager protocolManager, Configuration conf) {
		super(protocolManager, conf);
		this.conf = conf;
	}

	@Override
	public ProtocolProcessorChain getChain(String version) {
		ProtocolManager protocolManager = getProtocolManager();
		Protocol protocol = protocolManager.getProtocol(version);
		return protocol.getServerInProcessor();
	}

	@Override
	public String isAcceptConnect(String targetAddress,String sourceAddress) {
		logger.info(String.format("negotiation from %s to %s",sourceAddress, targetAddress ));
		if(conf.getSelfAddress().equals(targetAddress)){
			return null;
		}else{
			logger.info(String.format("Close system connection[from %s]!Cause: the targetAddress is not match the ip of this node!", sourceAddress));
			return Constants.ERROR_NEGOTIATE_UNACCEPT_IP;
		}
	}

	@Override
	protected void writeCustomParam(PrintWriter pw) {
		pw.println(conf.getClientPort());
		pw.println(conf.isArbitrator());
	}
}


text:
> Automatically create a systemd unit file for your Node application based on package.json

## Install

`npm install --save systemdify`

or to use the CLI

`npm install -g systemdify`

## Node API

```javascript
var systemdify = require('systemdify')

var file = initdify({
	command: 'node ./server.js',
	description: 'My Awesome Application',
	cwd: '/path/to/my-app/'
})

```

Will return the following:

```
[Unit]
Description=My Awesome Application
After=network.target

[Service]
Type=simple
ExecStart=node ./server.js
Restart=always
Environment=NODE_ENV=production
WorkingDirectory=/path/to/my-app

[Install]
WantedBy=multi-user.target
```

## CLI

Systemdify will figure out what to do automatically, so you don't have to.

Simply execute systemdify and it will generate a unit file for you based on your package.json file. It will place your unit file under `/etc/systemd/system/<package.name>.service` by default.

Systemdify will try to use your `npm start` script and fall back to executing your `main` entry if you don't have one.

Systemdify will always exit cleanly when it issues a warning, but will fail if node is not installed on the system.

```
Usage
  $ systemdify <folder>

Options
  -o, --output Write output to file

Examples
  $ systemdify /path/to/my/app -o my-app.service
  $ cat my-app.service

  [Unit]
  description=My Application
  ...
```

## NPM Hooks

The recommended way to use to module is to add it to your dev dependencies and execute the package after you've done an NPM install.

```json
...
scripts: {
  "install": "sudo ./node_modules/.bin/systemdify"
},
devDepencencies: {
  "systemdify": "^0.2.0"
}
...
```


text:
package com.triangleleft.flashcards.service.settings.rest.model;

import com.google.gson.annotations.SerializedName;
import com.triangleleft.flashcards.service.settings.Language;

public class LanguageDataModel {

    @SerializedName("language_string")
    String languageString;
    @SerializedName("learning")
    Boolean learning;
    @SerializedName("current_learning")
    Boolean currentLearning;
    @SerializedName("language")
    String languageId;
    @SerializedName("level")
    Integer level;

    public Language toLanguage() {
        return Language.create(
                languageId,
                languageString,
            level,
            learning,
            currentLearning
        );
    }

}


text:
/* 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.
 */
package org.camunda.bpm.engine.impl.persistence.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.camunda.bpm.engine.ProcessEngineException;
import org.camunda.bpm.engine.authorization.Authorization;
import org.camunda.bpm.engine.authorization.Permission;
import org.camunda.bpm.engine.authorization.Permissions;
import org.camunda.bpm.engine.authorization.Resource;
import org.camunda.bpm.engine.impl.db.HasRevision;
import org.camunda.bpm.engine.impl.db.PersistentObject;

/**
 * @author Daniel Meyer
 *
 */
public class AuthorizationEntity implements Authorization, PersistentObject, HasRevision, Serializable {

  private static final long serialVersionUID = 1L;

  protected String id;
  protected int revision;

  protected int authorizationType;
  protected int permissions;
  protected String userId;
  protected String groupId;
  protected Integer resourceType;
  protected String resourceId;

  public AuthorizationEntity() {
  }

  public AuthorizationEntity(int type) {
    this.authorizationType = type;

    if(authorizationType == AUTH_TYPE_GLOBAL) {
      this.userId = ANY;
    }

    resetPermissions();
  }

  protected void resetPermissions() {
    if(authorizationType == AUTH_TYPE_GLOBAL) {
      this.permissions = Permissions.NONE.getValue();

    } else if(authorizationType == AUTH_TYPE_GRANT) {
      this.permissions = Permissions.NONE.getValue();

    } else if(authorizationType == AUTH_TYPE_REVOKE) {
      this.permissions = Permissions.ALL.getValue();

    } else {
      throw new ProcessEngineException("Unrecognized authorization type '"+authorizationType+"' Must be one of "
          +AUTH_TYPE_GLOBAL+","+AUTH_TYPE_GRANT+", "+AUTH_TYPE_REVOKE);
    }
  }

  // grant / revoke methods ////////////////////////////

  public void addPermission(Permission p) {
    permissions |= p.getValue();
  }

  public void removePermission(Permission p) {
    permissions &= ~p.getValue();
  }

  public boolean isPermissionGranted(Permission p) {
    if(AUTH_TYPE_REVOKE == authorizationType) {
      throw new IllegalStateException("Method isPermissionGranted cannot be used for authorization type REVOKE.");
    }
    return (permissions & p.getValue()) == p.getValue();
  }

  public boolean isPermissionRevoked(Permission p) {
    if(AUTH_TYPE_GRANT == authorizationType) {
      throw new IllegalStateException("Method isPermissionRevoked cannot be used for authorization type GRANT.");
    }
    return (permissions & p.getValue()) != p.getValue();
  }

  public Permission[] getPermissions(Permission[] permissions) {

    List<Permission> result = new ArrayList<Permission>();

    for (Permission permission : permissions) {
      if((AUTH_TYPE_GLOBAL == authorizationType || AUTH_TYPE_GRANT == authorizationType)
          && isPermissionGranted(permission)) {

        result.add(permission);

      } else if(AUTH_TYPE_REVOKE == authorizationType
          && isPermissionRevoked(permission)) {

        result.add(permission);

      }
    }
    return result.toArray(new Permission[ result.size() ]);
  }

  public void setPermissions(Permission[] permissions) {
    resetPermissions();
    for (Permission permission : permissions) {
      if(AUTH_TYPE_REVOKE == authorizationType) {
        removePermission(permission);

      } else {
        addPermission(permission);

      }
    }
  }

  // getters setters ///////////////////////////////

  public int getAuthorizationType() {
    return authorizationType;
  }

  public void setAuthorizationType(int authorizationType) {
    this.authorizationType = authorizationType;
  }

  public String getGroupId() {
    return groupId;
  }

  public void setGroupId(String groupId) {
    if(groupId != null && authorizationType == AUTH_TYPE_GLOBAL) {
      throw new ProcessEngineException("Cannot use groupId for GLOBAL authorization.");
    }
    this.groupId = groupId;
  }

  public String getUserId() {
    return userId;
  }

  public void setUserId(String userId) {
    if(userId != null && authorizationType == AUTH_TYPE_GLOBAL && !ANY.equals(userId)) {
      throw new ProcessEngineException("Illegal value "+userId+" for userId for GLOBAL authorization. must be '"+ANY+"'.");
    }
    this.userId = userId;
  }

  public int getResourceType() {
    return resourceType;
  }

  public void setResourceType(int type) {
    this.resourceType = type;
  }

  public Integer getResource() {
    return resourceType;
  }

  public void setResource(Resource resource) {
    this.resourceType = resource.resourceType();
  }

  public String getResourceId() {
    return resourceId;
  }

  public void setResourceId(String resourceId) {
    this.resourceId = resourceId;
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }
  public int getRevision() {
    return revision;
  }
  public void setRevision(int revision) {
    this.revision = revision;
  }

  public void setPermissions(int permissions) {
    this.permissions = permissions;
  }

  public int getPermissions() {
    return permissions;
  }

  public int getRevisionNext() {
    return revision + 1;
  }

  public Object getPersistentState() {

    HashMap<String, Object> state = new HashMap<String, Object>();
    state.put("userId", userId);
    state.put("groupId", groupId);
    state.put("resourceType", resourceType);
    state.put("resourceId", resourceId);
    state.put("permissions", permissions);

    return state;
  }

  @Override
  public String toString() {
    return this.getClass().getSimpleName()
           + "[id=" + id
           + ", revision=" + revision
           + ", authorizationType=" + authorizationType
           + ", permissions=" + permissions
           + ", userId=" + userId
           + ", groupId=" + groupId
           + ", resourceType=" + resourceType
           + ", resourceId=" + resourceId
           + "]";
  }
}


text:
/* %%%%%%%%%%%%%%%%%%%% (c) William Landi 1991 %%%%%%%%%%%%%%%%%%%%%%%%%%%% */
/* Permission to use this code is granted as long as the copyright */
/* notice remains in place. */
/* =============================== pass1.h ================================= */

/* ------------------------------- PASS1 ----------------------------------- */
/* 4 parameters:                                                             */
/*    1) SYMBOL_TABLE *SYM_TAB;      loaders [global] symbol table           */
/*    2) int *LOCATION;              Location to load next csect             */
/*    3) int *ERROR;                 any errors in the object code?          */
/*    4) FILE *INPUT;                stream with the object code             */
/* Process Header, define, and end records of oen object file.               */
extern void PASS1();


text:
package com.hitler.common.model.annotation;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(value = { FIELD, METHOD, ANNOTATION_TYPE })
public @interface Checked {

}


text:
namespace s3d
{
	class CCodec : public ISiv3DCodec
	{
	private:

	public:

		CCodec();

		~CCodec() override;

		void init() override;

		Wave decode(IReader& reader) override;
	};
}


text:
/**
 * Created by krzysztof on 04.10.14.
 */
'use strict';

var http = require('http');
var server = http.createServer(function (req, res) {
  res.end();
});

server.listen(3002, function () {
  console.log('ENV: ' + process.env.NODE_ENV);
});


text:
<?php

namespace Google\Service\DisplayVideo;

class LanguageTargetingOptionDetails extends \Google\Model
{
  /**
   * @var string
   */
  public $displayName;

  /**
   * @param string
   */
  public function setDisplayName($displayName)
  {
    $this->displayName = $displayName;
  }
  /**
   * @return string
   */
  public function getDisplayName()
  {
    return $this->displayName;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LanguageTargetingOptionDetails::class, 'Google_Service_DisplayVideo_LanguageTargetingOptionDetails');


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/talent/v4beta1/job_service.proto

namespace Google\Cloud\Talent\V4beta1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * List jobs request.
 *
 * Generated from protobuf message google.cloud.talent.v4beta1.ListJobsRequest
 */
class ListJobsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the tenant under which the job is created.
     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
     * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
     * is created. For example, "projects/foo".
     *
     * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
     */
    private $parent = '';
    /**
     * Required. The filter string specifies the jobs to be enumerated.
     * Supported operator: =, AND
     * The fields eligible for filtering are:
     * * `companyName` (Required)
     * * `requisitionId`
     * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
     * OPEN if no value is specified.
     * Sample Query:
     * * companyName = "projects/foo/tenants/bar/companies/baz"
     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
     * requisitionId = "req-1"
     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
     * status = "EXPIRED"
     *
     * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED];
     */
    private $filter = '';
    /**
     * The starting point of a query result.
     *
     * Generated from protobuf field string page_token = 3;
     */
    private $page_token = '';
    /**
     * The maximum number of jobs to be returned per page of results.
     * If [job_view][google.cloud.talent.v4beta1.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4beta1.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
     * page size is 1000. Otherwise, the maximum allowed page size is 100.
     * Default is 100 if empty or a number < 1 is specified.
     *
     * Generated from protobuf field int32 page_size = 4;
     */
    private $page_size = 0;
    /**
     * The desired job attributes returned for jobs in the
     * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_FULL] if no value is
     * specified.
     *
     * Generated from protobuf field .google.cloud.talent.v4beta1.JobView job_view = 5;
     */
    private $job_view = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource name of the tenant under which the job is created.
     *           The format is "projects/{project_id}/tenants/{tenant_id}". For example,
     *           "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
     *           is created. For example, "projects/foo".
     *     @type string $filter
     *           Required. The filter string specifies the jobs to be enumerated.
     *           Supported operator: =, AND
     *           The fields eligible for filtering are:
     *           * `companyName` (Required)
     *           * `requisitionId`
     *           * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
     *           OPEN if no value is specified.
     *           Sample Query:
     *           * companyName = "projects/foo/tenants/bar/companies/baz"
     *           * companyName = "projects/foo/tenants/bar/companies/baz" AND
     *           requisitionId = "req-1"
     *           * companyName = "projects/foo/tenants/bar/companies/baz" AND
     *           status = "EXPIRED"
     *     @type string $page_token
     *           The starting point of a query result.
     *     @type int $page_size
     *           The maximum number of jobs to be returned per page of results.
     *           If [job_view][google.cloud.talent.v4beta1.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4beta1.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
     *           page size is 1000. Otherwise, the maximum allowed page size is 100.
     *           Default is 100 if empty or a number < 1 is specified.
     *     @type int $job_view
     *           The desired job attributes returned for jobs in the
     *           search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_FULL] if no value is
     *           specified.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Talent\V4Beta1\JobService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the tenant under which the job is created.
     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
     * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
     * is created. For example, "projects/foo".
     *
     * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The resource name of the tenant under which the job is created.
     * The format is "projects/{project_id}/tenants/{tenant_id}". For example,
     * "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant
     * is created. For example, "projects/foo".
     *
     * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The filter string specifies the jobs to be enumerated.
     * Supported operator: =, AND
     * The fields eligible for filtering are:
     * * `companyName` (Required)
     * * `requisitionId`
     * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
     * OPEN if no value is specified.
     * Sample Query:
     * * companyName = "projects/foo/tenants/bar/companies/baz"
     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
     * requisitionId = "req-1"
     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
     * status = "EXPIRED"
     *
     * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED];
     * @return string
     */
    public function getFilter()
    {
        return $this->filter;
    }

    /**
     * Required. The filter string specifies the jobs to be enumerated.
     * Supported operator: =, AND
     * The fields eligible for filtering are:
     * * `companyName` (Required)
     * * `requisitionId`
     * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
     * OPEN if no value is specified.
     * Sample Query:
     * * companyName = "projects/foo/tenants/bar/companies/baz"
     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
     * requisitionId = "req-1"
     * * companyName = "projects/foo/tenants/bar/companies/baz" AND
     * status = "EXPIRED"
     *
     * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED];
     * @param string $var
     * @return $this
     */
    public function setFilter($var)
    {
        GPBUtil::checkString($var, True);
        $this->filter = $var;

        return $this;
    }

    /**
     * The starting point of a query result.
     *
     * Generated from protobuf field string page_token = 3;
     * @return string
     */
    public function getPageToken()
    {
        return $this->page_token;
    }

    /**
     * The starting point of a query result.
     *
     * Generated from protobuf field string page_token = 3;
     * @param string $var
     * @return $this
     */
    public function setPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->page_token = $var;

        return $this;
    }

    /**
     * The maximum number of jobs to be returned per page of results.
     * If [job_view][google.cloud.talent.v4beta1.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4beta1.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
     * page size is 1000. Otherwise, the maximum allowed page size is 100.
     * Default is 100 if empty or a number < 1 is specified.
     *
     * Generated from protobuf field int32 page_size = 4;
     * @return int
     */
    public function getPageSize()
    {
        return $this->page_size;
    }

    /**
     * The maximum number of jobs to be returned per page of results.
     * If [job_view][google.cloud.talent.v4beta1.ListJobsRequest.job_view] is set to [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4beta1.JobView.JOB_VIEW_ID_ONLY], the maximum allowed
     * page size is 1000. Otherwise, the maximum allowed page size is 100.
     * Default is 100 if empty or a number < 1 is specified.
     *
     * Generated from protobuf field int32 page_size = 4;
     * @param int $var
     * @return $this
     */
    public function setPageSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->page_size = $var;

        return $this;
    }

    /**
     * The desired job attributes returned for jobs in the
     * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_FULL] if no value is
     * specified.
     *
     * Generated from protobuf field .google.cloud.talent.v4beta1.JobView job_view = 5;
     * @return int
     */
    public function getJobView()
    {
        return $this->job_view;
    }

    /**
     * The desired job attributes returned for jobs in the
     * search response. Defaults to [JobView.JOB_VIEW_FULL][google.cloud.talent.v4beta1.JobView.JOB_VIEW_FULL] if no value is
     * specified.
     *
     * Generated from protobuf field .google.cloud.talent.v4beta1.JobView job_view = 5;
     * @param int $var
     * @return $this
     */
    public function setJobView($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\JobView::class);
        $this->job_view = $var;

        return $this;
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:id="@+id/menu_party_options_refresh_all"
          android:icon="@drawable/refresh_all"
          android:title="@string/menu_party_options_refresh_all" />
     <item android:id="@+id/menu_party_options_read_all"
          android:icon="@drawable/article_read_all"
          android:title="@string/menu_party_options_read_all" />
    <item android:id="@+id/menu_party_options_search"
          android:icon="@drawable/search"
          android:title="@string/menu_party_options_search" />
    <item android:id="@+id/menu_party_options_settings"
          android:icon="@drawable/settings"
          android:title="@string/menu_party_options_settings" />
     <item android:id="@+id/menu_party_options_quit"
          android:icon="@drawable/exit"
          android:title="@string/menu_party_options_quit" />
</menu>


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _remarkable = require('remarkable');

var _remarkable2 = _interopRequireDefault(_remarkable);

var _highlight = require('highlight.js');

var _highlight2 = _interopRequireDefault(_highlight);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var regularMd = new _remarkable2.default();
var codeMd = new _remarkable2.default({
  highlight: function highlight(str) {
    try {
      return _highlight2.default.highlight('javascript', str).value;
    } catch (err) {
      console.log(err);
    }
  }
});

exports.default = {

  render: function render(text) {
    return regularMd.render(text);
  },

  renderCode: function renderCode(text) {
    return codeMd.render(text);
  },

  getArgs: function getArgs(code) {
    var args = {};
    if (code.indexOf('---') > -1) {
      var match = /---([\s\S]*?)---\n([\s\S]*)/.exec(code);
      var argSplit = match[1].trim().split('\n');

      for (var i = 0; i < argSplit.length; i++) {
        var arg = argSplit[i];
        var regex = /(.+?): (.+)/.exec(arg);
        args[regex[1]] = regex[2];
      }

      code = match[2];
    }

    return args;
  },

  getBody: function getBody(code) {
    if (code.indexOf('---') > -1) {
      var match = /---([\s\S]*?)---\n([\s\S]*)/.exec(code);
      return match[2];
    } else {
      return code;
    }
  },

  isCode: function isCode(text) {
    var array = [];
    var reg = new RegExp(/(```.*\n([\s\S]*?)```)/g);
    var match;
    while ((match = reg.exec(text)) !== null) {
      array.push(match);
    }

    return array;
  },

  isCodeBlock: function isCodeBlock(string) {
    if (string.indexOf('|Code:') > -1) {
      return true;
    } else {
      return false;
    }
  },

  isSubSection: function isSubSection(string) {
    if (string.split('-')[0].indexOf('.') === -1) {
      return true;
    } else {
      return false;
    }
  },

  codeNumber: function codeNumber(string) {
    return (/\|Code:(.+?)\|/.exec(string)[1]
    );
  }

};


text:
<?php

namespace app\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use app\models\DeptDetails;

/**
 * DeptDetailsSearch represents the model behind the search form about `app\models\DeptDetails`.
 */
class DeptDetailsSearch extends DeptDetails
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'dept_id'], 'integer'],
            [['dep_name', 'dep_email', 'dep_phone', 'dep_ext', 'dep_fax', 'dep_hod', 'profile', 'dep_address_line1', 'dep_city', 'dep_pin', 'dep_state', 'dep_year', 'dep_hod_photo', 'dep_logo', 'dep_website', 'dep_bulletin', 'ip', 'timestamp'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = DeptDetails::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        if ($this->load($params) && !$this->validate()) {
            return $dataProvider;
        }

        $query->andFilterWhere([
            'id' => $this->id,
            'dept_id' => $this->dept_id,
            'timestamp' => $this->timestamp,
        ]);

        $query->andFilterWhere(['like', 'dep_name', $this->dep_name])
            ->andFilterWhere(['like', 'dep_email', $this->dep_email])
            ->andFilterWhere(['like', 'dep_phone', $this->dep_phone])
            ->andFilterWhere(['like', 'dep_ext', $this->dep_ext])
            ->andFilterWhere(['like', 'dep_fax', $this->dep_fax])
            ->andFilterWhere(['like', 'dep_hod', $this->dep_hod])
            ->andFilterWhere(['like', 'profile', $this->profile])
            ->andFilterWhere(['like', 'dep_address_line1', $this->dep_address_line1])
            ->andFilterWhere(['like', 'dep_city', $this->dep_city])
            ->andFilterWhere(['like', 'dep_pin', $this->dep_pin])
            ->andFilterWhere(['like', 'dep_state', $this->dep_state])
            ->andFilterWhere(['like', 'dep_year', $this->dep_year])
            ->andFilterWhere(['like', 'dep_hod_photo', $this->dep_hod_photo])
            ->andFilterWhere(['like', 'dep_logo', $this->dep_logo])
            ->andFilterWhere(['like', 'dep_website', $this->dep_website])
            ->andFilterWhere(['like', 'dep_bulletin', $this->dep_bulletin])
            ->andFilterWhere(['like', 'ip', $this->ip]);

        return $dataProvider;
    }
}


text:
class AddFilePathToDatasources < ActiveRecord::Migration
  def change
    add_column :datasources, :logfile_path, :text
  end
end


text:
using Caliburn.Micro;
using Moq;
using NUnit.Framework;
using Workbench.Services;
using Workbench.ViewModels;

namespace Workbench.UI.Tests.Unit.ViewModels
{
    /// <summary>
    /// Fixture to test using a workspace view model created from
    /// an existing workspace model.
    /// </summary>
    [TestFixture]
    public class WorkspaceViewModelCreatedFromModelTests
    {
        private Mock<IDataService> _dataServiceMock;
        private Mock<IWindowManager> _windowManagerMock;
        private Mock<IEventAggregator> _eventAggregatorMock;
        private Mock<IViewModelFactory> _viewModelFactoryMock;

        /// <summary>
        /// Gets the subject of the test.
        /// </summary>
        public WorkspaceViewModel Subject { get; private set; }

        [SetUp]
        public void Initialize()
        {
            _dataServiceMock = CreateDataServiceMock();
            _windowManagerMock = new Mock<IWindowManager>();
            _eventAggregatorMock = CreateEventAggregatorMock();
            _viewModelFactoryMock = CreateViewModelFactoryMock();
            Subject = CreateSut();
            ScreenExtensions.TryActivate(Subject);
        }

        [Test]
        public void SolveModelWithValidModelDisplaysSolutionTab()
        {
            Subject.SolveModel();
            Assert.That(Subject.ActiveItem, Is.InstanceOf<SolutionViewerTabViewModel>());
        }

        [Test]
        public void SolveModelWithValidModelBindsLabels()
        {
            Subject.SolveModel();
            var solutionViewerTab = Subject.ActiveItem as SolutionViewerTabViewModel;
            Assert.That(solutionViewerTab.Viewer.Labels, Is.Not.Empty);
        }

        private WorkspaceViewModel CreateSut()
        {
            return new WorkspaceViewModel(_dataServiceMock.Object,
                                          _windowManagerMock.Object,
                                          _eventAggregatorMock.Object,
                                          _viewModelFactoryMock.Object,
                                          new ModelValidatorViewModel(_windowManagerMock.Object, _dataServiceMock.Object));
        }

        private Mock<IEventAggregator> CreateEventAggregatorMock()
        {
            return new Mock<IEventAggregator>();
        }

        private Mock<IDataService> CreateDataServiceMock()
        {
            var mock = new Mock<IDataService>();
            mock.Setup(_ => _.GetWorkspace()).Returns(WorkspaceModelFactory.Create);
            return mock;
        }

        private Mock<IViewModelFactory> CreateViewModelFactoryMock()
        {
            return new Mock<IViewModelFactory>();
        }
    }
}


text:
'use strict';
var util = require('util');
var yeoman = require('yeoman-generator');
var path = require('path');
var angularOneUtils = require('../utils.js');
var chalk = require('chalk');
var _ = require('underscore');
var fs = require('fs');

_.str = require('underscore.string');
_.mixin(_.str.exports());

var DirectiveGenerator = module.exports = function DirectiveGenerator(args, options, config) {

    angularOneUtils.getNameArg(this,args);

    yeoman.generators.Base.apply(this, arguments);

};

util.inherits(DirectiveGenerator, yeoman.generators.Base);

DirectiveGenerator.prototype.askFor = function askFor() {
    var cb = this.async();

    var prompts = [{
        type:'confirm',
        name: 'needpartial',
        message: 'Create html view for this directive (e.g: feature.html)?',
        default: true
    }];

    angularOneUtils.addNamePrompt(this,prompts,'directive');

    this.prompt(prompts, function (props) {
        if (props.name){
            this.name = props.name;
        }
        this.needpartial = props.needpartial;
        angularOneUtils.askForModuleAndDir('directive',this,this.needpartial,cb);
    }.bind(this));

};

DirectiveGenerator.prototype.files = function files() {

    var configName = 'directiveSimpleTemplates';
    var defaultDir = 'templates/simple';
    if (this.needpartial) {
        configName = 'directiveComplexTemplates';
        defaultDir = 'templates/complex';
    }

    this.htmlPath = path.join(this.dir,this.name + '.html').replace(/\\/g,'/');;

    angularOneUtils.processTemplates(this.name,this.dir,'directive',this,defaultDir,configName,this.module);

};


text:
import django_logutils

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

version = django_logutils.__version__

readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

setup(
    name='django-logutils',
    version=version,
    description="""Various logging-related utilities for Django projects.""",
    long_description=readme + '\n\n' + history,
    author='Sander Smits',
    author_email='jhmsmits@gmail.com',
    url='https://github.com/jsmits/django-logutils',
    packages=[
        'django_logutils',
    ],
    include_package_data=True,
    install_requires=[
        'django',
        'django-appconf'
    ],
    license="BSD",
    zip_safe=False,
    keywords='django-logutils',
    classifiers=[
        'Development Status :: 4 - Beta',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
)


text:
require 'spec_helper'
require 'scorm2004/sequencing/evaluate_rollup_conditions_subprocess'

describe Scorm2004::Sequencing::EvaluateRollupConditionsSubprocess do
  shared_context 'rollup rule' do |combi, conds|
    let(:proc) do
      rule = double('rollup rule')
      rule.stub(:condition_combination).and_return(combi)
      conditions = conds.map do |cond|
        c = double
        c.stub(:evaluate).and_return(cond)
        c
      end
      rule.stub(:conditions).and_return(conditions)
      described_class.new(rule)
    end
  end

  shared_examples 'process' do |expect, combi, conds|
    context "using conditions that result in #{conds} and #{combi} Condition Combination" do
      include_context 'rollup rule', combi, conds
      it "returns #{expect}" do
        proc.call(:dummy_activity).should == expect
    end

    end
  end

  [ [nil, 'All', []],
    [nil, 'Any', []],
    [true, 'All', [true, true, true]],
    [true, 'Any', [false, true, false]],
    [false, 'All', [true, true, false]],
    [false, 'Any', [false, false, false]]
  ].each do |*args|
    it_behaves_like 'process', *args
  end
end


text:
package folder;

import java.util.Arrays;

/**
 * Trida pro skladani a porovnavani vysledku obj souboru
 * @author Jakub Vašta
 */
public class NotDrivenComposition extends Thread {

    /** Pole porovnavanych souboru */
    private final String[] files;
    /** Umisteni souboru */
    private final String dir;
    /** Pocet opakovani pri skladani dvou souboru */
    private final int treshold;

    /**
     * Konstruktor
     * @param files soubory ktere chceme slozit
     * @param dir umisteni souboru
     * @param treshold pocet opakovani pri skladani dvou souboru
     */
    public NotDrivenComposition(String[] files, String dir, int treshold) {
    	super();

        this.files = files;
        this.dir = dir;
        this.treshold = treshold;
    }

    /**
     * Metoda skladajici soubory obj
     */
	@Override
	public void run() {

		no_guide_fold();
	}

        private void no_guide_fold() {

            boolean first = true;
            int cont = this.files.length;
            int compose = 0;
            Container temp, r = null;

            while (cont > 1) {

                System.out.println(Arrays.toString(this.files));
                int g_max = Integer.MIN_VALUE;

                // Poprve zkousime vsechny se vsemi
                if (first) {

                    for (int i = 0; i < this.files.length - 1; i++) {
                        for (int j = i + 1; j < this.files.length; j++) {

                            temp = Composition.fold(this.files[i], this.files[j], i, j, this.treshold, this.dir);
                            // Zapamatujeme si nelepsi vysledek
                            if (temp != null && temp.points > g_max) {
                                r = temp;
                                compose = temp.first;
                            }
                        }
                    }
                    first = false;
                } // Pokud prochazime podruhe, tak zkousime pouze ostatni s poslednim slozenym
                else {

                    for (int i = 0; i < this.files.length; i++) {
                        if (i != compose && this.files[i] != null) {
                            temp = Composition.fold(this.files[compose], this.files[i], compose, i, this.treshold, this.dir);

                            // Zapamatujeme si nelepsi vysledek
                            if (temp != null && temp.points > g_max) {
                                r = temp;
                                compose = temp.first;
                            }
                        }
                    }
                }

                System.out.println("We will combine:" + this.files[r.first] + " + " + this.files[r.second]);

                // Slozeni nejlepsich kandidatu
                String result_name = ComposeUtility.composeFiles(r.file, this.files[r.first], null, dir);

                // Slozeny soubor nahradi prvni ze skladanych souboru a druhy vymazeme
                this.files[r.first] = result_name;
                this.files[r.second] = null;

                // Snizime pocet souboru, ktere zbyvaji ke slozeni
                cont--;

            }
        }

}


text:
@interface AFBaseViewController ()

@property (nonatomic)BOOL isFirstTimeWillAppeared;
@property (nonatomic)BOOL isFirstTimeDidAppeared;

@end

@implementation AFBaseViewController

#pragma mark - Life Cycle

- (void)viewDidLoad {
    [super viewDidLoad];

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(viewUpdateNotifiactionComing:)
                                                 name:UPDATE_VC_NOTI_NAME([self class])
                                               object:nil];

    self.isFirstTimeWillAppeared = YES;
    self.isFirstTimeDidAppeared = YES;
    self.edgesForExtendedLayout = UIRectEdgeNone;
    self.view.backgroundColor =[UIColor whiteColor];

    if(![self isRootViewController]){
        __weak __typeof(self) weakSelf = self;
        UIImage *back = AF_BUNDLE_IMAGE(@"navi-back");
        UIBarButtonItem *backItem = [[UIBarButtonItem alloc] bk_initWithImage:back style:UIBarButtonItemStylePlain handler:^(id sender) {
            [weakSelf popViewController];
        }];
        [self setLeftBarButtonItem:backItem];
    }
}

-(void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    KEYBOARD_WILL_SHOW(self, @selector(keyboardWillShow:));
    KEYBOARD_WILL_HIDE(self, @selector(keyboardWillHide:));
    KEYBOARD_DID_SHOW(self, @selector(keyboardDidShow:));
    KEYBOARD_DID_HIDE(self, @selector(keyboardDidHide:));

    if(self.isFirstTimeDidAppeared){
        if([self respondsToSelector:@selector(viewDidAppearAtFirstTime)])
            [self viewDidAppearAtFirstTime];
    }else{
        if([self respondsToSelector:@selector(viewDidAppearForNotFirstTime)])
            [self viewDidAppearForNotFirstTime];
    }
    self.isFirstTimeDidAppeared = NO;
}

-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    __weak __typeof(self) weakSelf = self;

    if(self.isFirstTimeWillAppeared){
        if([self respondsToSelector:@selector(viewWillAppearAtFirstTime)])
            [self viewWillAppearAtFirstTime];

        [RACObserve(self, keyboardHeight) subscribeNext:^(id x) {
            if([weakSelf respondsToSelector:@selector(viewKeyboardHeightDidChanged:)])
                [weakSelf viewKeyboardHeightDidChanged:weakSelf.keyboardHeight];
        }];
    }else{
        if([self respondsToSelector:@selector(viewWillAppearForNotFirstTime)])
            [self viewWillAppearForNotFirstTime];
    }

    self.isFirstTimeWillAppeared = NO;
    [self.navigationController setNavigationBarHidden:self.isFullScreenViewController animated:YES];
}

- (void) viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [self.view endEditing:YES];

     AFBaseViewController *lastVC = [self.navigationController.viewControllers lastObject];
    if([lastVC respondsToSelector:@selector(isFullScreenViewController)]){
        [self.navigationController setNavigationBarHidden:lastVC.isFullScreenViewController animated:YES];
    }

    KEYBOARD_REMOVE_OBSERVER(self);
}

- (void) viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];

    if( !self.navigationController ){
        if([self respondsToSelector:@selector(viewDidPoped)]){
            [self viewDidPoped];
        }
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

-(void)dealloc{
    NOTIFICATION_REMOVE_SELF_OBSERVER;
    DLog(@"%@",self);
}

-(UIStatusBarStyle)preferredStatusBarStyle
{
    if(self.navigationController.barStyle == NavigationBarStyleLight){
        return UIStatusBarStyleDefault;
    }

    return UIStatusBarStyleLightContent;
}
#pragma mark - Notification

-(void)viewUpdateNotifiactionComing:(NSNotification *)noti
{
    NSString *notiName = noti.name;
    NSString *className = [notiName stringByReplacingOccurrencesOfString:updateNotiPrefix withString:@""];

    if([NSStringFromClass([self class]) isEqualToString:className]){
        if([self respondsToSelector:@selector(viewIsNotifiedToReloadData:)]){
            [self viewIsNotifiedToReloadData:noti.object];
        }
    }
}

#pragma mark - Action & Response

- (void)keyboardWillShow:(NSNotification*)notification
{
    if([self respondsToSelector:@selector(viewKeyboardWillShow)])
        [self viewKeyboardWillShow];

    @weakify(self);
    KEYBOARD_ANIMATING([notification userInfo],^(CGRect keyboardFrame) {
        @strongify(self);
        CGRect kbFrame = [self.view convertRect:keyboardFrame toView:nil];
        self.keyboardHeight = kbFrame.size.height ;
    })
}

- (void)keyboardWillHide:(NSNotification*)notification
{
    if([self respondsToSelector:@selector(viewKeyboardWillHide)])
        [self viewKeyboardWillHide];

    @weakify(self);
    KEYBOARD_ANIMATING([notification userInfo],^(CGRect keyboardFrame) {
        @strongify(self);
        self.keyboardHeight = 0;
    })
}

- (void)keyboardDidShow:(NSNotification*)notification
{
    if([self respondsToSelector:@selector(viewKeyboardDidShow)])
        [self viewKeyboardDidShow];
}

- (void)keyboardDidHide:(NSNotification*)notification
{
    if([self respondsToSelector:@selector(viewKeyboardDidHide)])
        [self viewKeyboardDidHide];
}

#pragma mark - Public Methods

-(void)pushViewController:(id)viewController
{
    [self pushViewController:viewController withAnimated:YES];
}

-(void)pushViewController:(UIViewController *)viewController withAnimated:(BOOL)animated
{
    viewController.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:viewController animated:animated];

    BOOL isRootVC = [self isRootViewController];
    if(isRootVC){
        self.hidesBottomBarWhenPushed = NO;

        if(self.tabBarController){
            // Hack : http://www.jianshu.com/p/48e4e65aaf06
            // Try to fix iPhoneX tabbar jumps when push. Maybe one day we don't need these dirty code.
            CGRect tabFrame = self.tabBarController.tabBar.frame;
            tabFrame.origin.y = SCREEN_HEIGHT - tabFrame.size.height;
            self.tabBarController.tabBar.frame = tabFrame;
        }
    }
}

-(void)popViewController
{
    [self popViewControllerWithAnimation:YES];
}

-(void)popViewControllerWithAnimation:(BOOL)animated
{
    NOTIFICATION_REMOVE_SELF_OBSERVER;

    if([self.navigationController viewControllersCount]==2){ // ready to pop to root
        [self.navigationController rootViewController].hidesBottomBarWhenPushed = NO;
    }

    [self.navigationController popViewControllerAnimated:animated];
}

-(void)popToViewController:(UIViewController *)vc
{
    [self popToViewController:vc animated:YES];
}

-(void)popToViewController:(UIViewController *)vc animated:(BOOL)animated
{
    if(![self.navigationController isContainVC:vc] || self == vc)
        return;

    NSInteger vcCount = [self.navigationController viewControllersCount];
    for(NSInteger i = vcCount-1;  i>=0 ; i--){
        id eachVC = [self.navigationController viewControllers][i];
        if(eachVC == vc){
            break;
        }
        NOTIFICATION_REMOVE_OBSERVER(eachVC);
    }

    UIViewController *rootVC = [self.navigationController rootViewController];
    if(vc == rootVC){
        rootVC.hidesBottomBarWhenPushed = NO;
    }

    [self.navigationController popToViewController:vc animated:animated];
}

-(void)popToRootViewController
{
    [self popToRootViewControllerWithAnimated:YES];
}

-(void)popToRootViewControllerWithAnimated:(BOOL)animated
{
    if([self.navigationController viewControllersCount]==0)
        return;

    UIViewController *rootVC = [self.navigationController rootViewController];
    rootVC.hidesBottomBarWhenPushed = NO;
    for(UIViewController *vc in self.navigationController.viewControllers){
        vc.hidesBottomBarWhenPushed = NO;
        if(vc!=rootVC){
            NOTIFICATION_REMOVE_OBSERVER(vc);
        }
    }

    [self.navigationController popToRootViewControllerAnimated:animated];
}

#pragma mark -

- (void)addCancelButtonWithBlock:(void (^)(void))block
{
    UIImage *back = AF_BUNDLE_IMAGE(@"navi-cross");
    UIBarButtonItem *backItem = [[UIBarButtonItem alloc] bk_initWithImage:back style:UIBarButtonItemStylePlain handler:^(id sender) {
        if(block) block();
    }];
    [self setLeftBarButtonItem:backItem];
}

@end


text:
import cudarray as ca
from ..base import ParamMixin, PickleMixin
from ..parameter import Parameter

class Layer(PickleMixin):
    bprop_to_x = True

    def setup(self, x_shape):
        """ Setup layer with parameters that are unknown at __init__(). """
        pass

    def fprop(self, x):
        """ Calculate layer output for given input (forward propagation). """
        raise NotImplementedError()

    def bprop(self, y_grad):
        """ Calculate input gradient. """
        raise NotImplementedError()

    def y_shape(self, x_shape):
        """ Calculate shape of this layer's output.
        x_shape[0] is the number of samples in the input.
        x_shape[1:] is the shape of the feature.
        """
        raise NotImplementedError()

class Affine(Layer, ParamMixin):
    def __init__(self, n_out, weights, bias=0.0):
        self.n_out = n_out
        self.weights = Parameter.from_any(weights)
        self.bias = Parameter.from_any(bias)
        self._tmp_x = None

    def setup(self, x_shape):
        self.weights.setup((x_shape[1], self.n_out))
        self.bias.setup(self.n_out)

    def fprop(self, x):
        self._tmp_x = x
        return ca.dot(x, self.weights.array) + self.bias.array

    def bprop(self, y_grad):
        ca.dot(self._tmp_x.T, y_grad, out=self.weights.grad_array)
        ca.sum(y_grad, axis=0, out=self.bias.grad_array)
        if self.bprop_to_x:
            return ca.dot(y_grad, self.weights.array.T)

    @property
    def params(self):
        return self.weights, self.bias

    @params.setter
    def params(self, params):
        self.weights, self.bias = params

    def y_shape(self, x_shape):
        return (x_shape[0], self.n_out)


text:
.class public Landroid/support/v4/widget/ScrollerCompat;
.super Ljava/lang/Object;
.source "ScrollerCompat.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImplIcs;,
        Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImplGingerbread;,
        Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImplBase;,
        Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;
    }
.end annotation

# static fields
.field static final IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

# instance fields
.field mScroller:Ljava/lang/Object;

# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    .line 240
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    .line 241
    .local v0, version:I
    const/16 v1, 0xe

    if-lt v0, v1, :cond_0

    .line 242
    new-instance v1, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImplIcs;

    invoke-direct {v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImplIcs;-><init>()V

    sput-object v1, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    .line 248
    :goto_0
    return-void

    .line 243
    :cond_0
    const/16 v1, 0x9

    if-lt v0, v1, :cond_1

    .line 244
    new-instance v1, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImplGingerbread;

    invoke-direct {v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImplGingerbread;-><init>()V

    sput-object v1, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    goto :goto_0

    .line 246
    :cond_1
    new-instance v1, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImplBase;

    invoke-direct {v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImplBase;-><init>()V

    sput-object v1, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    goto :goto_0
.end method

.method constructor <init>(Landroid/content/Context;Landroid/view/animation/Interpolator;)V
    .locals 1
    .parameter "context"
    .parameter "interpolator"

    .prologue
    .line 258
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 259
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    invoke-interface {v0, p1, p2}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->createScroller(Landroid/content/Context;Landroid/view/animation/Interpolator;)Ljava/lang/Object;

    move-result-object v0

    iput-object v0, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    .line 260
    return-void
.end method

.method public static create(Landroid/content/Context;)Landroid/support/v4/widget/ScrollerCompat;
    .locals 1
    .parameter "context"

    .prologue
    .line 251
    const/4 v0, 0x0

    invoke-static {p0, v0}, Landroid/support/v4/widget/ScrollerCompat;->create(Landroid/content/Context;Landroid/view/animation/Interpolator;)Landroid/support/v4/widget/ScrollerCompat;

    move-result-object v0

    return-object v0
.end method

.method public static create(Landroid/content/Context;Landroid/view/animation/Interpolator;)Landroid/support/v4/widget/ScrollerCompat;
    .locals 1
    .parameter "context"
    .parameter "interpolator"

    .prologue
    .line 255
    new-instance v0, Landroid/support/v4/widget/ScrollerCompat;

    invoke-direct {v0, p0, p1}, Landroid/support/v4/widget/ScrollerCompat;-><init>(Landroid/content/Context;Landroid/view/animation/Interpolator;)V

    return-object v0
.end method

# virtual methods
.method public abortAnimation()V
    .locals 2

    .prologue
    .line 419
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->abortAnimation(Ljava/lang/Object;)V

    .line 420
    return-void
.end method

.method public computeScrollOffset()Z
    .locals 2

    .prologue
    .line 323
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->computeScrollOffset(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public fling(IIIIIIII)V
    .locals 10
    .parameter "startX"
    .parameter "startY"
    .parameter "velocityX"
    .parameter "velocityY"
    .parameter "minX"
    .parameter "maxX"
    .parameter "minY"
    .parameter "maxY"

    .prologue
    .line 382
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    move v2, p1

    move v3, p2

    move v4, p3

    move v5, p4

    move v6, p5

    move/from16 v7, p6

    move/from16 v8, p7

    move/from16 v9, p8

    invoke-interface/range {v0 .. v9}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->fling(Ljava/lang/Object;IIIIIIII)V

    .line 383
    return-void
.end method

.method public fling(IIIIIIIIII)V
    .locals 12
    .parameter "startX"
    .parameter "startY"
    .parameter "velocityX"
    .parameter "velocityY"
    .parameter "minX"
    .parameter "maxX"
    .parameter "minY"
    .parameter "maxY"
    .parameter "overX"
    .parameter "overY"

    .prologue
    .line 410
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    move v2, p1

    move v3, p2

    move v4, p3

    move/from16 v5, p4

    move/from16 v6, p5

    move/from16 v7, p6

    move/from16 v8, p7

    move/from16 v9, p8

    move/from16 v10, p9

    move/from16 v11, p10

    invoke-interface/range {v0 .. v11}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->fling(Ljava/lang/Object;IIIIIIIIII)V

    .line 412
    return-void
.end method

.method public getCurrVelocity()F
    .locals 2

    .prologue
    .line 314
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->getCurrVelocity(Ljava/lang/Object;)F

    move-result v0

    return v0
.end method

.method public getCurrX()I
    .locals 2

    .prologue
    .line 277
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->getCurrX(Ljava/lang/Object;)I

    move-result v0

    return v0
.end method

.method public getCurrY()I
    .locals 2

    .prologue
    .line 286
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->getCurrY(Ljava/lang/Object;)I

    move-result v0

    return v0
.end method

.method public getFinalX()I
    .locals 2

    .prologue
    .line 293
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->getFinalX(Ljava/lang/Object;)I

    move-result v0

    return v0
.end method

.method public getFinalY()I
    .locals 2

    .prologue
    .line 300
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->getFinalY(Ljava/lang/Object;)I

    move-result v0

    return v0
.end method

.method public isFinished()Z
    .locals 2

    .prologue
    .line 268
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->isFinished(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public isOverScrolled()Z
    .locals 2

    .prologue
    .line 471
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->isOverScrolled(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public notifyHorizontalEdgeReached(III)V
    .locals 2
    .parameter "startX"
    .parameter "finalX"
    .parameter "overX"

    .prologue
    .line 437
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1, p1, p2, p3}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->notifyHorizontalEdgeReached(Ljava/lang/Object;III)V

    .line 438
    return-void
.end method

.method public notifyVerticalEdgeReached(III)V
    .locals 2
    .parameter "startY"
    .parameter "finalY"
    .parameter "overY"

    .prologue
    .line 454
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    invoke-interface {v0, v1, p1, p2, p3}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->notifyVerticalEdgeReached(Ljava/lang/Object;III)V

    .line 455
    return-void
.end method

.method public startScroll(IIII)V
    .locals 6
    .parameter "startX"
    .parameter "startY"
    .parameter "dx"
    .parameter "dy"

    .prologue
    .line 341
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    move v2, p1

    move v3, p2

    move v4, p3

    move v5, p4

    invoke-interface/range {v0 .. v5}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->startScroll(Ljava/lang/Object;IIII)V

    .line 342
    return-void
.end method

.method public startScroll(IIIII)V
    .locals 7
    .parameter "startX"
    .parameter "startY"
    .parameter "dx"
    .parameter "dy"
    .parameter "duration"

    .prologue
    .line 358
    sget-object v0, Landroid/support/v4/widget/ScrollerCompat;->IMPL:Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;

    iget-object v1, p0, Landroid/support/v4/widget/ScrollerCompat;->mScroller:Ljava/lang/Object;

    move v2, p1

    move v3, p2

    move v4, p3

    move v5, p4

    move v6, p5

    invoke-interface/range {v0 .. v6}, Landroid/support/v4/widget/ScrollerCompat$ScrollerCompatImpl;->startScroll(Ljava/lang/Object;IIIII)V

    .line 359
    return-void
.end method


text:
@class WTCarKeyboardModel;

@protocol WTCarKeyboardModelDelegate <NSObject>

@optional
- (void)orientationDidChangeWithCarKeyboardModel:(WTCarKeyboardModel* )carKeyboardModel landscape:(BOOL)isLandscape;

@end

#define kCarKeyBoardScreenWidth [UIScreen mainScreen].bounds.size.width
#define kCarKeyBoardScreenHeight [UIScreen mainScreen].bounds.size.height

@interface WTCarKeyboardModel : NSObject

@property (nonatomic,weak)id <WTCarKeyboardModelDelegate>delegate;

@property (nonatomic,assign,readonly)UIDeviceOrientation type; //屏幕方向

@property (nonatomic,assign)CGFloat btnHeight; //按钮高度
@property (nonatomic,assign)CGFloat btnWidth; //按钮宽度
@property (nonatomic,assign)CGFloat btnHeightSpace; //按钮上下间隔
@property (nonatomic,assign)CGFloat btnWidthSpace; //按钮左右间隔
@property (nonatomic,assign,readonly)CGRect viewFrame; //背景界面frame
@property (nonatomic,assign,readonly)CGRect superViewFrame;

@end


text:
module Renalware
  module HD
    class PatientListener
      def patient_modality_changed_to_death(args)
        nullify_significant_hd_profile_attributes(args[:patient], by: args[:actor])
      end

      def request_default_electronic_cc_recipients_for_use_in_letters(args)
        array_of_user_ids = args[:array_of_user_ids]
        patient = HD.cast_patient(args[:patient])
        if patient.current_modality_hd?
          named_nurse_id = patient.named_nurse&.id
          array_of_user_ids.push(named_nurse_id) if named_nurse_id.present?
        end
      end

      private

      def nullify_significant_hd_profile_attributes(patient, by:)
        hd_profile = HD.cast_patient(patient).hd_profile
        return if hd_profile.nil?

        hd_profile.hospital_unit = nil
        hd_profile.schedule_definition = nil
        hd_profile.save_by!(by)
      end
    end
  end
end


text:
'use strict';

var _ = require('lodash');

var vbus = require('../..');

var extend = vbus.extend;

var models = {};

var BaseModel = extend(null, {

}, {

    extend: function(protoProps, staticProps) {
        var result = extend(this, protoProps, staticProps);
        result.prototype.constructor = result;
        return result;
    },

});

models.MenuSystemModel = BaseModel.extend({

    languages: null,

    translationGroups: null,

    strings: null,

    types: null,

    values: null,

    constraints: null,

    presets: null,

    masks: null,

    linesTemplates: null,

    menus: null,

    implHeaders: null,

    implInitializers: null,

    constructor: function() {
        BaseModel.apply(this, arguments);

        this.languages = [];
        this.translationGroups = [];
        this.strings = [];
        this.types = [];
        this.values = [];
        this.constraints = [];
        this.presets = [];
        this.masks = [];
        this.linesTemplates = [];
        this.menus = [];
        this.implHeaders = [];
        this.implInitializers = [];
    },

});

models.TextModel = BaseModel.extend({

    lang: null,

    text: null,

});

models.LanguageModel = BaseModel.extend({

    id: null,

    texts: null,

    constructor: function() {
        BaseModel.apply(this, arguments);

        this.texts = [];
    },

});

models.TranslationGroupModel = BaseModel.extend({

    from: null,

    to: null,

    translations: null,

    constructor: function() {
        BaseModel.apply(this, arguments);

        this.translations = [];
    },

});

models.TranslationModel = BaseModel.extend({

    texts: null,

    constructor: function() {
        BaseModel.apply(this, arguments);

        this.texts = [];
    },

});

models.StringModel = BaseModel.extend({

    id: null,

    texts: null,

    constructor: function() {
        BaseModel.apply(this, arguments);

        this.texts = [];
    },

});

models.TypeValueModel = BaseModel.extend({

    id: null,

    value: null,

});

models.TypeQuantValueModel = models.TypeValueModel.extend({

    step: 0,

    roundtrip: false,

});

models.TypeValueTextModel = BaseModel.extend({

    value: null,

    texts: null,

    constructor: function() {
        BaseModel.apply(this, arguments);

        this.texts = [];
    },

});

models.TypeModel = BaseModel.extend({

    id: null,

    base: null,

    isBuiltIn: false,

    size: 0,

    externalDescriptorFunc: false,

    externalDisplayFunc: false,

    bitSize: 0,

    roundtrip: false,

    storeFactors: null,

    displayFactors: null,

    minimums: null,

    maximums: null,

    defaults: null,

    quants: null,

    valueTexts: null,

    unit: null,

    selectorValueRef: null,

    instance: null,

    constructor: function() {
        BaseModel.apply(this, arguments);

        this.storeFactors = [];
        this.displayFactors = [];
        this.minimums = [];
        this.maximums = [];
        this.defaults = [];
        this.quants = [];
        this.valueTexts = [];
    },

});

models.ValueModel = BaseModel.extend({

    id: null,

    idHash: 0,

    index: 0,

    storage: null,

    type: null,

    priority: 0,

    structValueRef: null,

    forceUse: false,

    compoundValueRef: null,

    valueTexts: null,

    externalDescriptorFunc: false,

    enableValueRef: null,

    constructor: function() {
        BaseModel.apply(this, arguments);

        this.type = new models.TypeModel();
        this.valueTexts = [];
    },

});

models.ConstraintModel = BaseModel.extend({

    condition: null,

});

models.MaskModel = BaseModel.extend({

    id: null,

    visible: null,

    handler: null,

    decoration: null,

    level: null,

    indent: null,

});

models.LineModel = BaseModel.extend({

    id: null,

    texts: null,

    textRef: null,

    lineRef: null,

    extraRef: null,

    mask: null,

    maskVal: null,

    constructor: function() {
        BaseModel.apply(this, arguments);

        this.texts = [];
    },

});

models.MenuModel = BaseModel.extend({

    id: null,

    type: null,

    lines: null,

    isBuiltIn: false,

    constructor: function() {
        BaseModel.apply(this, arguments);

        this.lines = [];
    },

});

_.forEach(models, function(Model, modelName) {
    Model.modelName = modelName;
    Model.prototype.modelName = modelName;
});

module.exports = models;


text:
namespace petuum {

template<typename V>
class NSCountImplCalc : public NSAbstractImpCalc<V> {
public:
  NSCountImplCalc() { }
  virtual ~NSCountImplCalc() { }

  virtual double ApplyIncGetImportance(
      AbstractStore<V> *store,
      int32_t column_id, const void *update);

  virtual double ApplyBatchIncGetImportance(
      AbstractStore<V> *store, const int32_t *column_ids,
      const void* update_batch, int32_t num_updates);

  virtual double ApplyDenseBatchIncGetImportance(
      AbstractStore<V> *store,
      const void* update_batch, int32_t index_st, int32_t num_updates);

  virtual double GetImportance(
      int32_t column_id, const void *update, const void *value) const;

  virtual double GetImportance(
      int32_t column_id, const void *update) const;

  virtual double GetAccumImportance(
      const int32_t *column_ids,
      const void *update_batch, int32_t num_updates) const;

  virtual double GetDenseAccumImportance(
      const AbstractStore<V> *store,
      const void *update_batch, int32_t index_st,
      int32_t num_updates) const;
};

template<typename V>
double NSCountImplCalc<V>::ApplyIncGetImportance(
    AbstractStore<V> *store,
    int32_t column_id, const void *update) {

  V type_update = *(reinterpret_cast<const V*>(update));
  //V val = store->Get(column_id);

  store->Inc(column_id, type_update);
  return 1;
}

template<typename V>
double NSCountImplCalc<V>::ApplyBatchIncGetImportance(
    AbstractStore<V> *store, const int32_t *column_ids,
    const void* update_batch, int32_t num_updates) {

  const V *update_array = reinterpret_cast<const V*>(update_batch);
  for (int i = 0; i < num_updates; ++i) {
    //V val = store->Get(column_ids[i]);
    store->Inc(column_ids[i], update_array[i]);
  }
  return 1;
}

template<typename V>
double NSCountImplCalc<V>::ApplyDenseBatchIncGetImportance(
    AbstractStore<V> *store,
    const void* update_batch, int32_t index_st, int32_t num_updates) {

  V *val_array = store->GetPtr(index_st);
  const V *update_array = reinterpret_cast<const V*>(update_batch);

  for (int32_t i = 0; i < num_updates; ++i) {
    V &val = val_array[i];
    val += update_array[i];
  }

  return 1;
}

template<typename V>
double NSCountImplCalc<V>::GetImportance(
    int32_t column_id, const void *update, const void *value) const {
  return 1;
}

template<typename V>
double NSCountImplCalc<V>::GetImportance(
    int32_t column_id, const void *update) const {
  return 1;
}

template<typename V>
double NSCountImplCalc<V>::GetAccumImportance(
    const int32_t *column_ids,
    const void *update_batch, int32_t num_updates) const {
  return 1;
}

template<typename V>
double NSCountImplCalc<V>::GetDenseAccumImportance(
      const AbstractStore<V> *store,
      const void *update_batch, int32_t index_st,
      int32_t num_updates) const {
  return 1;
}

}


text:
module Fastlane
  module Actions
    module SharedValues
    end

    class AddJiraAttachmentAction < Action
      def self.run(params)
        UI.important('Adding JIRA attachment')

        # Call endpoint
        response = create_issue(
            params[:server_url],
            params[:api_token],
            params[:issue_key],
            {cert: params[:certificate], pass: params[:certificate_pass]},
            params[:file]
        )

        # Consume endpoint result
        case response[:status]
          when 403
            UI.user_error!("Attachments are disabled or you don't have permission to add attachments to this issue")
          when 404
            UI.user_error!('Issue not found, the user does not have permission to view it, or the attachments exceeds the maximum configured attachment size')
          when 200
            UI.success("Successfully attached to JIRA issue #{params[:issue_key]}")
          else
            if response[:status] != 200
              UI.user_error!("JIRA responded with #{response[:status]}:#{response[:body]}")
            end
        end

        response
      end

      def self.call_endpoint(url, method, headers, certificate, file)
        require 'http'

        case method
          when 'post'
            if !certificate[:cert].nil? && !certificate[:pass].nil?

              # Build command
              command = "curl --cert #{certificate[:cert]}:#{certificate[:pass]} -X POST"
              headers.each_pair do |key, value|
                command.concat(" -H '#{key}: #{value}'")
              end
              command.concat(" -sw '%{http_code}' #{url} -F 'file=@#{file}'")

              response = sh(command)

              # Parse HTTP status code manually :(
              code = response[response.length - 3, 3]
              body = response[0, response.length - 3]
              response = {status: Integer(code), body: body}
            else
              response = HTTP.headers(headers).post(url, :form => {
                  :file   => HTTP::FormData::File.new(file)
              })
            end
          else
            response = nil
            UI.user_error!("Unsupported method #{method}")
        end

        response
      end

      def self.create_issue(server_url, api_token, issue_key, certificate, file)
        # POST /rest/api/2/issue/:key/attachment
        url = "#{server_url}/rest/api/2/issue/#{issue_key}/attachments"
        call_endpoint(url, 'post', headers(api_token), certificate, file)
      end

      def self.headers(api_token)
        require 'base64'
        headers = {'Content-Type' => 'multipart/form-data'}
        headers['X-Atlassian-Token'] = 'nocheck'
        headers['Authorization'] = "Basic #{Base64.strict_encode64(api_token)}"
        headers
      end

      #####################################################
      # @!group Documentation
      #####################################################

      def self.description
        'Attaches a file to the given JIRA issue'
      end

      def self.details
        [
            'Attaches a file to the given JIRA issue',
            '',
            'You must provide a username & password in the format `username:password`, the server url, the issue key, and a file'
        ].join("\n")
      end

      def self.available_options
        [
            FastlaneCore::ConfigItem.new(key: :server_url,
                                         env_name: 'FL_ADD_JIRA_ATTACHMENTSERVER_URL',
                                         description: "The Jira server url. e.g. 'https://jira.intranet.company'",
                                         optional: false,
                                         verify_block: proc do |value|
                                           UI.user_error!('Please include the protocol in the server url, e.g. https://www.jira.intranet.company') unless value.include? "//"
                                         end),
            FastlaneCore::ConfigItem.new(key: :api_token,
                                         env_name: 'FL_ADD_JIRA_ATTACHMENT_API_TOKEN',
                                         description: "Username and password in the format 'username:token'",
                                         sensitive: true,
                                         default_value: ENV['JIRA_PRIVATE_TOKEN'],
                                         optional: false,
                                         verify_block: proc do |value|
                                           UI.user_error!("No username and password, pass using `api_token: 'STRING'`") unless (value and not value.empty?)
                                         end),
            FastlaneCore::ConfigItem.new(key: :issue_key,
                                         env_name: 'FL_ADD_JIRA_ATTACHMENT_ISSUE_KEY',
                                         description: 'Issue key which can be retrieved from api',
                                         optional: false,
                                         verify_block: proc do |value|
                                           UI.user_error!("No issue key, pass using `issue_key: 'STRING'`") unless (value and not value.empty?)
                                         end),
            FastlaneCore::ConfigItem.new(key: :file,
                                         env_name: 'FL_ADD_JIRA_ATTACHMENT_FILE',
                                         description: 'File to attach to ticket',
                                         is_string: true,
                                         optional: false),
            FastlaneCore::ConfigItem.new(key: :certificate,
                                         env_name: 'FL_ADD_JIRA_ATTACHMENT_CERTIFICATE',
                                         description: 'Absolute URI to certificate',
                                         default_value: nil,
                                         is_string: true,
                                         optional: true),
            FastlaneCore::ConfigItem.new(key: :certificate_pass,
                                         env_name: 'FL_ADD_JIRA_ATTACHMENT_CERTIFICATE_PASS',
                                         description: 'Password to certificate',
                                         default_value: nil,
                                         is_string: true,
                                         optional: true)
        ]
      end

      def self.authors
        ['JoshuaJamesOng']
      end

      def self.is_supported?(platform)
        true
      end

      def self.example_code
        [
            'add_jira_attachment(
              server_url: "https://jira.intranet.company",
              api_token: "username:password",
              issue_key: "DEV-1000",
              file: "path/to/upload.txt",
              certificate: "/Users/me/mycert.p12",
              certificate_pass: "12345678"
            )'
        ]
      end

      def self.category
        :misc
      end
    end
  end
end


text:
const textWidth = require('text-width');

const baseShapes = require('./baseShapes.js');
const sbgnData = require('../util/sbgn');

const auxiliaryItems = {

  multiImgCloneMarker (x, y, width, height) {

    const cloneStyle = new Map()
    .set('stroke', '#6A6A6A')
    .set('stroke-width', '1')
    .set('fill', '#D2D2D2');

    return baseShapes.rectangle(x, y, width, height, cloneStyle);
  },

  multiImgUnitOfInformation (x, y, width, height, uInfo, borderWidth=3, fontSize=14) {
    const text = uInfo.label.text;
    const uinfoRectStyle = new Map()
    .set('stroke', '#555555')
    .set('stroke-width', `${borderWidth}`)
    .set('fill', 'white')
    .set('fill-opacity', 1);

    const textStyle = new Map()
    .set('alignment-baseline', 'middle')
    .set('font-size', `${fontSize}px`)
    .set('font-family', 'Helvetica Neue, Helvetica, sans-serif')
    .set('text-anchor', 'middle');

    const uInfoWidth = textWidth(text, { family: textStyle.get('font-family'), size: fontSize}) + 5;

    const unitOfInformationSvg =
    `
      ${baseShapes.roundRectangle(x, y, uInfoWidth, height, uinfoRectStyle)}
      ${baseShapes.text(text, x + (uInfoWidth / 2), y + ( height / 2),  textStyle)}
    `;

    return unitOfInformationSvg;
  },

  multiImgStateVar (x, y, width, height, stateVar, borderWidth=3, fontSize=14) {

    const stateVarStyle = new Map()
    .set('stroke', '#555555')
    .set('stroke-width', `${borderWidth}`)
    .set('fill', 'white')
    .set('fill-opacity', 1);

    const textStyle = new Map()
    .set('alignment-baseline', 'middle')
    .set('font-size', `${fontSize}px`)
    .set('font-family', 'Helvetica Neue, Helvetica, sans-serif')
    .set('text-anchor', 'middle');

    const tw = textWidth(sbgnData.stateVarLabel(stateVar), { family: textStyle.get('font-family'), size: fontSize}) + 10;
    const w = Math.max(tw, 30);
    const statevariableSvg =
    `
      ${baseShapes.stadium(x, y, w, height, stateVarStyle)}
      ${baseShapes.text(sbgnData.stateVarLabel(stateVar), x + ( w / 2 ), y + height / 2, textStyle)}
    `;

    return statevariableSvg;
  },

  cloneMarker (nodeWidth, nodeHeight, shapeFn, shapeFnArgs) {
    const clipId = 'clonemarker';

    const cloneMarkerStyle = new Map()
    .set('stroke', '#6A6A6A')
    .set('stroke-width', '1.5')
    .set('clip-path', `url(#${clipId})`)
    .set('fill', '#D2D2D2');

    const cloneMarkerSvg =
    `
      ${baseShapes.clipPath(clipId, baseShapes.rectangle,  [0, 3 * nodeHeight / 4, nodeWidth, nodeHeight, new Map()])}
      ${shapeFn(...shapeFnArgs, cloneMarkerStyle)}
    `;

    return cloneMarkerSvg;
  }
};

module.exports = auxiliaryItems;