text:
package com.gdn.venice.persistence;

import java.io.Serializable;
import javax.persistence.*;

import java.sql.Timestamp;
import java.math.BigDecimal;
import java.util.Date;

/**
 * The persistent class for the log_airway_bill_history database table.
 *
 */
@Entity
@Table(name="log_airway_bill_history")
public class LogAirwayBillHistory implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
@GeneratedValue(strategy=GenerationType.TABLE, generator="log_airway_bill_history")
	@TableGenerator(name="log_airway_bill_history", table="openjpaseq", pkColumnName="id", valueColumnName="sequence_value", allocationSize=1)  //flush every 1 insert
	@Column(name="airway_bill_history_id", unique=true, nullable=false)
	private Long airwayBillHistoryId;

	@Column(name="activity_approval_status_id", nullable=false)
	private Long activityApprovalStatusId;

	@Column(length=300)
	private String address;

	@Column(name="airway_bill_pickup_date_time")
	private Timestamp airwayBillPickupDateTime;

	@Column(name="airway_bill_timestamp", nullable=false)
	private Timestamp airwayBillTimestamp;

	@Column(name="awb_number", length=200)
	private String awbNumber;

	@Column(name="awb_status_id", nullable=false)
	private Long awbStatusId;

	@Column(length=100)
	private String consignee;

	@Column(name="contact_person", length=100)
	private String contactPerson;

	@Column(length=1000)
	private String content;

    @Temporal( TemporalType.DATE)
	@Column(name="date_of_return")
	private Date dateOfReturn;

	@Column(name="delivery_order", length=100)
	private String deliveryOrder;

	@Column(name="dest_code", length=100)
	private String destCode;

	@Column(length=100)
	private String destination;

	@Column(name="distribution_cart_id", nullable=false)
	private Long distributionCartId;

	@Column(name="gdn_reference", length=100)
	private String gdnReference;

	@Column(name="gift_wrap_charge", precision=20, scale=2)
	private BigDecimal giftWrapCharge;

	@Column(name="history_timestamp", nullable=false)
	private Timestamp historyTimestamp;

	@Column(name="insurance_charge", precision=20, scale=2)
	private BigDecimal insuranceCharge;

	@Column(name="invoice_approval_status_id", nullable=false)
	private Long invoiceApprovalStatusId;

	@Column(name="logistics_provider_id", nullable=false)
	private Long logisticsProviderId;

	@Column(name="note_return", length=1000)
	private String noteReturn;

	@Column(name="note_undelivered", nullable=false, length=1000)
	private String noteUndelivered;

	@Column(name="order_item_id", nullable=false)
	private Long orderItemId;

	@Column(name="other_charge", precision=20, scale=2)
	private BigDecimal otherCharge;

	@Column(name="package_weight", precision=20, scale=2)
	private BigDecimal packageWeight;

	@Column(length=100)
	private String pieces;

	@Column(name="price_per_kg", precision=20, scale=2)
	private BigDecimal pricePerKg;

    @Temporal( TemporalType.DATE)
	private Date received;

	@Column(length=100)
	private String recipient;

	@Column(length=100)
	private String relation;

	@Column(name="return", length=100)
	private String return_;

	@Column(length=100)
	private String service;

	@Column(length=200)
	private String shipper;

	@Column(length=100)
	private String status;

	@Column(length=100)
	private String tariff;

	@Column(name="total_charge", precision=20, scale=2)
	private BigDecimal totalCharge;

	@Column(name="tracking_number", length=100)
	private String trackingNumber;

	@Column(length=100)
	private String type;

    @Temporal( TemporalType.DATE)
	private Date undelivered;

	@Column(length=100)
	private String zip;

	//bi-directional many-to-one association to VenMasterChangeType
    @ManyToOne
	@JoinColumn(name="master_change_id", nullable=false)
	private VenMasterChangeType venMasterChangeType;

    public LogAirwayBillHistory() {
    }

	public Long getAirwayBillHistoryId() {
		return this.airwayBillHistoryId;
	}

	public void setAirwayBillHistoryId(Long airwayBillHistoryId) {
		this.airwayBillHistoryId = airwayBillHistoryId;
	}

	public Long getActivityApprovalStatusId() {
		return this.activityApprovalStatusId;
	}

	public void setActivityApprovalStatusId(Long activityApprovalStatusId) {
		this.activityApprovalStatusId = activityApprovalStatusId;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Timestamp getAirwayBillPickupDateTime() {
		return this.airwayBillPickupDateTime;
	}

	public void setAirwayBillPickupDateTime(Timestamp airwayBillPickupDateTime) {
		this.airwayBillPickupDateTime = airwayBillPickupDateTime;
	}

	public Timestamp getAirwayBillTimestamp() {
		return this.airwayBillTimestamp;
	}

	public void setAirwayBillTimestamp(Timestamp airwayBillTimestamp) {
		this.airwayBillTimestamp = airwayBillTimestamp;
	}

	public String getAwbNumber() {
		return this.awbNumber;
	}

	public void setAwbNumber(String awbNumber) {
		this.awbNumber = awbNumber;
	}

	public Long getAwbStatusId() {
		return this.awbStatusId;
	}

	public void setAwbStatusId(Long awbStatusId) {
		this.awbStatusId = awbStatusId;
	}

	public String getConsignee() {
		return this.consignee;
	}

	public void setConsignee(String consignee) {
		this.consignee = consignee;
	}

	public String getContactPerson() {
		return this.contactPerson;
	}

	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getDateOfReturn() {
		return this.dateOfReturn;
	}

	public void setDateOfReturn(Date dateOfReturn) {
		this.dateOfReturn = dateOfReturn;
	}

	public String getDeliveryOrder() {
		return this.deliveryOrder;
	}

	public void setDeliveryOrder(String deliveryOrder) {
		this.deliveryOrder = deliveryOrder;
	}

	public String getDestCode() {
		return this.destCode;
	}

	public void setDestCode(String destCode) {
		this.destCode = destCode;
	}

	public String getDestination() {
		return this.destination;
	}

	public void setDestination(String destination) {
		this.destination = destination;
	}

	public Long getDistributionCartId() {
		return this.distributionCartId;
	}

	public void setDistributionCartId(Long distributionCartId) {
		this.distributionCartId = distributionCartId;
	}

	public String getGdnReference() {
		return this.gdnReference;
	}

	public void setGdnReference(String gdnReference) {
		this.gdnReference = gdnReference;
	}

	public BigDecimal getGiftWrapCharge() {
		return this.giftWrapCharge;
	}

	public void setGiftWrapCharge(BigDecimal giftWrapCharge) {
		this.giftWrapCharge = giftWrapCharge;
	}

	public Timestamp getHistoryTimestamp() {
		return this.historyTimestamp;
	}

	public void setHistoryTimestamp(Timestamp historyTimestamp) {
		this.historyTimestamp = historyTimestamp;
	}

	public BigDecimal getInsuranceCharge() {
		return this.insuranceCharge;
	}

	public void setInsuranceCharge(BigDecimal insuranceCharge) {
		this.insuranceCharge = insuranceCharge;
	}

	public Long getInvoiceApprovalStatusId() {
		return this.invoiceApprovalStatusId;
	}

	public void setInvoiceApprovalStatusId(Long invoiceApprovalStatusId) {
		this.invoiceApprovalStatusId = invoiceApprovalStatusId;
	}

	public Long getLogisticsProviderId() {
		return this.logisticsProviderId;
	}

	public void setLogisticsProviderId(Long logisticsProviderId) {
		this.logisticsProviderId = logisticsProviderId;
	}

	public String getNoteReturn() {
		return this.noteReturn;
	}

	public void setNoteReturn(String noteReturn) {
		this.noteReturn = noteReturn;
	}

	public String getNoteUndelivered() {
		return this.noteUndelivered;
	}

	public void setNoteUndelivered(String noteUndelivered) {
		this.noteUndelivered = noteUndelivered;
	}

	public Long getOrderItemId() {
		return this.orderItemId;
	}

	public void setOrderItemId(Long orderItemId) {
		this.orderItemId = orderItemId;
	}

	public BigDecimal getOtherCharge() {
		return this.otherCharge;
	}

	public void setOtherCharge(BigDecimal otherCharge) {
		this.otherCharge = otherCharge;
	}

	public BigDecimal getPackageWeight() {
		return this.packageWeight;
	}

	public void setPackageWeight(BigDecimal packageWeight) {
		this.packageWeight = packageWeight;
	}

	public String getPieces() {
		return this.pieces;
	}

	public void setPieces(String pieces) {
		this.pieces = pieces;
	}

	public BigDecimal getPricePerKg() {
		return this.pricePerKg;
	}

	public void setPricePerKg(BigDecimal pricePerKg) {
		this.pricePerKg = pricePerKg;
	}

	public Date getReceived() {
		return this.received;
	}

	public void setReceived(Date received) {
		this.received = received;
	}

	public String getRecipient() {
		return this.recipient;
	}

	public void setRecipient(String recipient) {
		this.recipient = recipient;
	}

	public String getRelation() {
		return this.relation;
	}

	public void setRelation(String relation) {
		this.relation = relation;
	}

	public String getReturn_() {
		return this.return_;
	}

	public void setReturn_(String return_) {
		this.return_ = return_;
	}

	public String getService() {
		return this.service;
	}

	public void setService(String service) {
		this.service = service;
	}

	public String getShipper() {
		return this.shipper;
	}

	public void setShipper(String shipper) {
		this.shipper = shipper;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getTariff() {
		return this.tariff;
	}

	public void setTariff(String tariff) {
		this.tariff = tariff;
	}

	public BigDecimal getTotalCharge() {
		return this.totalCharge;
	}

	public void setTotalCharge(BigDecimal totalCharge) {
		this.totalCharge = totalCharge;
	}

	public String getTrackingNumber() {
		return this.trackingNumber;
	}

	public void setTrackingNumber(String trackingNumber) {
		this.trackingNumber = trackingNumber;
	}

	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Date getUndelivered() {
		return this.undelivered;
	}

	public void setUndelivered(Date undelivered) {
		this.undelivered = undelivered;
	}

	public String getZip() {
		return this.zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	public VenMasterChangeType getVenMasterChangeType() {
		return this.venMasterChangeType;
	}

	public void setVenMasterChangeType(VenMasterChangeType venMasterChangeType) {
		this.venMasterChangeType = venMasterChangeType;
	}

}


text:
package com.vishnus1224.teamworkapidemo.ui.view;

/**
 * Created by Vishnu on 8/16/2016.
 */
public interface MainView extends BaseView {

    void showLatestActivityScreen();

    void showProjectsScreen();

    void showTaskScreen();

    void openDrawer();

    void closeDrawer();

    void updateTitle(int position);
}

redpajama_set_name: RedPajamaGithub


text:
package io.pslab.communication;

import android.os.AsyncTask;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.IOException;

import io.pslab.interfaces.HttpCallback;

public class HttpAsyncTask extends AsyncTask<byte[], Void, Void> {

    private HttpHandler mHttpHandler;
    private HttpCallback<JSONObject> mHttpCallback;

    public HttpAsyncTask(String baseIP, HttpCallback<JSONObject> httpCallback) {
        mHttpHandler = new HttpHandler(baseIP);
        mHttpCallback = httpCallback;
    }

    @Override
    protected Void doInBackground(byte[]... data) {
        int res = 0;
        try {
            if (data.length != 0) {
                res = mHttpHandler.write(data[0]);

            } else {
                res = mHttpHandler.read();
            }
        } catch (IOException | JSONException e) {
            mHttpCallback.error(e);
            e.printStackTrace();
        }
        if (res == 1) {
            mHttpCallback.success(mHttpHandler.getReceivedData());
        } else {
            mHttpCallback.error(new Exception());
        }
        return null;
    }
}


text:
module.exports = function(Subscriber) {

  // Google Maps API has a rate limit of 10 requests per second
  // Seems we need to enforce a lower rate to prevent errors
  var lookupGeo = require('function-rate-limit')(5, 1000, function() {
    var geoService = Subscriber.app.dataSources.geo;
    geoService.geocode.apply(geoService, arguments);
  });

  Subscriber.beforeRemote('prototype.updateAttributes', function(ctx, user, next) {
    var body = ctx.req.body;
    console.log('beforeRemote -- prototype.updateAttributes');
    if (body                    &&
        body.preferences        &&
        body.preferences.street &&
        body.preferences.city   &&
        body.preferences.zipcode ) {

      var loc = body.preferences;

      // geo code the address
      lookupGeo(loc.street, loc.city, loc.zipcode,
        function(err, result) {
           if (result && result[0]) {
            body.geo = result[0];
            next();
          } else {
             //TODO: Need to find out how to handle this with better a UX experience
            next(new Error('could not find location'));
          }
        });

    } else {
      next();
    }

  });

  Subscriber.getWeather = function(subscriberId, cb){
    Subscriber.findById(subscriberId, function (err, instance) {

      if (err) {
        return cb(err);
      }

      if (instance && instance.preferences) {
        var lat = instance.geo.lat;
        var lon = instance.geo.lng;
        var units = instance.preferences.temperature;

        var openWeatherMap = Subscriber.app.dataSources.openweathermap;
        openWeatherMap.getweather
        (
          lat,
          lon,
          units,
          function(err, results){

            if (err) {
              cb(err);
            } else {
              //console.log(results);
              cb(null, results);
            }

          }
        );

      } else {
        cb(null, {});
      }

    })
  };

  Subscriber.remoteMethod('getWeather', {
    accepts: [
      {arg: 'id', type: 'string', required: true}
    ],
    http: {path: '/:id/weather', verb: 'get'},
    returns: {arg: 'weather', type: 'object'}
  });

};


text:
<?php
namespace AnhNhan\Converge\Modules\People\DependencyInjection;

use AnhNhan\Converge\Modules\People\PeopleApplication;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

/*
 * @author Anh Nhan Nguyen <anhnhan@outlook.com>
 */
 class PeopleExtension implements ExtensionInterface
 {
    public function getAlias()
    {
        return "user-extension";
    }

    public function load(array $config, ContainerBuilder $container)
    {
        $loader = new YamlFileLoader(
            $container,
            new FileLocator(__DIR__.'/../resources/')
        );
        $loader->load('services.yml');
    }

    /* - ( Anti-XML stuff ) - */

    public function getXsdValidationBasePath()
    {
        return false;
    }

    public function getNamespace()
    {
        return null;
    }
 }


text:
AWDCamera::AWDCamera(const char *name, awd_uint16 name_len, AWD_cam_type type, AWD_lens_type lens) :
    AWDSceneBlock(CAMERA, name, name_len, NULL)
{
    this->type = type;
    this->lens = lens;

    this->lens_fov = 35.0;
}

AWDCamera::~AWDCamera()
{
}

awd_float64
AWDCamera::get_lens_fov()
{
    return this->lens_fov;
}

void
AWDCamera::set_lens_fov(awd_float64 fov)
{
    this->lens_fov = fov;
}

void
AWDCamera::prepare_write()
{
    AWD_field_ptr fov_val;

    fov_val.f64 = &this->lens_fov;
    this->properties->set(PROP_CAM_FOV, fov_val, sizeof(awd_float64), AWD_FIELD_FLOAT64);
}

awd_uint32
AWDCamera::calc_body_length(bool wide_mtx)
{
    awd_uint32 len;

    len = 2; // Two single-byte static fields
    len += this->calc_common_length(wide_mtx);
    len += this->calc_attr_length(true, true, wide_mtx);

    return len;
}

void
AWDCamera::write_body(int fd, bool wide_mtx)
{
    this->write_scene_common(fd, wide_mtx);

    write(fd, &this->type, sizeof(awd_uint8));
    write(fd, &this->lens, sizeof(awd_uint8));

    this->properties->write_attributes(fd, wide_mtx);
    this->user_attributes->write_attributes(fd, wide_mtx);
}


text:
@implementation NSArray (Functional)

- (NSInteger)nsk_countIf:(BOOL(^)(id obj))block {

    __block NSInteger count = 0;

    [self enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {

        if (block(obj)) {

            count++;
        }
    }];

    return count;
}

- (NSArray *)nsk_mapUsingBlock:(id(^)(id obj))block {

    NSMutableArray *result = [NSMutableArray arrayWithCapacity:self.count];

    [self enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {

        [result addObject:block(obj)];
    }];

    return [result copy];
}

- (NSArray *)nsk_flatMapUsingBlock:(id(^)(id obj))block {

    NSMutableArray *result = [NSMutableArray arrayWithCapacity:self.count];

    [self enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {

        id value = block(obj);

        if (value) {

            [result addObject:value];
        }
    }];

    return [result copy];
}

+ (NSArray<NSNumber *> *)nsk_arrayFrom:(NSInteger)from to:(NSInteger)to {

    NSAssert(to >= from, @"Error: 'from' (%@) must be less or equal than 'to' (%@)", @(from), @(to));

    NSMutableArray<NSNumber *> *result = [NSMutableArray arrayWithCapacity:to - from];

    for (NSInteger elem = from; elem < to; elem++) {

        [result addObject:@(elem)];
    }

    return [result copy];
}

- (instancetype)nsk_reversing {

    return [[self reverseObjectEnumerator] allObjects];
}

@end


text:
* Add `handle` option. [@ToddSmithSalter](https://github.com/ToddSmithSalter)
* Upgrade to ember-cli 0.2.7.
* Fix reference to `_parentView`, so action triggering works in Ember 1.13+.
* Pull jQuery UI options into a `uiOptions` concatenated property.

## 1.0.0-beta.4

* Add repo URL to package.json.
* Fix potential Morph errors when the content array is modified.

## 1.0.0-beta.3

* Deprecate the `{{ivy-sortable}}` helper.

## 1.0.0-beta.2

* Check `isDestroying` before refreshing the sortable.

## 1.0.0-beta.1

* Call sortable's `refresh` method after content changes. This fixes an issue
  where the "ui-sortable-handle" class would not be added to newly-inserted
  list items. See [#2](https://github.com/IvyApp/ivy-sortable/issues/2) for
  further details.

## 0.3.0

* Remove version suffix from ivy-sortable.js.

## 0.2.1

* Add jQuery UI Sortable option bindings.
* Upgrade to ember-cli 0.1.5.
* Remove unnecessary ember-data dependency in dummy app.
* Upgrade to ember 1.9.1 in dummy app.

## 0.2.0

* Convert to an ember-cli addon.

## 0.1.0

* Initial release.


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Syst. mycol. (Lundae) 2(2): 492 (1823)

#### Original name
Sphaeria syringae Fr., 1823

### Remarks
null


text:
//
//  ZTUploadParamModel.h
//  Pod
//
//  Created by Adam on 17/5/3.
//  Copyright ©YC. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ZTUploadParamModel : NSObject

/**
 *  上传文件的二进制数据
 */
@property (nonatomic, strong) NSData *data;
/**
 *  上传的参数名称
 */
@property (nonatomic, copy) NSString *name;
/**
 *  上传到服务器的文件名称
 *  @"image.jpg";
 *  @"image.png";
 */
@property (nonatomic, copy) NSString *fileName;

/**
 *  上传文件的类型
 *  @"image/jpeg";
 *  @"image/png";
 */
@property (nonatomic, copy) NSString *mimeType;

@end


text:
module ATerm.Pretty
(
  ppATerm
)
where

import Text.PrettyPrint.Leijen
import ATerm.AbstractSyntax

ppATerm :: ATermTable -> Doc
ppATerm t = case getATerm t of
  ShAAppl s [] [] -> text s -- this will already have double quotes in this case
  ShAAppl s is _  -> nestAppl t s is
  ShAList   is _  -> nestList t is
  ShAInt  i    _  -> integer i

ppAList :: ATermTable -> [Int] -> [Doc]
ppAList t is = map (\i -> ppATerm (getATermByIndex1 i t)) is

nestList :: ATermTable -> [Int] -> Doc
nestList t is = children ds
  where
  children []  = lbracket <> rbracket
  children [d] = lbracket <> d <> rbracket
  children _   =
    lbracket                                                          <$>
      indent 2 (align (cat (zipWith (<>) (empty : repeat comma) ds))) <$>
    rbracket
  ds = ppAList t is

nestAppl :: ATermTable -> String -> [Int] -> Doc
nestAppl t s is = children ds
  where
  children []  = text s <> lparen <> rparen
  children [d] = text s <> lparen <> d <> rparen
  children _   = text s <>
    lparen                                                               <$>
      indent 2 (align (cat (zipWith (<>) (text " " : repeat comma) ds))) <$>
    (indent 1 rparen)
  ds = ppAList t is


text:
namespace ray {
namespace rpc {

/// NOTE: See src/ray/core_worker/core_worker.h on how to add a new grpc handler.
#define RAY_NODE_MANAGER_RPC_HANDLERS                             \
  RPC_SERVICE_HANDLER(NodeManagerService, RequestWorkerLease)     \
  RPC_SERVICE_HANDLER(NodeManagerService, ReturnWorker)           \
  RPC_SERVICE_HANDLER(NodeManagerService, ReleaseUnusedWorkers)   \
  RPC_SERVICE_HANDLER(NodeManagerService, CancelWorkerLease)      \
  RPC_SERVICE_HANDLER(NodeManagerService, PinObjectIDs)           \
  RPC_SERVICE_HANDLER(NodeManagerService, GetNodeStats)           \
  RPC_SERVICE_HANDLER(NodeManagerService, GlobalGC)               \
  RPC_SERVICE_HANDLER(NodeManagerService, FormatGlobalMemoryInfo) \
  RPC_SERVICE_HANDLER(NodeManagerService, PrepareBundleResources) \
  RPC_SERVICE_HANDLER(NodeManagerService, CommitBundleResources)  \
  RPC_SERVICE_HANDLER(NodeManagerService, CancelResourceReserve)  \
  RPC_SERVICE_HANDLER(NodeManagerService, RequestObjectSpillage)  \
  RPC_SERVICE_HANDLER(NodeManagerService, ReleaseUnusedBundles)

/// Interface of the `NodeManagerService`, see `src/ray/protobuf/node_manager.proto`.
class NodeManagerServiceHandler {
 public:
  /// Handlers. For all of the following handlers, the implementations can
  /// handle the request asynchronously. When handling is done, the
  /// `send_reply_callback` should be called. See
  /// src/ray/rpc/node_manager/node_manager_client.h and
  /// src/ray/protobuf/node_manager.proto for a description of the
  /// functionality of each handler.
  ///
  /// \param[in] request The request message.
  /// \param[out] reply The reply message.
  /// \param[in] send_reply_callback The callback to be called when the request is done.

  virtual void HandleRequestWorkerLease(const RequestWorkerLeaseRequest &request,
                                        RequestWorkerLeaseReply *reply,
                                        SendReplyCallback send_reply_callback) = 0;

  virtual void HandleReturnWorker(const ReturnWorkerRequest &request,
                                  ReturnWorkerReply *reply,
                                  SendReplyCallback send_reply_callback) = 0;

  virtual void HandleReleaseUnusedWorkers(const ReleaseUnusedWorkersRequest &request,
                                          ReleaseUnusedWorkersReply *reply,
                                          SendReplyCallback send_reply_callback) = 0;

  virtual void HandleCancelWorkerLease(const rpc::CancelWorkerLeaseRequest &request,
                                       rpc::CancelWorkerLeaseReply *reply,
                                       rpc::SendReplyCallback send_reply_callback) = 0;

  virtual void HandlePrepareBundleResources(
      const rpc::PrepareBundleResourcesRequest &request,
      rpc::PrepareBundleResourcesReply *reply,
      rpc::SendReplyCallback send_reply_callback) = 0;

  virtual void HandleCommitBundleResources(
      const rpc::CommitBundleResourcesRequest &request,
      rpc::CommitBundleResourcesReply *reply,
      rpc::SendReplyCallback send_reply_callback) = 0;

  virtual void HandleCancelResourceReserve(
      const rpc::CancelResourceReserveRequest &request,
      rpc::CancelResourceReserveReply *reply,
      rpc::SendReplyCallback send_reply_callback) = 0;

  virtual void HandlePinObjectIDs(const PinObjectIDsRequest &request,
                                  PinObjectIDsReply *reply,
                                  SendReplyCallback send_reply_callback) = 0;

  virtual void HandleGetNodeStats(const GetNodeStatsRequest &request,
                                  GetNodeStatsReply *reply,
                                  SendReplyCallback send_reply_callback) = 0;

  virtual void HandleGlobalGC(const GlobalGCRequest &request, GlobalGCReply *reply,
                              SendReplyCallback send_reply_callback) = 0;

  virtual void HandleFormatGlobalMemoryInfo(const FormatGlobalMemoryInfoRequest &request,
                                            FormatGlobalMemoryInfoReply *reply,
                                            SendReplyCallback send_reply_callback) = 0;

  virtual void HandleRequestObjectSpillage(const RequestObjectSpillageRequest &request,
                                           RequestObjectSpillageReply *reply,
                                           SendReplyCallback send_reply_callback) = 0;

  virtual void HandleReleaseUnusedBundles(const ReleaseUnusedBundlesRequest &request,
                                          ReleaseUnusedBundlesReply *reply,
                                          SendReplyCallback send_reply_callback) = 0;
};

/// The `GrpcService` for `NodeManagerService`.
class NodeManagerGrpcService : public GrpcService {
 public:
  /// Constructor.
  ///
  /// \param[in] io_service See super class.
  /// \param[in] handler The service handler that actually handle the requests.
  NodeManagerGrpcService(boost::asio::io_service &io_service,
                         NodeManagerServiceHandler &service_handler)
      : GrpcService(io_service), service_handler_(service_handler){};

 protected:
  grpc::Service &GetGrpcService() override { return service_; }

  void InitServerCallFactories(
      const std::unique_ptr<grpc::ServerCompletionQueue> &cq,
      std::vector<std::unique_ptr<ServerCallFactory>> *server_call_factories) override {
    RAY_NODE_MANAGER_RPC_HANDLERS
  }

 private:
  /// The grpc async service object.
  NodeManagerService::AsyncService service_;

  /// The service handler that actually handle the requests.
  NodeManagerServiceHandler &service_handler_;
};

}  // namespace rpc
}  // namespace ray


text:
package pl.edu.agh.planner.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pl.edu.agh.planner.dao.LetterDesignationDao;
import pl.edu.agh.planner.domain.LetterDesignationEntity;

import java.util.List;

@Service("letterDesignationService")
public class LetterDesignationService implements ServiceInterface<LetterDesignationEntity, Long>{

    private LetterDesignationDao letterDesignationDao;

    @Autowired
    public void setLetterDesignationDao(LetterDesignationDao letterDesignationDao) {
        this.letterDesignationDao = letterDesignationDao;
    }

    @Override
    public void add(LetterDesignationEntity letterDesignationEntity) {
        letterDesignationDao.add(letterDesignationEntity);
    }

    @Override
    public void add(List<LetterDesignationEntity> letterDesignationEntities) {
        letterDesignationDao.add(letterDesignationEntities);
    }

    @Override
    public void update(LetterDesignationEntity letterDesignationEntity) {
        letterDesignationDao.update(letterDesignationEntity);
    }

    @Override
    public void delete(LetterDesignationEntity letterDesignationEntity) {
        letterDesignationDao.delete(letterDesignationEntity);
    }

    @Override
    public LetterDesignationEntity getById(Long id) {
        return letterDesignationDao.getById(id);
    }

    @Override
    public List<LetterDesignationEntity> getList() {
        return letterDesignationDao.getList();
    }

    @Override
    public LetterDesignationEntity saveOrUpdate(LetterDesignationEntity entity) {
        return letterDesignationDao.saveOrUpdate(entity);
    }
}


text:
[![Travis](https://img.shields.io/travis/LeoAJ/react-iTunes-search.svg?style=flat-square)](https://travis-ci.org/LeoAJ/react-iTunes-search)
[![npm](https://img.shields.io/npm/l/express.svg?style=flat-square)](https://github.com/LeoAJ/react-iTunes-search/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-orange.svg?style=flat-square)](http://makeapullrequest.com)
[![node](https://img.shields.io/badge/node-%3E=_8.0-yellowgreen.svg?style=flat-square)](https://nodejs.org)

:musical_note: :mag: Simple web app for iTunes search with React  (v16)

>If you like this one and you also like Redux, there is a Redux implementation version [here](https://github.com/LeoAJ/redux-iTunes-search). Please check it out.

## Preview

![Preview Gif](https://user-images.githubusercontent.com/492921/31646805-f68ca096-b2b8-11e7-988d-ecfe934debff.gif)

## Live Demo

http://leoj.js.org/react-iTunes-search/

## Detail

To know more detail, please read my [post](http://leoj.js.org/personal/React-iTunes-Search/).

## Installation

1. `git clone git@github.com:LeoAJ/react-iTunes-search.git`
2. `cd react-iTunes-search`
3. `yarn`

## Dev

Run webpack dev server with [react-hot-loader 3](https://github.com/gaearon/react-hot-loader)

```
yarn start
```

and go to `localhost:3000`

## Deploy

Use webpack minify plugin

```
yarn deploy
```

## Lint

run eslint, using [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) rules.

```
yarn lint
```

## Flow

```
flow-typed install
yarn flow
```

## Unit test

Use `Jest`

```
yarn jest
```

### Test

run both `lint`, `flow` and `jest`

```
yarn test
```

## Built with

* React (v16)
* Babel 6
* ES6/ES7 (async/await)
* Webpack
* React-hot-loader 3
* PostCSS
* Eslint
* Materialize
* iTunes search API
* Flow
* Jest
* Enzyme

## License

MIT


text: Weather application with PWA capability.


text:
[Crown software](https://crownplatform.com/wallet) is an implementation of a full Crown Platform node, which can be used both locally, as a wallet for CRW and for running Masternodes and Systemnodes. It is a full node:  it downloads and stores the entire history of Crown transactions (which is currently several GBs); depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to a day or more. If you would like the process to go faster you can _download the blockchain directly_ **(BOOSTRAP LINK NEEDED)**.

## Install and Run Crown Wallet

Here are some helpful notes on how to run Crown on your native platform.

### Windows

Unpack the files into a directory, and then run `crown-qt.exe`.

### OSX

Drag Crown-Qt to your applications folder, and then run `Crown-Qt`.

### Unix

Unpack the files into a directory and run: `bin/crown-qt` or `bin/crownd`. You need the Qt5 run-time libraries to run Crown-Qt. On Debian or Ubuntu:

	sudo apt-get install libqtgui5

### Need Help?

* Ask for help on Discord
* Or at Crown Forum: https://forum.crownplatform.com
* Or write a mail to [support@crownplatform.com](email:support@crownplatform.com)

## Run Masternode or Systemnode

Here are some guides that will help you to setup and run an incentivized node:
* [Masternode Setup Guide](https://forum.crownplatform.com/index.php?topic=1241.0)
* [Systemnode Setup Guide](https://forum.crownplatform.com/index.php?topic=1240.0)
* [Masternode Configuration](masternode-config.md)

## Participate in Crown Decentralized Governance

As a community member you can participate in the Governance by proposing projects that will advance Crown. You are also encouraged to discuss the poposals at [Crown Forum](https://forum.crownplatform.com/index.php?board=17.0).

If you own one or more masternodes you can (and you should!) help to choose the direction in which Crown goes by carefuly studying the proposals and voting for those you consider worthy.

* [Governance and Proposals](https://forum.crownplatform.com/index.php?topic=17.0) - some frequently asqued questions
* [Console Governance Interface](governance.md) - describes how to submit a proposal, how to vote for a proposal from the console and more
* [How To Submit a Proposal](https://forum.crownplatform.com/index.php?topic=11.0) - another proposal submission guide
* [Proposal Submission Template](https://forum.crownplatform.com/index.php?topic=9.0)
* [Active Proposals](https://crown.today/proposals)

## Build Crown From Source

The following are developer notes on how to build Crown on your native platform. Right now Crown Core Development Team officially supports building only on [Unix](build-unix.md). Binaries for Windows and MacOS are generated via cross-compilation. Building under those systems natively is possible in theory - it's just not documented. If you have successful experience building Crown under those platforms, please contribute the instructions.

## Development Documentation

The Crown repo's [root README](../README.md) contains relevant information on the development process.

- [Coding Style Guide](coding-style.md)
- [Multiwallet Qt Development](multiwallet-qt.md)
- [Release Notes](release-notes.md)
- [Release Process](release-process.md)
- [Unit Tests](unit-tests.md)

### Resources
* Crown Forum: https://forum.crownplatform.com
* Discord: https://discord.gg/Tcrkazc
* Telegram: https://t.me/crownplatform
* Guides & How-to: https://forum.crownplatform.com/index.php?board=5.0

## License

Crown is distributed under the terms of the [MIT/X11 software license](http://www.opensource.org/licenses/mit-license.php).

This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](https://www.openssl.org/). This product includes cryptographic software written by Eric Young ([eay@cryptsoft.com](mailto:eay@cryptsoft.com)), and UPnP software written by Thomas Bernard.

Also see [Assets Attribution](assets-attribution.md)

- - -

Copyright © 2009-2018, Bitcoin Core Developers

Copyright © 2014-2016, Dash Core Developers

Copyright © 2014-2020, Crown Developers


text:
title: Huge congrats to Anton Håkansson and DayCape for Forbes 30u30
date: 2017-01-17 01:00:00 +01:00
categories:
- blog
layout: post
author: per
locale: en
---

Huge congrats to our fellow Swedish tech-for-good entrepreneur Anton Håkansson and DayCape for Forbes 30u30! Well deserved!

[Read the article on forbes.com](http://www.forbes.com/30-under-30-europe-2017/social-entrepreneurs/#68a3221e7c8d)

Read more about DayCape at [daycape.com](http://daycape.com/).


text:
/*
 * seL4 tutorial part 4: create a new process and IPC with it
 */

/* Include Kconfig variables. */
#include <autoconf.h>

#include <stdio.h>
#include <assert.h>

#include <sel4/sel4.h>

#include <simple/simple.h>
#include <simple-default/simple-default.h>

#include <vka/object.h>

#include <allocman/allocman.h>
#include <allocman/bootstrap.h>
#include <allocman/vka.h>

#include <vspace/vspace.h>

#include <sel4utils/vspace.h>
#include <sel4utils/mapping.h>
#include <sel4utils/process.h>

/* constants */
#define EP_BADGE 0x61 // arbitrary (but unique) number for a badge
#define MSG_DATA 0x6161 // arbitrary data to send

#define APP_PRIORITY seL4_MaxPrio
#define APP_IMAGE_NAME "hello-4-app"

/* global environment variables */
seL4_BootInfo *info;
simple_t simple;
vka_t vka;
allocman_t *allocman;
vspace_t vspace;

/* static memory for the allocator to bootstrap with */
#define ALLOCATOR_STATIC_POOL_SIZE ((1 << seL4_PageBits) * 10)
static char allocator_mem_pool[ALLOCATOR_STATIC_POOL_SIZE];

/* dimensions of virtual memory for the allocator to use */
#define ALLOCATOR_VIRTUAL_POOL_SIZE ((1 << seL4_PageBits) * 100)

/* static memory for virtual memory bootstrapping */
static sel4utils_alloc_data_t data;

/* stack for the new thread */
#define THREAD_2_STACK_SIZE 4096
UNUSED static int thread_2_stack[THREAD_2_STACK_SIZE];

/* convenience function */
extern void name_thread(seL4_CPtr tcb, char *name);

int main(void)
{
    int error;

    /* give us a name: useful for debugging if the thread faults */
    name_thread(seL4_CapInitThreadTCB, "hello-4");

    /* get boot info */
    info = seL4_GetBootInfo();

    /* init simple */
    simple_default_init_bootinfo(&simple, info);

    /* print out bootinfo and other info about simple */
    simple_print(&simple);

    /* create an allocator */
    allocman = bootstrap_use_current_simple(&simple, ALLOCATOR_STATIC_POOL_SIZE,
        allocator_mem_pool);
    assert(allocman);

    /* create a vka (interface for interacting with the underlying allocator) */
    allocman_make_vka(&vka, allocman);

    /* TODO: create a vspace object to manage our vspace
     * hint: sel4utils_bootstrap_vspace_with_bootinfo_leaky() */
    /*
      sel4utils_bootstrap_vspace_with_bootinfo_leaky(
          vspace_t *vspace,
	  sel4utils_alloc_data_t *data,
	  seL4_CPtr page_directory,
	  vka_t *vka,
	  seL4_BootInfo *info)
    */
    error = sel4utils_bootstrap_vspace_with_bootinfo_leaky(&vspace,
							   &data,
							   simple_get_pd(&simple),
							   &vka,
							   info);
    assert(error == 0);

    /* fill the allocator with virtual memory */
    void *vaddr;
    UNUSED reservation_t virtual_reservation;
    virtual_reservation = vspace_reserve_range(&vspace,
        ALLOCATOR_VIRTUAL_POOL_SIZE, seL4_AllRights, 1, &vaddr);
    assert(virtual_reservation.res);
    bootstrap_configure_virtual_pool(allocman, vaddr,
        ALLOCATOR_VIRTUAL_POOL_SIZE, simple_get_pd(&simple));

    /* TODO: use sel4utils to make a new process
     * hint: sel4utils_configure_process() */
    /*
      sel4utils_configure_process(sel4utils_process_t *process,
                                  vka_t *vka,
				  vspace_t *vspace,
				  uint8_t priority,
				  char *image_name)
    */
    sel4utils_process_t process;
    error = sel4utils_configure_process(&process,
					&vka,
					&vspace,
					APP_PRIORITY,
					APP_IMAGE_NAME);
    assert(error == 0);

    /* TODO: give the new process's thread a name */
    name_thread(process.thread.tcb.cptr, "hello-4-app-process");

    /* create an endpoint */
    vka_object_t ep_object = {0};
    error = vka_alloc_endpoint(&vka, &ep_object);
    assert(error == 0);

    /* TODO: make a badged enpoint in the new process's cspace.
     * This copy will be used to send an IPC to the original cap
     * hint 1: vka_cspace_make_path()
     * hint 2: sel4utils_mint_cap_to_process()
     * hint 3: seL4_CapData_Badge_new()
     */
    cspacepath_t path;
    vka_cspace_make_path(&vka, ep_object.cptr, &path);
    seL4_CPtr ep_badged = sel4utils_mint_cap_to_process(&process,
							path,
							seL4_AllRights,
							seL4_CapData_Badge_new(EP_BADGE));
    assert(ep_badged);

    /* TODO: spawn the process: hint sel4utils_spawn_process_v() */
    /*
      sel4utils_spawn_process_v(sel4utils_process_t *process,
                                vka_t *vka,
				vspace_t *vspace,
				int argc,
				char *argv[],
				int resume)
    */
    error = sel4utils_spawn_process_v(&process, &vka, &vspace, 0, 0, 1);
    assert(error == 0);

    /* we are done, say hello*/
    printf("main: hello world\n");

    /*
     * now wait for a message from the new process, then send a reply back
     */

    seL4_Word sender_badge;
    seL4_MessageInfo_t tag;
    seL4_Word msg;

    /* TODO: wait for a message: hint seL4_Wait() */
    seL4_Wait(ep_object.cptr, &sender_badge);

    /* get the message stored in the first message register */
    msg = seL4_GetMR(0);
    printf("main: got a message %#x from %#x\n", msg, sender_badge);

    /* modify the message */
    seL4_SetMR(0, ~msg);

    /* TODO: and send it back: hint seL4_ReplyWait() */
    tag = seL4_MessageInfo_new(0, 0, 0, 1);
    seL4_ReplyWait(ep_object.cptr, tag, 0);

    return 0;
}


text:
package com.opengamma.analytics.financial.provider.calculator.generic;

import com.opengamma.analytics.financial.interestrate.InstrumentDerivativeVisitorAdapter;
import com.opengamma.analytics.financial.interestrate.annuity.derivative.Annuity;
import com.opengamma.analytics.financial.interestrate.annuity.derivative.AnnuityCouponFixed;
import com.opengamma.analytics.financial.interestrate.cash.derivative.Cash;
import com.opengamma.analytics.financial.interestrate.cash.derivative.DepositIbor;
import com.opengamma.analytics.financial.interestrate.fra.derivative.ForwardRateAgreement;
import com.opengamma.analytics.financial.interestrate.inflation.derivative.CouponInflationYearOnYearInterpolation;
import com.opengamma.analytics.financial.interestrate.inflation.derivative.CouponInflationYearOnYearMonthly;
import com.opengamma.analytics.financial.interestrate.inflation.derivative.CouponInflationZeroCouponInterpolation;
import com.opengamma.analytics.financial.interestrate.inflation.derivative.CouponInflationZeroCouponInterpolationGearing;
import com.opengamma.analytics.financial.interestrate.inflation.derivative.CouponInflationZeroCouponMonthly;
import com.opengamma.analytics.financial.interestrate.inflation.derivative.CouponInflationZeroCouponMonthlyGearing;
import com.opengamma.analytics.financial.interestrate.payments.derivative.CouponFixed;
import com.opengamma.analytics.financial.interestrate.payments.derivative.CouponFixedCompounding;
import com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIbor;
import com.opengamma.analytics.financial.interestrate.payments.derivative.CouponON;
import com.opengamma.analytics.financial.interestrate.payments.derivative.Payment;
import com.opengamma.analytics.financial.interestrate.swap.derivative.Swap;
import com.opengamma.analytics.financial.interestrate.swap.derivative.SwapFixedCoupon;

/**
 * Calculator of the last fixing end time.
 * For fixed coupon, it is 0.
 */
public final class LastFixingEndTimeCalculator extends InstrumentDerivativeVisitorAdapter<Object, Double> {

  /**
   * The unique instance of the calculator.
   */
  private static final LastFixingEndTimeCalculator INSTANCE = new LastFixingEndTimeCalculator();

  /**
   * Gets the calculator instance.
   * @return The calculator.
   */
  public static LastFixingEndTimeCalculator getInstance() {
    return INSTANCE;
  }

  /**
   * Constructor.
   */
  private LastFixingEndTimeCalculator() {
  }

  // -----     Deposit     ------

  @Override
  public Double visitCash(final Cash cash) {
    return cash.getEndTime();
  }

  @Override
  public Double visitDepositIbor(final DepositIbor deposit) {
    return deposit.getEndTime();
  }

  // -----     Payment/Coupon     ------

  @Override
  public Double visitCouponFixed(final CouponFixed payment) {
    return 0.0;
  }

  @Override
  public Double visitCouponIbor(final CouponIbor payment) {
    return payment.getFixingPeriodEndTime();
  }

  @Override
  public Double visitCouponOIS(final CouponON payment) {
    return payment.getFixingPeriodEndTime();
  }

  @Override
  public Double visitCouponFixedCompounding(final CouponFixedCompounding payment) {
    return 0.0;
  }

  @Override
  public Double visitForwardRateAgreement(final ForwardRateAgreement fra) {
    return fra.getFixingPeriodEndTime();
  }

  // -----     Annuity     ------

  @Override
  public Double visitGenericAnnuity(final Annuity<? extends Payment> annuity) {
    double result = 0.0;
    for (int loopp = 0; loopp < annuity.getNumberOfPayments(); loopp++) {
      result = Math.max(result, annuity.getNthPayment(loopp).accept(this));
    }
    return result;
  }

  @Override
  public Double visitFixedCouponAnnuity(final AnnuityCouponFixed annuity) {
    return visitGenericAnnuity(annuity);
  }

  // -----     Swap     ------

  @Override
  public Double visitSwap(final Swap<?, ?> swap) {
    final double a = swap.getFirstLeg().accept(this);
    final double b = swap.getSecondLeg().accept(this);
    return Math.max(a, b);
  }

  @Override
  public Double visitFixedCouponSwap(final SwapFixedCoupon<?> swap) {
    return visitSwap(swap);
  }

  // -----     Inflation     -----

  @Override
  public Double visitCouponInflationZeroCouponMonthly(final CouponInflationZeroCouponMonthly coupon) {
    return coupon.getReferenceEndTime();
  }

  @Override
  public Double visitCouponInflationZeroCouponMonthlyGearing(final CouponInflationZeroCouponMonthlyGearing coupon) {
    return coupon.getReferenceEndTime();
  }

  @Override
  public Double visitCouponInflationZeroCouponInterpolation(final CouponInflationZeroCouponInterpolation coupon) {
    return coupon.getReferenceEndTime()[1];
  }

  @Override
  public Double visitCouponInflationZeroCouponInterpolationGearing(final CouponInflationZeroCouponInterpolationGearing coupon) {
    return coupon.getReferenceEndTime()[1];
  }

  @Override
  public Double visitCouponInflationYearOnYearMonthly(final CouponInflationYearOnYearMonthly coupon) {
    return coupon.getReferenceEndTime();
  }

  @Override
  public Double visitCouponInflationYearOnYearInterpolation(final CouponInflationYearOnYearInterpolation coupon) {
    return coupon.getReferenceEndTime()[1];
  }

}


text:
module.exports = function (opts) {
  const ctx = {
    dev: opts.dev || false,
    prod: opts.prod || false,
    mode: {},
    modeName: opts.mode,
    target: {},
    targetName: opts.target,
    emulator: opts.emulator,
    arch: {},
    archName: opts.arch,
    bundler: {},
    bundlerName: opts.bundler,
    debug: opts.debug || false,
    publish: opts.publish,
    vueDevtools: opts.vueDevtools || false
  }

  ctx.mode[opts.mode] = true

  if (opts.target) {
    ctx.target[opts.target] = true
  }

  if (opts.arch) {
    ctx.arch[opts.arch] = true
  }

  if (opts.bundler) {
    ctx.bundler[opts.bundler] = true
  }

  return ctx
}


text:
<!doctype html>
<html>
  <head>
    <title>Learning Ciphers The Hard Way</title>

    <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  </head>

<body>
  <div class="readme-md">
  </div>

  <!--
      Using showdown.js as the MarkDown to HTML converter
      https://github.com/showdownjs/showdown
  -->
  <script src="showdown.js"></script>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  <script>
    $(document).ready(function() {
      $.ajax({
              url: "README.md",
              type: "GET",
              dataType: "text",
              success: function(mdText) {
                var converter = new Showdown.converter();
                var htmlText = converter.makeHtml(mdText);
                $(".readme-md").append(htmlText);

              }
      });
    });
  </script>
</body>
</html>


text:
int parse_options(int argc, _TCHAR *argv[]);
_TCHAR * get_app_path();
_TCHAR * get_app_params();
_TCHAR * get_user_name();
_TCHAR * get_password();

void print_usage(_TCHAR *p);
void cleanup_options();

#endif


text:
class LocalizationContext(object):

    def __init__(self):
        self.localizationType = None
        self.localizationLevel = None
        self.contextName = None

    def getLocalizationType(self):
        return self.localizationType

    def setLocalizationType(self, localizationType):
        self.localizationType = localizationType

    def getLocalizationLevel(self):
        return self.localizationLevel

    def setLocalizationLevel(self, localizationLevel):
        self.localizationLevel = localizationLevel

    def getContextName(self):
        return self.contextName

    def setContextName(self, contextName):
        self.contextName = contextName

    def __str__(self):
        return self.__repr__()

    def __repr__(self):
        delimitedString = str(self.localizationType).lower() + "." + str(self.localizationLevel).lower()
        if self.contextName is not None and self.contextName != "":
            delimitedString += "." + self.contextName
        return delimitedString


text:
#ifndef INCLUDED_openfl__legacy_display_PixelSnapping
#define INCLUDED_openfl__legacy_display_PixelSnapping

#ifndef HXCPP_H
#include <hxcpp.h>
#endif

HX_DECLARE_CLASS3(openfl,_legacy,display,PixelSnapping)
namespace openfl{
namespace _legacy{
namespace display{

class PixelSnapping_obj : public hx::EnumBase_obj
{
	typedef hx::EnumBase_obj super;
		typedef PixelSnapping_obj OBJ_;

	public:
		PixelSnapping_obj() {};
		HX_DO_ENUM_RTTI;
		static void __boot();
		static void __register();
		::String GetEnumName( ) const { return HX_HCSTRING("openfl._legacy.display.PixelSnapping","\xb2","\x48","\xb0","\xa8"); }
		::String __ToString() const { return HX_HCSTRING("PixelSnapping.","\xac","\x7b","\x2c","\x7f") + tag; }

		static ::openfl::_legacy::display::PixelSnapping ALWAYS;
		static inline ::openfl::_legacy::display::PixelSnapping ALWAYS_dyn() { return ALWAYS; }
		static ::openfl::_legacy::display::PixelSnapping AUTO;
		static inline ::openfl::_legacy::display::PixelSnapping AUTO_dyn() { return AUTO; }
		static ::openfl::_legacy::display::PixelSnapping NEVER;
		static inline ::openfl::_legacy::display::PixelSnapping NEVER_dyn() { return NEVER; }
};

} // end namespace openfl
} // end namespace _legacy
} // end namespace display

#endif /* INCLUDED_openfl__legacy_display_PixelSnapping */


text:
using Python.Runtime;
using QuantConnect.Securities;

namespace QuantConnect.Python
{
    /// <summary>
    /// Wraps a <see cref="PyObject"/> object that represents a security's model of buying power
    /// </summary>
    public class BuyingPowerModelPythonWrapper : IBuyingPowerModel
    {
        private readonly dynamic _model;

        /// <summary>
        /// Constructor for initializing the <see cref="BuyingPowerModelPythonWrapper"/> class with wrapped <see cref="PyObject"/> object
        /// </summary>
        /// <param name="model">Represents a security's model of buying power</param>
        public BuyingPowerModelPythonWrapper(PyObject model)
        {
            _model = model.ValidateImplementationOf<IBuyingPowerModel>();
        }

        /// <summary>
        /// Gets the buying power available for a trade
        /// </summary>
        /// <param name="parameters">A parameters object containing the algorithm's potrfolio, security, and order direction</param>
        /// <returns>The buying power available for the trade</returns>
        public BuyingPower GetBuyingPower(BuyingPowerParameters parameters)
        {
            using (Py.GIL())
            {
                return (_model.GetBuyingPower(parameters) as PyObject).GetAndDispose<BuyingPower>();
            }
        }

        /// <summary>
        /// Gets the current leverage of the security
        /// </summary>
        /// <param name="security">The security to get leverage for</param>
        /// <returns>The current leverage in the security</returns>
        public decimal GetLeverage(Security security)
        {
            using (Py.GIL())
            {
                return (_model.GetLeverage(security) as PyObject).GetAndDispose<decimal>();
            }
        }

        /// <summary>
        /// Get the maximum market order quantity to obtain a position with a given buying power percentage.
        /// Will not take into account free buying power.
        /// </summary>
        /// <param name="parameters">An object containing the portfolio, the security and the target signed buying power percentage</param>
        /// <returns>Returns the maximum allowed market order quantity and if zero, also the reason</returns>
        public GetMaximumOrderQuantityResult GetMaximumOrderQuantityForTargetBuyingPower(GetMaximumOrderQuantityForTargetBuyingPowerParameters parameters)
        {
            using (Py.GIL())
            {
                return (_model.GetMaximumOrderQuantityForTargetBuyingPower(parameters)
                    as PyObject).GetAndDispose<GetMaximumOrderQuantityResult>();
            }
        }

        /// <summary>
        /// Get the maximum market order quantity to obtain a delta in the buying power used by a security.
        /// The deltas sign defines the position side to apply it to, positive long, negative short.
        /// </summary>
        /// <param name="parameters">An object containing the portfolio, the security and the delta buying power</param>
        /// <returns>Returns the maximum allowed market order quantity and if zero, also the reason</returns>
        public GetMaximumOrderQuantityResult GetMaximumOrderQuantityForDeltaBuyingPower(
            GetMaximumOrderQuantityForDeltaBuyingPowerParameters parameters)
        {
            using (Py.GIL())
            {
                return (_model.GetMaximumOrderQuantityForDeltaBuyingPower(parameters)
                    as PyObject).GetAndDispose<GetMaximumOrderQuantityResult>();
            }
        }

        /// <summary>
        /// Gets the amount of buying power reserved to maintain the specified position
        /// </summary>
        /// <param name="parameters">A parameters object containing the security</param>
        /// <returns>The reserved buying power in account currency</returns>
        public ReservedBuyingPowerForPosition GetReservedBuyingPowerForPosition(ReservedBuyingPowerForPositionParameters parameters)
        {
            using (Py.GIL())
            {
                return (_model.GetReservedBuyingPowerForPosition(parameters)
                    as PyObject).GetAndDispose<ReservedBuyingPowerForPosition>();
            }
        }

        /// <summary>
        /// Check if there is sufficient buying power to execute this order.
        /// </summary>
        /// <param name="parameters">An object containing the portfolio, the security and the order</param>
        /// <returns>Returns buying power information for an order</returns>
        public HasSufficientBuyingPowerForOrderResult HasSufficientBuyingPowerForOrder(HasSufficientBuyingPowerForOrderParameters parameters)
        {
            using (Py.GIL())
            {
                return (_model.HasSufficientBuyingPowerForOrder(parameters)
                    as PyObject).GetAndDispose<HasSufficientBuyingPowerForOrderResult>();
            }
        }

        /// <summary>
        /// Sets the leverage for the applicable securities, i.e, equities
        /// </summary>
        /// <remarks>
        /// This is added to maintain backwards compatibility with the old margin/leverage system
        /// </remarks>
        /// <param name="security">The security to set leverage for</param>
        /// <param name="leverage">The new leverage</param>
        public void SetLeverage(Security security, decimal leverage)
        {
            using (Py.GIL())
            {
                _model.SetLeverage(security, leverage);
            }
        }

        /// <summary>
        /// Gets the margin currently allocated to the specified holding
        /// </summary>
        /// <param name="parameters">An object containing the security</param>
        /// <returns>The maintenance margin required for the provided holdings quantity/cost/value</returns>
        public MaintenanceMargin GetMaintenanceMargin(MaintenanceMarginParameters parameters)
        {
            using (Py.GIL())
            {
                return (_model.GetMaintenanceMargin(parameters) as PyObject)
                    .GetAndDispose<MaintenanceMargin>();
            }
        }

        /// <summary>
        /// The margin that must be held in order to increase the position by the provided quantity
        /// </summary>
        /// <param name="parameters">An object containing the security and quantity</param>
        /// <returns>The initial margin required for the provided security and quantity</returns>
        public InitialMargin GetInitialMarginRequirement(InitialMarginParameters parameters)
        {
            using (Py.GIL())
            {
                return (_model.GetInitialMarginRequirement(parameters) as PyObject)
                    .GetAndDispose<InitialMargin>();
            }
        }

        /// <summary>
        /// Gets the total margin required to execute the specified order in units of the account currency including fees
        /// </summary>
        /// <param name="parameters">An object containing the portfolio, the security and the order</param>
        /// <returns>The total margin in terms of the currency quoted in the order</returns>
        public InitialMargin GetInitialMarginRequiredForOrder(InitialMarginRequiredForOrderParameters parameters)
        {
            using (Py.GIL())
            {
                return (_model.GetInitialMarginRequiredForOrder(parameters) as PyObject)
                    .GetAndDispose<InitialMargin>();
            }
        }
    }
}


text:
package net.groboclown.idea.p4ic.config.win;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.ArrayList;
import java.util.List;
import java.util.prefs.Preferences;

/**
 * Taken from
 * http://svn.apache.org/repos/asf/incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/WinRegistry.java
 * It's been modified to remove the external dependencies and not allow writing to the
 * registry.
 *
 * It takes advantage of the Preferences class' ability to inspect the Windows registry.
 * Note that this may not be compatible with all Java versions.
 */
public class PreferencesWinRegistry {
    public static final int HKEY_CURRENT_USER = 0x80000001;

    public static final int HKEY_LOCAL_MACHINE = 0x80000002;

    public static final int REG_SUCCESS = 0;

    private static final int KEY_ALL_ACCESS = 0xf003f;

    private static final int KEY_READ = 0x20019;

    private static Preferences userRoot = Preferences.userRoot();

    private static Preferences systemRoot = Preferences.systemRoot();

    private static Class<? extends Preferences> userClass = userRoot.getClass();

    private static Method regOpenKey = null;

    private static Method regCloseKey = null;

    private static Method regQueryValueEx = null;

    private static Method regEnumValue = null;

    private static Method regQueryInfoKey = null;

    private static Method regEnumKeyEx = null;

    static {
        try {
            regOpenKey = userClass.getDeclaredMethod(
                    "WindowsRegOpenKey", new Class[]{int.class, byte[].class, int.class}
            );
            regOpenKey.setAccessible(true);
            regCloseKey = userClass.getDeclaredMethod("WindowsRegCloseKey", new Class[]{int.class});
            regCloseKey.setAccessible(true);
            regQueryValueEx = userClass.getDeclaredMethod(
                    "WindowsRegQueryValueEx", new Class[]{int.class, byte[].class}
            );
            regQueryValueEx.setAccessible(true);
            regEnumValue = userClass.getDeclaredMethod(
                    "WindowsRegEnumValue", new Class[]{int.class, int.class, int.class}
            );
            regEnumValue.setAccessible(true);
            regQueryInfoKey = userClass.getDeclaredMethod("WindowsRegQueryInfoKey1", new Class[]{int.class});
            regQueryInfoKey.setAccessible(true);
            regEnumKeyEx = userClass.getDeclaredMethod(
                    "WindowsRegEnumKeyEx", new Class[]{int.class, int.class, int.class}
            );
            regEnumKeyEx.setAccessible(true);
        } catch (NoSuchMethodException e) {
            // we are not on windows, then!
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * Read a value from key and value name
     *
     * @param hkey      HKEY_CURRENT_USER/HKEY_LOCAL_MACHINE
     * @param key
     * @param valueName
     * @return the value
     * @throws IllegalArgumentException
     * @throws IllegalAccessException
     * @throws java.lang.reflect.InvocationTargetException
     */
    public static String readString(int hkey, String key, String valueName) throws
            IllegalArgumentException,
            IllegalAccessException,
            InvocationTargetException {
        if (hkey == HKEY_LOCAL_MACHINE) {
            return readString(systemRoot, hkey, key, valueName);
        } else if (hkey == HKEY_CURRENT_USER) {
            return readString(userRoot, hkey, key, valueName);
        } else {
            throw new IllegalArgumentException("hkey=" + hkey);
        }
    }

    /**
     * Read value(s) and value name(s) form given key
     *
     * @param hkey HKEY_CURRENT_USER/HKEY_LOCAL_MACHINE
     * @param key
     * @return the value name(s) plus the value(s)
     * @throws IllegalArgumentException
     * @throws IllegalAccessException
     * @throws java.lang.reflect.InvocationTargetException
     */
    public static Map<String, String> readStringValues(int hkey, String key) throws
            IllegalArgumentException,
            IllegalAccessException,
            InvocationTargetException {
        if (hkey == HKEY_LOCAL_MACHINE) {
            return readStringValues(systemRoot, hkey, key);
        } else if (hkey == HKEY_CURRENT_USER) {
            return readStringValues(userRoot, hkey, key);
        } else {
            throw new IllegalArgumentException("hkey=" + hkey);
        }
    }

    /**
     * Read the value name(s) from a given key
     *
     * @param hkey HKEY_CURRENT_USER/HKEY_LOCAL_MACHINE
     * @param key
     * @return the value name(s)
     * @throws IllegalArgumentException
     * @throws IllegalAccessException
     * @throws java.lang.reflect.InvocationTargetException
     */
    public static List<String> readStringSubKeys(int hkey, String key) throws
            IllegalArgumentException,
            IllegalAccessException,
            InvocationTargetException {
        if (hkey == HKEY_LOCAL_MACHINE) {
            return readStringSubKeys(systemRoot, hkey, key);
        } else if (hkey == HKEY_CURRENT_USER) {
            return readStringSubKeys(userRoot, hkey, key);
        } else {
            throw new IllegalArgumentException("hkey=" + hkey);
        }
    }

    // =====================

    private static String readString(Preferences root, int hkey, String key, String value) throws
            IllegalArgumentException,
            IllegalAccessException,
            InvocationTargetException {
        int[] handles = (int[]) regOpenKey.invoke(
                root, new Object[]{
                        new Integer(hkey), toCstr(key), new Integer(KEY_READ)
                }
        );
        if (handles[1] != REG_SUCCESS) {
            return null;
        }
        byte[] valb = (byte[]) regQueryValueEx.invoke(
                root, new Object[]{new Integer(handles[0]), toCstr(value)}
        );
        regCloseKey.invoke(root, new Object[]{new Integer(handles[0])});
        return (valb != null ? new String(valb).trim() : null);
    }

    private static Map<String, String> readStringValues(Preferences root, int hkey, String key) throws
            IllegalArgumentException,
            IllegalAccessException,
            InvocationTargetException {
        HashMap<String, String> results = new HashMap<String, String>();
        int[] handles = (int[]) regOpenKey.invoke(
                root, new Object[]{
                        new Integer(hkey), toCstr(key), new Integer(KEY_READ)
                }
        );
        if (handles[1] != REG_SUCCESS) {
            return null;
        }
        int[] info = (int[]) regQueryInfoKey.invoke(root, new Object[]{new Integer(handles[0])});

        int count = info[2]; // count
        int maxlen = info[3]; // value length max
        for (int index = 0; index < count; index++) {
            byte[] name = (byte[]) regEnumValue.invoke(
                    root, new Object[]{
                            new Integer(handles[0]), new Integer(index), new Integer(maxlen + 1)
                    }
            );
            String value = readString(hkey, key, new String(name));
            results.put(new String(name).trim(), value);
        }
        regCloseKey.invoke(root, new Object[]{new Integer(handles[0])});
        return results;
    }

    private static List<String> readStringSubKeys(Preferences root, int hkey, String key) throws
            IllegalArgumentException,
            IllegalAccessException,
            InvocationTargetException {
        List<String> results = new ArrayList<String>();
        int[] handles = (int[]) regOpenKey.invoke(
                root, new Object[]{
                        new Integer(hkey), toCstr(key), new Integer(KEY_READ)
                }
        );
        if (handles[1] != REG_SUCCESS) {
            return null;
        }
        int[] info = (int[]) regQueryInfoKey.invoke(root, new Object[]{new Integer(handles[0])});

        int count = info[0]; // count
        int maxlen = info[3]; // value length max
        for (int index = 0; index < count; index++) {
            byte[] name = (byte[]) regEnumKeyEx.invoke(
                    root, new Object[]{
                            new Integer(handles[0]), new Integer(index), new Integer(maxlen + 1)
                    }
            );
            results.add(new String(name).trim());
        }
        regCloseKey.invoke(root, new Object[]{new Integer(handles[0])});
        return results;
    }

    // utility
    private static byte[] toCstr(String str) {
        byte[] result = new byte[str.length() + 1];

        for (int i = 0; i < str.length(); i++) {
            result[i] = (byte) str.charAt(i);
        }
        result[str.length()] = 0;
        return result;
    }

    /*
    private static Pattern REGISTRY_REFERENCE_REGEX = Pattern.compile("\\$\\(Registry:([A-Z_]+)\\\\(.*)@(.*)\\)");
    public String getValue(
            RegistryHKey registryHKey, String key, String valueName) throws WindowsRegistryAccessException {
        if (!Os.isFamily(Os.FAMILY_WINDOWS))
            return null;

        try {
            String value = WinRegistry.readString(registryHKey.getHKey(), key, valueName);
            if (value != null) {
                Matcher m = REGISTRY_REFERENCE_REGEX.matcher(value);
                if (m.matches()) {
                    value = getValue(RegistryHKey.tryGetFromName(m.group(1)), m.group(2), m.group(3));
                }
            }
            return value;
        } catch (InvocationTargetException e) {
            throw new WindowsRegistryAccessException(
                    "NPANDAY-117-000: Error while retrieving a windows registry value", e
            );
        } catch (IllegalAccessException e) {
            throw new WindowsRegistryAccessException(
                    "NPANDAY-117-001: Error while retrieving a windows registry value", e
            );
        }
    }
    */
}


text:
package exams.fundamentals.practice.exam3.ex50;

import java.util.*;
public class Foggy extends Murky {
  public static void main(String[] args) {
    final List<String> s = new ArrayList<String>();
    s.add("a");  s.add("f");  s.add("a");
    new Foggy().mutate(s);
    System.out.println(s);
  }
  List<String> mutate(List<String> s) {
    List<String> ms = s;
    ms.add("c");
    return s;
  }
}
class Murky {
  final void mutate(Set s) { }
}


text:
<?php

use Twig\Node\Expression\Test\DefinedTest;

class_exists('Twig\Node\Expression\Test\DefinedTest');

if (\false) {
    class Twig_Node_Expression_Test_Defined extends DefinedTest
    {
    }
}


text:
#import "MainViewController.h"

@interface MainViewController ()

@end

@implementation MainViewController

- (id)initWithWindow:(NSWindow *)window
{
    self = [super initWithWindow:window];
    if (self) {
        // Initialization code here.
    }

    return self;
}

- (id)initWithWindowNibName:(NSString*)nibNameOrNil
{
    self = [super initWithWindowNibName:nibNameOrNil];
    if (self) {
        // Uncomment to override the CDVCommandDelegateImpl used
        // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self];
        // Uncomment to override the CDVCommandQueue used
        // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self];
    }
    return self;
}

- (id)init
{
    self = [super init];
    if (self) {
        // Uncomment to override the CDVCommandDelegateImpl used
        // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self];
        // Uncomment to override the CDVCommandQueue used
        // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self];
    }
    return self;
}

- (void)awakeFromNib
{
    [super awakeFromNib];

    // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
}

@end

@implementation MainCommandDelegate

/* To override the methods, uncomment the line in the init function(s)
 in MainViewController.m
 */

#pragma mark CDVCommandDelegate implementation

- (id)getCommandInstance:(NSString*)className
{
    return [super getCommandInstance:className];
}

- (NSString*)pathForResource:(NSString*)resourcepath;
{
    return [super pathForResource:resourcepath];
}

@end

@implementation MainCommandQueue

/* To override, uncomment the line in the init function(s)
 in MainViewController.m
 */
- (BOOL)execute:(CDVInvokedUrlCommand*)command
{
    return [super execute:command];
}

@end


text:
/* global */

import React, { Component } from 'react'
import Map from './Game/Map'
import Timer from './Game/Timer'
import Stats from './Game/Stats'
import InvitePlayer from './Game/InvitePlayer'
import Chat from './Game/Chat'

class Game extends Component {
  renderGameInvites () {
    return this.props.game.invites.map(invite => {
      return (

- {invite}

      )
    })
  }

  renderPlayers () {
    return this.props.game.players.map(player => {
      return (

- {player.username}

      )
    })
  }

  render () {
    return (

        {!this.props.showingGame && !this.props.game.finishedAt &&

Players

Invited Players:

Playing:

                {this.renderGameInvites()}

                {this.renderPlayers()}

            <InvitePlayer gameId={this.props.game._id} invitePlayer={this.props.invitePlayer} />

        }

{this.props.showingGame && 'Random Example '} Game {this.props.game.finishedAt && 'Over'}

Id: {this.props.game.prettyId}

              <Timer createdAt={this.props.game.createdAt} startedAt={this.props.game.startedAt} finishedAt={this.props.game.finishedAt} />

          <Stats score={this.props.game.score} players={this.props.game.players} />

            <Map showingGame={this.props.showingGame} gameMap={this.props.game.gameMap} selectSquare={this.props.selectSquare} />

          <Chat showingGame={this.props.showingGame} chat={this.props.game.chat} sendMessage={this.props.sendMessage} />

    )
  }
}

export default Game


text:
package pers.hal42.data;

public enum YesnoEnum {
  Yes,
  No,
  NotApplicable

}


text:
package com.jamesmorrisstudios.appbaselibrary;

import android.animation.Animator;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;

import com.jamesmorrisstudios.appbaselibrary.animator.AnimatorControl;
import com.jamesmorrisstudios.appbaselibrary.animator.AnimatorEndListener;
import com.jamesmorrisstudios.appbaselibrary.animator.AnimatorStartListener;
import com.jamesmorrisstudios.appbaselibrary.app.AppBase;
import com.jamesmorrisstudios.appbaselibrary.math.vectors.IntVector2;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * Display orientated display functions
 * <p/>
 * Created by James on 12/8/2015.
 */
public final class UtilsDisplay {

    /**
     * Gets the screensize as an intVector
     * This should work with all devices android 4.0+
     *
     * @return The screensize
     */
    @NonNull
    public static IntVector2 getDisplaySize() {
        int width = 0, height = 0;
        final DisplayMetrics metrics = new DisplayMetrics();
        WindowManager windowManager = (WindowManager) AppBase.getContext().getSystemService(Context.WINDOW_SERVICE);
        Display display = windowManager.getDefaultDisplay();
        Method mGetRawH, mGetRawW;
        try {
            // For JellyBean 4.2 (API 17) and onward
            if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
                display.getRealMetrics(metrics);

                width = metrics.widthPixels;
                height = metrics.heightPixels;
            } else {
                mGetRawH = Display.class.getMethod("getRawHeight");
                mGetRawW = Display.class.getMethod("getRawWidth");

                try {
                    width = (Integer) mGetRawW.invoke(display);
                    height = (Integer) mGetRawH.invoke(display);
                } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) {
                    e.printStackTrace();
                }
            }
        } catch (NoSuchMethodException e3) {
            e3.printStackTrace();
        }
        return new IntVector2(width, height);
    }

    /**
     * Gets the screensize as if the device is in portrait view.
     * If in portrait this and getDisplaySize will return the same thing.
     *
     * @return The screensize formatted as if in portrait
     */
    @NonNull
    public static IntVector2 getDisplaySizeAsPortrait() {
        IntVector2 size = getDisplaySize();
        if (size.y >= size.x) {
            return size;
        } else {
            int x = size.x;
            size.x = size.y;
            size.y = x;
            return size;
        }
    }

    /**
     * Converts a dip value into a pixel value
     * Usually you want to use getDipInt unless you are performing additional calculations with the result.
     *
     * @param dp Dip value
     * @return Pixel value
     */
    public static float getDip(final int dp) {
        return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, AppBase.getContext().getResources().getDisplayMetrics());
    }

    /**
     * Converts a dip value into a pixel value rounded to the nearest int
     * This is typically the desired choice as pixels are only in ints
     *
     * @param dip Dip value
     * @return Pixel value
     */
    public static int getDipInt(final int dip) {
        return Math.round(getDip(dip));
    }

    /**
     * Gets the current device orientation.
     * There are some reports that this may return the wrong result on some devices
     * but I have not found any yet. I may update this will a fallback screensize check
     *
     * @return The device orientation
     */
    @NonNull
    public static Orientation getOrientation() {
        switch (AppBase.getContext().getResources().getConfiguration().orientation) {
            case Configuration.ORIENTATION_UNDEFINED:
                return Orientation.UNDEFINED;
            case Configuration.ORIENTATION_PORTRAIT:
                return Orientation.PORTRAIT;
            case Configuration.ORIENTATION_LANDSCAPE:
                return Orientation.LANDSCAPE;
            default:
                return Orientation.UNDEFINED;
        }
    }

    /**
     * Gets the screen size bucket category
     *
     * @return The screensize
     */
    @NonNull
    public static ScreenSize getScreenSize() {
        int screenLayout = AppBase.getContext().getResources().getConfiguration().screenLayout;
        screenLayout &= Configuration.SCREENLAYOUT_SIZE_MASK;
        switch (screenLayout) {
            case Configuration.SCREENLAYOUT_SIZE_SMALL:
                return ScreenSize.SMALL;
            case Configuration.SCREENLAYOUT_SIZE_NORMAL:
                return ScreenSize.NORMAL;
            case Configuration.SCREENLAYOUT_SIZE_LARGE:
                return ScreenSize.LARGE;
            case Configuration.SCREENLAYOUT_SIZE_XLARGE:
                return ScreenSize.XLARGE;
            default:
                return ScreenSize.UNDEFINED;
        }

    }

    /**
     * Gets the height of the status bar if visible.
     * Must pass in if immersive is enabled as that effects the height.
     *
     * @param immersiveEnabled If immersive mode is enabled
     * @return The height of the status bar in pixels.
     */
    public static int getStatusHeight(final boolean immersiveEnabled) {
        if (immersiveEnabled) {
            return 0;
        } else {
            Resources resources = AppBase.getContext().getResources();
            int result = 0;
            int resourceId = resources.getIdentifier("status_bar_height", "dimen", "android");
            if (resourceId > 0) {
                result = resources.getDimensionPixelSize(resourceId);
            }
            return result;
        }
    }

    /**
     * @return Action bar height
     */
    public static int getActionBarHeight() {
        TypedValue tv = new TypedValue();
        if (AppBase.getContext().getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) {
            return TypedValue.complexToDimensionPixelSize(tv.data, AppBase.getContext().getResources().getDisplayMetrics());
        }
        return 0;
    }

    /**
     * Gets the height of the navigation bar
     *
     * @param immersiveEnabled If immersive mode is enabled
     * @return The height of the navigation bar in pixels.
     */
    public static int getNavigationHeight(final boolean immersiveEnabled) {
        if (immersiveEnabled) {
            return 0;
        } else {
            Resources resources = AppBase.getContext().getResources();
            int id = resources.getIdentifier(
                    getOrientation() == Orientation.PORTRAIT ? "navigation_bar_height" : "navigation_bar_height_landscape",
                    "dimen", "android");
            if (id > 0) {
                return resources.getDimensionPixelSize(id);
            }
            return 0;
        }
    }

    /**
     * Gets the location of the navigation bar.
     * Note that not all devices have an onscreen navigation bar.
     * This will report side for those without so always check the height of the bar before assuming its there.
     *
     * @return The location of the navigation bar
     */
    @NonNull
    public static NavigationBarLocation getNavigationBarLocation() {
        DisplayMetrics displaymetrics = new DisplayMetrics();
        WindowManager windowManager = (WindowManager) AppBase.getContext().getSystemService(Context.WINDOW_SERVICE);
        windowManager.getDefaultDisplay().getMetrics(displaymetrics);
        int viewHeight = displaymetrics.heightPixels;
        if (getDisplaySize().y != viewHeight) {
            return NavigationBarLocation.BOTTOM;
        } else {
            return NavigationBarLocation.SIDE;
        }
    }

    /**
     * Locks the device window in the current mode.
     * If current mode is unspecificed this does nothing.
     */
    public static void lockOrientationCurrent(@NonNull final AppCompatActivity activity) {
        if (getOrientation() == Orientation.PORTRAIT) {
            lockOrientationPortrait(activity);
        } else if (getOrientation() == Orientation.LANDSCAPE) {
            lockOrientationLandscape(activity);
        }
    }

    /**
     * Locks the device window in landscape mode.
     */
    public static void lockOrientationLandscape(@NonNull final AppCompatActivity activity) {
        activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    }

    /**
     * Locks the device window in portrait mode.
     */
    public static void lockOrientationPortrait(@NonNull final AppCompatActivity activity) {
        activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }

    /**
     * Allows user to freely use portrait or landscape mode.
     */
    public static void unlockOrientation(@NonNull final AppCompatActivity activity) {
        activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
    }

    /**
     * Gets the current orientation lock status. Undefined if allowed to rotate freely
     */
    @NonNull
    public static Orientation getOrientationLock(@NonNull final AppCompatActivity activity) {
        switch (activity.getRequestedOrientation()) {
            case ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED:
                return Orientation.UNDEFINED;
            case ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE:
                return Orientation.LANDSCAPE;
            case ActivityInfo.SCREEN_ORIENTATION_PORTRAIT:
                return Orientation.PORTRAIT;
            default:
                return Orientation.UNDEFINED;
        }
    }

    /**
     * Toggles showing the toolbar
     *
     * @param toolbar Toolbar view
     * @param show    True to show, false to hide
     * @param instant True for instant, false to animate
     */
    public static void toggleShowToolbar(@NonNull final View toolbar, final boolean show, final boolean instant) {
        if (instant) {
            if (show) {
                toolbar.setVisibility(View.VISIBLE);
            } else {
                toolbar.setVisibility(View.GONE);
            }
        } else {
            if (show) {
                AnimatorControl.translateYAutoStart(toolbar, -toolbar.getHeight(), 0, 100, 0, AnimatorControl.InterpolatorType.ACCELERLATE_DECELERATE, new AnimatorStartListener() {
                    @Override
                    public void onAnimationStart(Animator animation) {
                        toolbar.setVisibility(View.VISIBLE);
                    }
                });
            } else {
                AnimatorControl.translateYAutoStart(toolbar, 0, -toolbar.getHeight(), 100, 0, AnimatorControl.InterpolatorType.ACCELERLATE_DECELERATE, new AnimatorEndListener() {
                    @Override
                    public void onAnimationEnd(Animator animation) {
                        toolbar.setVisibility(View.GONE);
                    }
                });
            }
        }
    }

    /**
     * Toggles setting the toolbar to overlay mode
     *
     * @param container Toolbar's parent viewGroup
     * @param theme     Activity Theme
     * @param enable    True to enable overlay, false to disable overlay
     */
    /*
    public static void toggleToolbarOverlay(@NonNull ViewGroup container, @NonNull Resources.Theme theme, boolean enable) {
        if (enable) {
            //Padding to 0
            container.setPadding(container.getPaddingLeft(), 0, container.getPaddingTop(), container.getPaddingBottom());
        } else {
            //Padding to actionbarsize
            final TypedArray styledAttributes = theme.obtainStyledAttributes(new int[]{android.R.attr.actionBarSize});
            int mActionBarSize = (int) styledAttributes.getDimension(0, 0);
            styledAttributes.recycle();
            container.setPadding(container.getPaddingLeft(), mActionBarSize, container.getPaddingRight(), container.getPaddingBottom());
        }
    }
    */

    /**
     * Reset immersive mode back to the user set value. This will set it to the opposite value and then back.
     * @param activity Activity
     */
    public static void resetImmersiveMode(@NonNull final AppCompatActivity activity, final boolean hasFocus) {
        if(UtilsAppBase.useImmersiveMode()) {
            updateImmersiveMode(activity, hasFocus, false);
            updateImmersiveMode(activity, hasFocus, true);
        } else {
            updateImmersiveMode(activity, hasFocus, true);
            updateImmersiveMode(activity, hasFocus, false);
        }
    }

    /**
     * Update Immersive mode for the given activity to the user set value
     *
     * @param activity Activity
     * @param hasFocus True if the app has focus, false if not
     */
    public static void updateImmersiveMode(@NonNull final AppCompatActivity activity, final boolean hasFocus) {
        updateImmersiveMode(activity, hasFocus, UtilsAppBase.useImmersiveMode());
    }

    /**
     * Update Immersive mode for the given activity
     *
     * @param activity Activity
     * @param hasFocus True if the app has focus, false if not
     * @param useImmersiveMode true to enable immersive mode and false to disable.
     */
    public static void updateImmersiveMode(@NonNull final AppCompatActivity activity, final boolean hasFocus, boolean useImmersiveMode) {
        int newUiOptions = 0;
        if (useImmersiveMode) {
            if (hasFocus) {
                if (Build.VERSION.SDK_INT >= 16) {
                    newUiOptions |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_FULLSCREEN
                            | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
                }
                if (Build.VERSION.SDK_INT >= 19) {
                    newUiOptions |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
                }
                activity.getWindow().getDecorView().setSystemUiVisibility(newUiOptions);
                activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
            }
        } else {
            if (hasFocus) {
                if (Build.VERSION.SDK_INT >= 16) {
                    newUiOptions |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
                }
                activity.getWindow().getDecorView().setSystemUiVisibility(newUiOptions);
                activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
            }
        }
    }

    /**
     * Device orientations
     */
    public enum Orientation {
        UNDEFINED, PORTRAIT, LANDSCAPE
    }

    /**
     * Android defined screen size categories
     */
    public enum ScreenSize {
        SMALL, NORMAL, LARGE, XLARGE, UNDEFINED
    }

    /**
     * Location of the navigation bar.
     */
    public enum NavigationBarLocation {
        BOTTOM, SIDE
    }

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MCFly.Core.FieldTypes
{
    public class Dropdown : FieldType
    {
        public Dropdown()
        {

            SupportsOptions = true;
            SupportsPlaceholder = false;
        }
    }
}


text:
package org.datanucleus.samples.identity;

import javax.jdo.InstanceCallbacks;

import org.datanucleus.tests.TestObject;

/**
 * SingleField identity using LongIdentity
 *
 * @version $Revision: 1.2 $
 */
public class SingleFieldLongID extends TestObject implements InstanceCallbacks
{
    private long code;

    private String description;

    /**
     * Constructor.
     */
    public SingleFieldLongID()
    {
        super();
    }

    /**
     * @return description
     */
    public String getDescription()
    {
        return description;
    }

    /**
     * @param description
     */
    public void setDescription(String description)
    {
        this.description = description;
    }

    /**
     * @return code
     */
    public long getCode()
    {
        return code;
    }

    /**
     * @param code
     */
    public void setCode(long code)
    {
        this.code = code;
    }

    public void jdoPostLoad()
    {
    }

    public void jdoPreStore()
    {
    }

    public void jdoPreClear()
    {
    }

    public void jdoPreDelete()
    {
    }

    public void fillRandom()
    {
        this.code = r.nextInt();
        fillUpdateRandom();
    }

    public void fillUpdateRandom()
    {
        description = "Description " + this.getClass().toString() + " random: " + String.valueOf(r.nextDouble() * 1000);
    }

    public boolean compareTo(Object obj)
    {
        if (this == obj)
            return true;
        if (!(obj instanceof SingleFieldLongID))
            return false;

        SingleFieldLongID other = (SingleFieldLongID) obj;

        return this.code == other.code && this.description.equals(other.description);
    }

    public String toString()
    {
        StringBuffer s = new StringBuffer(super.toString());

        s.append("  code = ").append(code);
        s.append('\n');
        s.append("  description = ").append(description);
        s.append('\n');
        return s.toString();
    }
}


text:
<?php
/**
 * AddressModelTest
 *
 * PHP version 5
 *
 * @category Class
 * @package  BumbalClient
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * Bumbal Client Api
 *
 * Bumbal API documentation
 *
 * OpenAPI spec version: 2.0
 * Contact: gerb@bumbal.eu
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 *
 */

/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Please update the test case below to test the model.
 */

namespace BumbalClient;

/**
 * AddressModelTest Class Doc Comment
 *
 * @category    Class */
// * @description AddressModel
/**
 * @package     BumbalClient
 * @author      Swagger Codegen team
 * @link        https://github.com/swagger-api/swagger-codegen
 */
class AddressModelTest extends \PHPUnit_Framework_TestCase
{

    /**
     * Setup before running any test case
     */
    public static function setUpBeforeClass()
    {
    }

    /**
     * Setup before running each test case
     */
    public function setUp()
    {
    }

    /**
     * Clean up after running each test case
     */
    public function tearDown()
    {
    }

    /**
     * Clean up after running all test cases
     */
    public static function tearDownAfterClass()
    {
    }

    /**
     * Test "AddressModel"
     */
    public function testAddressModel()
    {
    }

    /**
     * Test attribute "id"
     */
    public function testPropertyId()
    {
    }

    /**
     * Test attribute "address_id"
     */
    public function testPropertyAddressId()
    {
    }

    /**
     * Test attribute "party_id"
     */
    public function testPropertyPartyId()
    {
    }

    /**
     * Test attribute "party_name"
     */
    public function testPropertyPartyName()
    {
    }

    /**
     * Test attribute "code"
     */
    public function testPropertyCode()
    {
    }

    /**
     * Test attribute "summary"
     */
    public function testPropertySummary()
    {
    }

    /**
     * Test attribute "full_name"
     */
    public function testPropertyFullName()
    {
    }

    /**
     * Test attribute "name_1"
     */
    public function testPropertyName1()
    {
    }

    /**
     * Test attribute "name_2"
     */
    public function testPropertyName2()
    {
    }

    /**
     * Test attribute "street_1"
     */
    public function testPropertyStreet1()
    {
    }

    /**
     * Test attribute "street_2"
     */
    public function testPropertyStreet2()
    {
    }

    /**
     * Test attribute "full_addressline"
     */
    public function testPropertyFullAddressline()
    {
    }

    /**
     * Test attribute "house_nr"
     */
    public function testPropertyHouseNr()
    {
    }

    /**
     * Test attribute "house_nr_addendum"
     */
    public function testPropertyHouseNrAddendum()
    {
    }

    /**
     * Test attribute "zipcode"
     */
    public function testPropertyZipcode()
    {
    }

    /**
     * Test attribute "city"
     */
    public function testPropertyCity()
    {
    }

    /**
     * Test attribute "state"
     */
    public function testPropertyState()
    {
    }

    /**
     * Test attribute "iso_country"
     */
    public function testPropertyIsoCountry()
    {
    }

    /**
     * Test attribute "country_name"
     */
    public function testPropertyCountryName()
    {
    }

    /**
     * Test attribute "time_from"
     */
    public function testPropertyTimeFrom()
    {
    }

    /**
     * Test attribute "time_to"
     */
    public function testPropertyTimeTo()
    {
    }

    /**
     * Test attribute "duration"
     */
    public function testPropertyDuration()
    {
    }

    /**
     * Test attribute "address_type_names"
     */
    public function testPropertyAddressTypeNames()
    {
    }

    /**
     * Test attribute "emails"
     */
    public function testPropertyEmails()
    {
    }

    /**
     * Test attribute "phone_nrs"
     */
    public function testPropertyPhoneNrs()
    {
    }

    /**
     * Test attribute "latitude"
     */
    public function testPropertyLatitude()
    {
    }

    /**
     * Test attribute "longitude"
     */
    public function testPropertyLongitude()
    {
    }

    /**
     * Test attribute "contact_person"
     */
    public function testPropertyContactPerson()
    {
    }

    /**
     * Test attribute "user_id"
     */
    public function testPropertyUserId()
    {
    }

    /**
     * Test attribute "links"
     */
    public function testPropertyLinks()
    {
    }

    /**
     * Test attribute "meta_data"
     */
    public function testPropertyMetaData()
    {
    }

    /**
     * Test attribute "notes"
     */
    public function testPropertyNotes()
    {
    }

    /**
     * Test attribute "files"
     */
    public function testPropertyFiles()
    {
    }

    /**
     * Test attribute "tag_names"
     */
    public function testPropertyTagNames()
    {
    }

    /**
     * Test attribute "tags"
     */
    public function testPropertyTags()
    {
    }
}


text:
if(location.host !== 'localhost:3000' && location.host !== '127.0.0.1:3000')
    Meteor.disconnect();

Meteor.startup(function() {

    // SET default language
    if(Cookie.get('TAPi18next')) {
        TAPi18n.setLanguage(Cookie.get('TAPi18next'));
    } else {
        var userLang = navigator.language || navigator.userLanguage,
        availLang = TAPi18n.getLanguages();

        // set default language
        if (_.isObject(availLang) && availLang[userLang]) {
            TAPi18n.setLanguage(userLang);
            // lang = userLang;
        } else if (_.isObject(availLang) && availLang[userLang.substr(0,2)]) {
            TAPi18n.setLanguage(userLang.substr(0,2));
            // lang = userLang.substr(0,2);
        } else {
            TAPi18n.setLanguage('en');
            // lang = 'en';
        }
    }
    // change moment and numeral language, when language changes
    Tracker.autorun(function(){
        if(_.isString(TAPi18n.getLanguage())) {
            moment.locale(TAPi18n.getLanguage().substr(0,2));
            numeral.language(TAPi18n.getLanguage().substr(0,2));
        }
    });

});