text:
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams, ModalController, AlertController } from 'ionic-angular';
import { InitDataProvider } from '../../providers/init-data/init-data';
import { Api } from '../../providers/api/api';
import { ModalService } from '../../services/modalService';
import { HttpClient } from '@angular/common/http';
import *  as $ from 'jquery';
import { Observable } from 'rxjs/Observable';
import { KanJiaUser } from '../../store/types/kanJiaUser.Model';
import { AppService } from '../../services/appService';
declare var WeixinJSBridge: any;
declare var wx: any;

@IonicPage({
  segment: "KanJia/:DetailId",
  defaultHistory: ["TabsPage"]
})
@Component({
  selector: 'page-kanjia',
  templateUrl: 'kanjia.html',
})
export class KanjiaPage {
  _id: number;
  _buyItem: any;
  loading: any;
  _count: number = 1;
  alert: any;

  _kanJiaUser: any;
  _kanJiaUsers: any;
  _shareFromOpenid: string = null;
  _leftTime: { days: number, hours: number, minutes: number, seconds: number } = null;
  pet = 'tab2';
  cutPrice = 0;
  helpIndex = 0;

  payUserinfo = { name: "", telphone: "" };

  kanJiaUser$: Observable<KanJiaUser>;

  helperlogourlList: any = [];
  helperqrlogourlList: any = [];

  constructor(
    public navCtrl: NavController,
    public navParams: NavParams,
    private initData: InitDataProvider,
    private modalService: ModalService,
    private api: Api,
    private modalCtrl: ModalController,
    private alertCtrl: AlertController,
    private http: HttpClient,
    private appService: AppService
  ) {
    this._id = this.navParams.get("DetailId");
    this.init();
  }

  init() {
    this.api.httpGet("getDetail?itemid=" + this._id).subscribe(res => {
      this._buyItem = res;
      if (!this.navParams.get("Self")) {
        this._shareFromOpenid = this.api.getUriParam("sfrom")
      }

      this.helperlogourlList = JSON.parse(this._buyItem.AdminHelpLogoUrl);
      this.helperqrlogourlList = JSON.parse(this._buyItem.AdminHelpQRLogoUrl);

      //console.log(`_shareFromOpenid:${this._shareFromOpenid}`);
      //获取当前WXUSEr是否已参加

      const wait1 = this.api.getWithAuth(`GetKanJiaUser?buyitemId=${this._id}&openid=${this._shareFromOpenid ? this._shareFromOpenid : this.initData.WxUser.openid}`)
        .then(res => {
          if (res !== null) {
            this._kanJiaUser = res;
            this.pet = 'tab1';
          }
          setTimeout(() => {
            this.initShare(this._buyItem);
          }, 1000);
        })
        .catch(err => alert(err));
      this.getKanJiaUsers();
      this.payUserinfo = { name: this.initData.WxUser.RealName, telphone: this.initData.WxUser.Telphone }
    });
  }

  haibao(index = 0) {
    console.log(index);
    this.selctIdx = index;
    let item = this._buyItem;
    this.haibaoImg = `http://m.wjhaomama.com/home/haibao?buyitemid=${item.Id}&openid=${this.initData.WxUser.openid}&index=${index}`
    this.modalService.open("modalHaibao");
  }
  selctIdx = 0;
  haibaoImg: string = "";
  //下拉刷新事件
  doRefresh(refresher) {
    this.init();
    setTimeout(() => {
      refresher.complete();
    }, 500);
  }

  getKanJiaUsers() {
    this.api.getWithAuth(`GetKanJiaUsers?buyitemId=${this._id}`)
      .then(res => {
        //console.log(res);
        if (res !== null) {
          this._kanJiaUsers = res;
        }
      })
      .catch(err => alert(err));
    return;
  }

  fabu() {
    this.navCtrl.push("FabuPage");
  }

  ionViewWillEnter() {
    this.api.visitLog({ page: "KanjiaPage", iid: this._id });

    setInterval(() => {
      if (this._buyItem.DateTimeEnd)
        this._leftTime = this.getRemainTime(this._buyItem.DateTimeEnd);
    }, 1000)
  }

  goShop(shop) {
    // let modal = this.modalCtrl.create("ShopPage", { iid: shop.Id });
    // modal.present();
    this.navCtrl.push("ShopPage", { iid: shop.Id, shop: shop });
  }
  openHelper(index) {
    console.log(index);
    this.helpIndex = index;
    this.modalService.open("modalHelper");
  }

  toHelper() {
    this.modalService.close("modalHelper");
    this.modalService.open("custom-modal-2");
  }
  ionViewWillLeave() {
  }
  ionViewDidLeave() {
  }
  ionViewWillUnload() {
    this.initData.initDefaultShare();
  }

  openModal(id: string) {
    this.modalService.open(id);
  }
  closeModal(id: string) {
    this.modalService.close(id);
  }

  back() {
    this.navCtrl.pop();
  }

  //计算当前是帮砍还是自己
  getType() {
    let _self = "self";
    let _other = "other";
    if (!this._shareFromOpenid)
      return _self;
    if (!this._kanJiaUser)
      return _self;
    if (this._shareFromOpenid == this.initData.WxUser.openid)
      return _self;
    return _other;
  }

  guanzhu() {
    this.openModal('modalMain');
  }

  //我要砍价
  joinKanJia() {
    this.api.postWithAuthToken("JoinKanJia", { buyItemId: this._id }).then(res => {
      this._kanJiaUser = res;
      this.initShare(this._buyItem);
      this.getKanJiaUsers();
      this.modalService.open("modalCut");
    })
      .catch(err => {
        if (err === 'NeedSubscribe') {
          this.modalService.open("modalMain");
          return;
        }
        this.api.showToast(err, 4000, "bottom")
      });
  }

  goOrder() {
    console.log("goOrder")
    this.navCtrl.push("OrderPage");
  }

  //自己参加
  kanSelf() {
    this.navCtrl.pop();
    let modal = this.modalCtrl.create("KanjiaPage", { DetailId: this._id, Self: true });
    modal.present();
  }

  //帮砍按键
  helpKan() {
    this.api.postWithAuthToken("HelpKanJia", { buyItemId: this._id, openid: this._shareFromOpenid })
      .then(res => {
        this._kanJiaUser = res;
        this.modalService.open("modalCut");
        this.getKanJiaUsers();
      })
      .catch(err => {
        if (err === 'NeedSubscribe') {
          this.modalService.open("modalMain");
          return;
        }
        this.api.showToast(err, 3000, "bottom")
      });
  }

  toPay() {
    if (!this._kanJiaUser) {
      this.api.showToast("error:错误的kanjiaUser", 1000, "middle")
      return;
    }
    if (this._kanJiaUser.NowPrice !== this._buyItem.VipPrice) {
      this.api.showToast("请砍至最低价可进行付款", 1000, "middle")
      return;
    }

    this.alert = this.alertCtrl.create({
      title: "正在转至微信支付",
      inputs: [
        {
          name: 'realname',
          placeholder: '联系人',
          value: this.payUserinfo.name
        },
        {
          name: 'telphone',
          placeholder: '手机号',
          value: this.payUserinfo.telphone
        }
      ],
      subTitle: this._buyItem.SuccessText ? this._buyItem.SuccessText : "",
      buttons: [{
        text: '微信支付',
        handler: (data) => {
          if (!/^1(3|4|5|6|7|8|9)[0-9]\d{8}$/i.test(data.telphone)) {
            this.api.showToast("请正确填写手机号", 2000, 'top');
            return false;
          }
          if (!/^.{1,20}$/i.test(data.realname)) {
            this.api.showToast("请正确填写联系人", 2000, 'top');
            return false;
          }
          this.payUserinfo = { name: data.realname, telphone: data.telphone };
          this.http.get<any>(`http://m.wjhaomama.com/TenPayV3/getpay?itemid=${this._buyItem.Id}&count=${this._count}&realname=${data.realname}&telphone=${data.telphone}`
          )
            .subscribe(payRes => {
              if (!payRes.success) {
                this.api.showErrorAlert(payRes.msg);
              }
              else {
                WeixinJSBridge.invoke(
                  'getBrandWCPayRequest', {
                    "appId": payRes.appId,
                    "timeStamp": payRes.timeStamp,
                    "nonceStr": payRes.nonceStr,
                    "package": payRes.package,
                    "signType": payRes.signType,
                    "paySign": payRes.paySign
                  },
                  (wxRes) => {
                    if (wxRes.err_msg == "get_brand_wcpay_request:ok")
                      this.api.showSuccessAlert("支付成功!请尽快至门店验证消费");
                    else if (wxRes.err_msg == "get_brand_wcpay_request:cancel")
                      this.api.showErrorAlert("用户取消支付");
                    else if (wxRes.err_msg == "get_brand_wcpay_request:fail")
                      this.api.showErrorAlert("微信支付失败");
                    this.api.showErrorAlert(wxRes.err_msg);
                  }
                )
              }
            });
        }
      }]
    });
    this.alert.present();
  }

  initShare(buyItem) {
    if (this.initData.WxUser.openid) {
      let title = buyItem.Name;
      if (this._kanJiaUser)
        title = `${this._kanJiaUser.nickname}正在抢购${buyItem.Name}`
      let wxData = {
        title,
        desc: buyItem.ShareDesc,
        imgUrl: buyItem.LogoList[0] + "!w100",
        link: `http://m.wjhaomama.com/?sid=6&sfrom=${this._kanJiaUser ? this._kanJiaUser.openid : this.initData.WxUser.openid}&page=KanjiaPage&iid=${this._id}`
      }
      this.api.wxshare(wxData.title, wxData.desc, wxData.link, wxData.imgUrl);
    }
  }

  getRemainTime = (endTime) => {
    let t = Date.parse(new Date(endTime).toUTCString()) - Date.parse(new Date().toUTCString())
    if (t < 0)
      return null;
    let seconds = Math.floor((t / 1000) % 60)
    let minutes = Math.floor((t / 1000 / 60) % 60)
    let hours = Math.floor((t / (1000 * 60 * 60)) % 24)
    let days = Math.floor(t / (1000 * 60 * 60 * 24))
    return {
      'total': t,
      'days': days,
      'hours': hours,
      'minutes': minutes,
      'seconds': seconds
    }
  }
}


text:
package com.smoothcsv.core.macro.component;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.util.LinkedList;
import java.util.function.Consumer;

import javax.swing.AbstractAction;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import javax.swing.border.Border;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.BadLocationException;

import com.smoothcsv.core.constants.UIConstants;
import com.smoothcsv.framework.component.support.SmoothComponent;
import com.smoothcsv.framework.component.support.SmoothComponentSupport;
import com.smoothcsv.swing.components.LineBreakableTextField;
import lombok.Getter;

/**
 * @author kohii
 */
@SuppressWarnings("serial")
public class MacroConsolePanel extends JPanel implements ActionListener, SmoothComponent {

  @Getter
  private SmoothComponentSupport componentSupport =
      new SmoothComponentSupport(this, "macro-console");

  private LineBreakableTextField inputTextArea;
  private JTextArea consoleTextArea;
  private int maxLineCount = 100;

  private Consumer<String> inputHandler;

  private LinkedList<String> history = new LinkedList<>();
  private int maxHistorySize = 20;
  private int historyIndex = -1;

  public MacroConsolePanel() {
    setBorder(null);
    setBackground(Color.WHITE);
    setLayout(new BorderLayout(0, 0));
    setMinimumSize(new Dimension(20, 20));

    Border border =
        BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.getDefaultBorderColor());

    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setMinimumSize(new Dimension(50, 20));
    scrollPane.setBorder(null);

    consoleTextArea = new JTextArea();
    consoleTextArea.setMargin(new Insets(3, 3, 3, 3));
    consoleTextArea.setTabSize(4);
    consoleTextArea.setLineWrap(true);
    consoleTextArea.setEditable(false);
    // consoleTextArea.setFocusable(false);
    scrollPane.setViewportView(consoleTextArea);
    add(scrollPane, BorderLayout.CENTER);

    JPanel panel = new JPanel();
    panel.setBorder(border);
    panel.setBackground(Color.WHITE);
    add(panel, BorderLayout.SOUTH);
    GridBagLayout gbl_panel = new GridBagLayout();
    gbl_panel.columnWidths = new int[]{0, 0, 0};
    gbl_panel.rowHeights = new int[]{0, 0};
    gbl_panel.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};
    gbl_panel.rowWeights = new double[]{1.0, Double.MIN_VALUE};
    panel.setLayout(gbl_panel);

    JLabel label = new JLabel(">");
    label.setForeground(new Color(0, 128, 128));
    label.setBackground(Color.WHITE);
    GridBagConstraints gbc_label_1 = new GridBagConstraints();
    gbc_label_1.anchor = GridBagConstraints.NORTH;
    gbc_label_1.insets = new Insets(0, 3, 0, 3);
    gbc_label_1.gridx = 0;
    gbc_label_1.gridy = 0;
    panel.add(label, gbc_label_1);

    JScrollPane inputTextAreaScrollPane = new JScrollPane();
    inputTextAreaScrollPane.setMinimumSize(new Dimension(50, 20));
    inputTextAreaScrollPane.setBorder(null);

    inputTextArea = new LineBreakableTextField(true);
    Object upActionName =
        inputTextArea.getInputMap().get(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0));
    Object downActionName =
        inputTextArea.getInputMap().get(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0));
    inputTextArea.setLineWrap(true);
    inputTextArea.setWrapStyleWord(true);
    inputTextArea.setTabSize(4);
    inputTextArea.getDocument().addDocumentListener(new DocumentListener() {
      @Override
      public void removeUpdate(DocumentEvent e) {
        adjustInputTextAreaSize();
      }

      @Override
      public void insertUpdate(DocumentEvent e) {
        adjustInputTextAreaSize();
      }

      @Override
      public void changedUpdate(DocumentEvent e) {
        adjustInputTextAreaSize();
      }
    });
    inputTextArea.addActionListener(this);
    inputTextArea.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0),
        "restore-prev-input");
    inputTextArea.getActionMap().put("restore-prev-input", new AbstractAction() {
      @Override
      public void actionPerformed(ActionEvent e) {
        try {
          int lineCount = inputTextArea.getLineCount();
          if (lineCount == 1) {
            restoreInputFromHistory(-1);
            return;
          } else {
            int caretIndex = inputTextArea.getCaretPosition();
            if (caretIndex < inputTextArea.getLineEndOffset(0)) {
              restoreInputFromHistory(-1);
              return;
            }
          }
        } catch (BadLocationException e1) {
          throw new RuntimeException(e1);
        }
        inputTextArea.getActionMap().get(upActionName).actionPerformed(e);
      }
    });
    inputTextArea.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0),
        "restore-next-input");
    inputTextArea.getActionMap().put("restore-next-input", new AbstractAction() {
      @Override
      public void actionPerformed(ActionEvent e) {
        try {
          int lineCount = inputTextArea.getLineCount();
          if (lineCount == 1) {
            restoreInputFromHistory(+1);
            return;
          } else {
            int caretIndex = inputTextArea.getCaretPosition();
            if (caretIndex >= inputTextArea.getLineEndOffset(lineCount - 2)) {
              restoreInputFromHistory(+1);
              return;
            }
          }
        } catch (BadLocationException e1) {
          throw new RuntimeException(e1);
        }
        inputTextArea.getActionMap().get(downActionName).actionPerformed(e);
      }
    });
    inputTextAreaScrollPane.setViewportView(inputTextArea);
    GridBagConstraints gbc_inputTextArea = new GridBagConstraints();
    gbc_inputTextArea.fill = GridBagConstraints.BOTH;
    gbc_inputTextArea.gridx = 1;
    gbc_inputTextArea.gridy = 0;
    panel.add(inputTextAreaScrollPane, gbc_inputTextArea);

    // SCToolBar toolBar = new SCToolBar();
    // add(toolBar, BorderLayout.NORTH);
  }

  private void adjustInputTextAreaSize() {
    SwingUtilities.invokeLater(new Runnable() {
      @Override
      public void run() {
        Container parent = inputTextArea.getParent().getParent();
        int preferredHeight =
            Math.min(inputTextArea.getLineHeight() * 3, inputTextArea.getPreferredSize().height);
        Dimension size = parent.getSize();
        if (preferredHeight == size.height) {
          return;
        }
        size.height = preferredHeight;
        parent.setPreferredSize(size);
        parent.getParent().revalidate();
      }
    });
  }

  private void restoreInputFromHistory(int direction) {
    int index = historyIndex + direction;
    if (index < 0 || history.size() < index) {
      return;
    }
    if (history.size() == index) {
      inputTextArea.setText("");
    } else {
      inputTextArea.setText(history.get(index));
      if (direction > 0) {
        inputTextArea.setCaretPosition(inputTextArea.getDocument().getLength());
      } else {
        if (inputTextArea.getLineCount() <= 1) {
          inputTextArea.setCaretPosition(inputTextArea.getDocument().getLength());
        } else {
          try {
            inputTextArea.setCaretPosition(inputTextArea.getLineEndOffset(0) - 1);
          } catch (BadLocationException e) {
            throw new RuntimeException(e);
          }
        }
      }
    }
    adjustInputTextAreaSize();
    historyIndex = index;
  }

  @Override
  public void actionPerformed(ActionEvent e) {
    String input = inputTextArea.getText();
    if (inputTextArea.getLineCount() <= 1) {
      consoleTextArea.append("> " + input + '\n');
    } else {
      consoleTextArea.append("> " + input.replaceAll("\r\n|\r|\n", " ") + '\n');
    }
    inputTextArea.setText("");
    adjustInputTextAreaSize();
    if (!input.isEmpty()) {
      history.add(input);
      while (history.size() > maxHistorySize) {
        history.removeFirst();
      }
    }
    historyIndex = history.size();
    if (inputHandler != null) {
      inputHandler.accept(input);
    }
    int lineCount = consoleTextArea.getLineCount();
    if (lineCount > maxLineCount) {
      try {
        int end = consoleTextArea.getLineEndOffset(lineCount - maxLineCount);
        consoleTextArea.replaceRange("", 0, end);
      } catch (BadLocationException e1) {
        throw new RuntimeException(e1);
      }
    }
    scrollToBottom();
    requestFocusInWindow();
  }

  public void append(String str) {
    consoleTextArea.append(str + '\n');
    scrollToBottom();
  }

  public void scrollToBottom() {
    consoleTextArea.setCaretPosition(consoleTextArea.getDocument().getLength());

  }

  public void setInputHandler(Consumer<String> inputHandler) {
    this.inputHandler = inputHandler;
  }

  @Override
  public boolean requestFocusInWindow() {
    return inputTextArea.requestFocusInWindow();
  }
}

redpajama_set_name: RedPajamaGithub


text:
title:  Za globlje proučevanje
date:   12/06/2020
---

Preberi knjigo Clifforda Goldsteina z naslovom 1844 Made Simple (Broise, ID: Pacific Press, 1988), ki je le ena od mnogih na to temo. Glej tudi 1844madesimple.org.

Prouči spodnjo tabelo:

|Daniel 7	|Daniel 8|
|:-----|:----|
|Babilon (lev)|	-------------|
|Medo-Perzija (medved)|Medo-Perzija (oven)|
|Grčija (leopard)|	Grčija (kozel)|
|Poganski Rim (četrta zver)|	Poganski Rim (rog, ki se pomika vodoravno)|
|Papeški Rim (mali rog)	|Papeški Rim (rog, ki se pomika navpično)|
|Sodba v nebesih	|Čiščenje nebeškega svetišča|

Pomembno je opaziti, da sta prizor sodbe iz Dan 7, ki se odvija po 1.260 letih preganjanja, (Dan 7,25) in čiščenje svetišča iz Dan 8,14 ena in ista stvar. Nebeška sodba pelje do vzpostavitve večnega Božjega kraljestva na koncu žalostne zgodovine tega padlega sveta. Tako je dan mogočen svetopisemski dokaz o pomembnosti Dan 8,14 in dogodka, ki ga predstavlja.

**Vprašanja za pogovor**

`1.	Ponovno preberi Dan 2. Ali opaziš, kako jasno je v tem poglavju razodeta zgodovinska (historicistična) metoda: neprekinjeno zaporedje svetovnih kraljestev se začne v starem veku in konča z vzpostavitvijo večnega Božjega kraljestva? Bog je dal ključ za razlago teh prerokb. Kaj dejstvo, da mnogo kristjanov ne uporablja več historicistične metode, pove o današnjem stanju krščanstva? Ali to dejstvo pomaga bolje razumeti veljavnost adventističnega sporočila za ta čas?`

`2.	Kako dobro razumeš prerokbo o 2.300 večerih in jutrih iz Dan 8,14? Če meniš, da je ne razumeš dovolj, si vzemi čas in jo prouči. Morda boš presenečen nad tem, kako utemeljena je adventistična razlaga te prerokbe.`

`3.	Preberi Dan 7,18.21-22.25.27. Kaj se dogaja s svetimi? Kaj jim je storil mali rog in kaj Gospod? Katero dobro sporočilo prinaša sodba svetim? Kaj jim sodba na koncu prinese?`


text:
/* Sasikanth Avancha, Dhiraj Kalamkar (Intel Corp.)
******************************************************************************/

#pragma once

#include <omp.h>
#include <assert.h>
#include <sys/time.h>
#include <string.h>
#include "common.hpp"
#include "check.hpp"
#include "Tensor.hpp"

typedef struct {
  int bdims, tdims;
  int nInput;
  vector<int> nOutput;
  int batch_size;
  int iHeight, iWidth, iDepth;
  int oHeight, oWidth, oDepth;
  int stride_h, stride_w, stride_d;
  int in_data_type, out_data_type;
  int num_threads;
} SplitImplParams;

class SplitImpl
{
  protected:
    SplitImplParams *gp;
    int engine;
    TensorLayoutType top_layout_type, gbot_layout_type;
    void *top_layout, *gbot_layout;
    int bot_compute_engine=-1;
    vector<int> top_compute_engine;

  public:
    SplitImpl(SplitImplParams* gp_, int engine_) : gp(gp_), engine(engine_) {}

    void set_top_compute_engine(int e) { top_compute_engine.push_back(e);}
    void set_bot_compute_engine(int e) { bot_compute_engine = e;}

    virtual void forwardPropagate(TensorBuf *inp, vector<TensorBuf *>& outp, int tid) = 0;
    virtual void backPropagate(vector<TensorBuf *>& deloutp, TensorBuf *delinp, int tid) = 0;

    virtual void forwardPropagate(TensorBuf *inp, vector<TensorBuf *>& outp)
    {
      switch(engine)
      {
        case XSMM:
          forwardPropagate(inp, outp, 0);
          break;
      }
    }

    virtual void backPropagate(vector<TensorBuf*>& deloutp, TensorBuf* delinp)
    {
      switch(engine)
      {
        case XSMM:
          backPropagate(deloutp, delinp, 0);
          break;
      }
    }
};


text:
PREFIX?=staging-k8s.gcr.io
FLAGS=
ARCH?=amd64
GOLANG_VERSION?=1.10
GOLANGCI_VERSION := v1.15.0
HAS_GOLANGCI := $(shell which golangci-lint)

# by default, build the current arch's binary
# (this needs to be pre-include, for some reason)
all: _output/$(ARCH)/metrics-server

# Constants
# =========
ALL_ARCHITECTURES=amd64 arm arm64 ppc64le s390x

# Calculated Variables
# ====================
REPO_DIR:=$(shell pwd)
LDFLAGS=-w $(VERSION_LDFLAGS)
# get the appropriate version information
include hack/Makefile.buildinfo
BASEIMAGE?=gcr.io/distroless/static:latest
# Rules
# =====

.PHONY: all test-unit container container-* clean container-only container-only-* tmpdir push do-push-* sub-push-* lint

# Build Rules
# -----------

pkg/generated/openapi/zz_generated.openapi.go:
	go run vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go --logtostderr -i k8s.io/metrics/pkg/apis/metrics/v1beta1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/version -p github.com/kubernetes-incubator/metrics-server/pkg/generated/openapi/ -O zz_generated.openapi -h $(REPO_DIR)/hack/boilerplate.go.txt -r /dev/null

# building depends on all go files (this is mostly redundant in the face of go 1.10's incremental builds,
# but it allows us to safely write actual dependency rules in our makefile)
src_deps=$(shell find pkg cmd -type f -name "*.go" -and ! -name "zz_generated.*.go")
_output/%/metrics-server: $(src_deps) pkg/generated/openapi/zz_generated.openapi.go
	GOARCH=$* CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o _output/$*/metrics-server github.com/kubernetes-incubator/metrics-server/cmd/metrics-server

# Image Rules
# -----------

# build a container using containerized build (the current arch by default)
container: container-$(ARCH)

container-%: pkg/generated/openapi/zz_generated.openapi.go tmpdir-%
	# Run the build in a container in order to have reproducible builds
	docker run --rm -v $(TEMP_DIR):/build -v $(REPO_DIR):/go/src/github.com/kubernetes-incubator/metrics-server -w /go/src/github.com/kubernetes-incubator/metrics-server golang:$(GOLANG_VERSION) /bin/bash -c "\
		GOARCH=$* CGO_ENABLED=0 go build -ldflags \"$(LDFLAGS)\" -o /build/metrics-server github.com/kubernetes-incubator/metrics-server/cmd/metrics-server"

	# copy the base Dockerfile into the temp dir, and set the base image
	cp deploy/docker/Dockerfile $(TEMP_DIR)
	sed -i -e "s|BASEIMAGE|$(BASEIMAGE)|g" $(TEMP_DIR)/Dockerfile

	# run the actual build
	docker build --pull -t $(PREFIX)/metrics-server-$*:$(VERSION) $(TEMP_DIR)

	# remove our TEMP_DIR, as needed
	rm -rf $(TEMP_DIR)

# build a container using a locally-built binary (the current arch by default)
container-only: container-only-$(ARCH)

container-only-%: _output/$(ARCH)/metrics-server tmpdir-%
	# copy the base Dockerfile and binary into the temp dir, and set the base image
	cp deploy/docker/Dockerfile $(TEMP_DIR)
	cp _output/$*/metrics-server $(TEMP_DIR)
	sed -i -e "s|BASEIMAGE|$(BASEIMAGE)|g" $(TEMP_DIR)/Dockerfile

	# run the actual build
	docker build --pull -t $(PREFIX)/metrics-server-$*:$(VERSION) $(TEMP_DIR)

	# remove our TEMP_DIR, as needed
	rm -rf $(TEMP_DIR)

# Official Container Push Rules
# -----------------------------

# do the actual push for official images
do-push-%:
	# push with main tag
	docker push $(PREFIX)/metrics-server-$*:$(VERSION)

	# push alternate tags
ifeq ($*,amd64)
	# TODO: Remove this and push the manifest list as soon as it's working
	docker tag $(PREFIX)/metrics-server-$*:$(VERSION) $(PREFIX)/metrics-server:$(VERSION)
	docker push $(PREFIX)/metrics-server:$(VERSION)
endif

# do build and then push a given official image
sub-push-%: container-% do-push-% ;

# do build and then push all official images
push: gcr-login $(addprefix sub-push-,$(ALL_ARCHITECTURES)) ;
	# TODO: push with manifest-tool?
	# Should depend on target: ./manifest-tool

# log in to the official container registry
gcr-login:
ifeq ($(findstring gcr.io,$(PREFIX)),gcr.io)
	@echo "If you are pushing to a gcr.io registry, you have to be logged in via 'docker login'; 'gcloud docker push' can't push manifest lists yet."
	@echo "This script is automatically logging you in now with 'gcloud docker -a'"
	gcloud docker -a
endif

# Utility Rules
# -------------

clean:
	rm -rf _output
	rm pkg/generated/openapi/zz_generated.openapi.go

fmt:
	find pkg cmd -type f -name "*.go" | xargs gofmt -s -w

test-unit: pkg/generated/openapi/zz_generated.openapi.go
ifeq ($(ARCH),amd64)
	GOARCH=$(ARCH) go test --test.short -race ./pkg/... $(FLAGS)
else
	GOARCH=$(ARCH) go test --test.short ./pkg/... $(FLAGS)
endif

# set up a temporary director when we need it
# it's the caller's responsibility to clean it up
tmpdir-%:
	$(eval TEMP_DIR:=$(shell mktemp -d /tmp/metrics-server.XXXXXX))
lint:
ifndef HAS_GOLANGCI
	curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin ${GOLANGCI_VERSION}
endif
	golangci-lint run


text:
namespace base {
namespace sequence_manager {

namespace {

TaskQueue::QueuePriority ToTaskQueuePriority(
    SequenceManagerTestDescription::QueuePriority priority) {
  static_assert(TaskQueue::kQueuePriorityCount == 7,
                "Number of task queue priorities has changed in "
                "TaskQueue::QueuePriority.");

  switch (priority) {
    case SequenceManagerTestDescription::BEST_EFFORT:
      return TaskQueue::kBestEffortPriority;
    case SequenceManagerTestDescription::LOW:
      return TaskQueue::kLowPriority;
    case SequenceManagerTestDescription::UNDEFINED:
    case SequenceManagerTestDescription::NORMAL:
      return TaskQueue::kNormalPriority;
    case SequenceManagerTestDescription::HIGH:
      return TaskQueue::kHighPriority;
    case SequenceManagerTestDescription::VERY_HIGH:
      return TaskQueue::kVeryHighPriority;
    case SequenceManagerTestDescription::HIGHEST:
      return TaskQueue::kHighestPriority;
    case SequenceManagerTestDescription::CONTROL:
      return TaskQueue::kControlPriority;
  }
}

}  // namespace

ThreadManager::ThreadManager(base::TimeTicks initial_time,
                             SequenceManagerFuzzerProcessor* processor)
    : processor_(processor) {
  DCHECK(processor_);

  test_task_runner_ = WrapRefCounted(
      new TestMockTimeTaskRunner(TestMockTimeTaskRunner::Type::kBoundToThread));

  DCHECK(!(initial_time - base::TimeTicks()).is_zero())
      << "A zero clock is not allowed as empty base::TimeTicks have a special "
         "value "
         "(i.e. base::TimeTicks::is_null())";

  test_task_runner_->AdvanceMockTickClock(initial_time - base::TimeTicks());

  manager_ =
      SequenceManagerForTest::Create(nullptr, ThreadTaskRunnerHandle::Get(),
                                     test_task_runner_->GetMockTickClock());

  TaskQueue::Spec spec = TaskQueue::Spec("default_task_queue");
  task_queues_.emplace_back(MakeRefCounted<TaskQueueWithVoters>(
      manager_->CreateTaskQueueWithType<TestTaskQueue>(spec)));
}

ThreadManager::~ThreadManager() = default;

base::TimeTicks ThreadManager::NowTicks() {
  return test_task_runner_->GetMockTickClock()->NowTicks();
}

base::TimeDelta ThreadManager::NextPendingTaskDelay() {
  return std::max(base::TimeDelta::FromMilliseconds(0),
                  test_task_runner_->NextPendingTaskDelay());
}

void ThreadManager::AdvanceMockTickClock(base::TimeDelta delta) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  return test_task_runner_->AdvanceMockTickClock(delta);
}

void ThreadManager::ExecuteThread(
    const google::protobuf::RepeatedPtrField<
        SequenceManagerTestDescription::Action>& initial_thread_actions) {
  for (const auto& initial_thread_action : initial_thread_actions) {
    RunAction(initial_thread_action);
  }

  while (NowTicks() < base::TimeTicks::Max()) {
    RunLoop().RunUntilIdle();
    processor_->thread_pool_manager()
        ->AdvanceClockSynchronouslyByPendingTaskDelay(this);
  }

  RunLoop().RunUntilIdle();
  processor_->thread_pool_manager()->ThreadDone();
}

void ThreadManager::RunAction(
    const SequenceManagerTestDescription::Action& action) {
  if (action.has_create_task_queue()) {
    ExecuteCreateTaskQueueAction(action.action_id(),
                                 action.create_task_queue());
  } else if (action.has_set_queue_priority()) {
    ExecuteSetQueuePriorityAction(action.action_id(),
                                  action.set_queue_priority());
  } else if (action.has_set_queue_enabled()) {
    ExecuteSetQueueEnabledAction(action.action_id(),
                                 action.set_queue_enabled());
  } else if (action.has_create_queue_voter()) {
    ExecuteCreateQueueVoterAction(action.action_id(),
                                  action.create_queue_voter());
  } else if (action.has_shutdown_task_queue()) {
    ExecuteShutdownTaskQueueAction(action.action_id(),
                                   action.shutdown_task_queue());
  } else if (action.has_cancel_task()) {
    ExecuteCancelTaskAction(action.action_id(), action.cancel_task());
  } else if (action.has_insert_fence()) {
    ExecuteInsertFenceAction(action.action_id(), action.insert_fence());
  } else if (action.has_remove_fence()) {
    ExecuteRemoveFenceAction(action.action_id(), action.remove_fence());
  } else if (action.has_create_thread()) {
    ExecuteCreateThreadAction(action.action_id(), action.create_thread());
  } else if (action.has_cross_thread_post()) {
    ExecuteCrossThreadPostDelayedTaskAction(action.action_id(),
                                            action.cross_thread_post());
  } else {
    ExecutePostDelayedTaskAction(action.action_id(),
                                 action.post_delayed_task());
  }
}

void ThreadManager::ExecuteCreateThreadAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::CreateThreadAction& action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(&ordered_actions_, action_id,
                                  ActionForTest::ActionType::kCreateThread,
                                  NowTicks());

  processor_->thread_pool_manager()->CreateThread(
      action.initial_thread_actions(), NowTicks());
}

void ThreadManager::ExecuteCreateTaskQueueAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::CreateTaskQueueAction& action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(&ordered_actions_, action_id,
                                  ActionForTest::ActionType::kCreateTaskQueue,
                                  NowTicks());

  TaskQueue::Spec spec = TaskQueue::Spec("test_task_queue");

  TestTaskQueue* chosen_task_queue;
  {
    AutoLock lock(lock_);
    task_queues_.emplace_back(MakeRefCounted<TaskQueueWithVoters>(
        manager_->CreateTaskQueueWithType<TestTaskQueue>(spec)));
    chosen_task_queue = task_queues_.back()->queue.get();
  }
  chosen_task_queue->SetQueuePriority(
      ToTaskQueuePriority(action.initial_priority()));
}

void ThreadManager::ExecutePostDelayedTaskAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::PostDelayedTaskAction& action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(&ordered_actions_, action_id,
                                  ActionForTest::ActionType::kPostDelayedTask,
                                  NowTicks());

  PostDelayedTask(action.task_queue_id(), action.delay_ms(), action.task());
}

void ThreadManager::ExecuteCrossThreadPostDelayedTaskAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::CrossThreadPostDelayedTaskAction&
        action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(
      &ordered_actions_, action_id,
      ActionForTest::ActionType::kCrossThreadPostDelayedTask, NowTicks());

  processor_->thread_pool_manager()
      ->GetThreadManagerFor(action.thread_id())
      ->PostDelayedTask(action.task_queue_id(), action.delay_ms(),
                        action.task());
}

void ThreadManager::PostDelayedTask(
    uint64_t task_queue_id,
    uint32_t delay_ms,
    const SequenceManagerTestDescription::Task& task) {
  // PostDelayedTask could be called cross-thread - therefore we need a
  // refptr to the TestTaskQueue which could potentially be deleted by the
  // thread on which ThreadManager lives.
  scoped_refptr<TestTaskQueue> chosen_task_queue =
      GetTaskQueueFor(task_queue_id)->queue.get();

  std::unique_ptr<Task> pending_task = std::make_unique<Task>(this);

  // TODO(farahcharab) After adding non-nestable/nestable tasks, fix this to
  // PostNonNestableDelayedTask for the former and PostDelayedTask for the
  // latter.
  chosen_task_queue->task_runner()->PostDelayedTask(
      FROM_HERE,
      BindOnce(&Task::Execute, pending_task->weak_ptr_factory_.GetWeakPtr(),
               task),
      base::TimeDelta::FromMilliseconds(delay_ms));

  {
    AutoLock lock(lock_);
    pending_tasks_.push_back(std::move(pending_task));
  }
}

void ThreadManager::ExecuteSetQueuePriorityAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::SetQueuePriorityAction& action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(&ordered_actions_, action_id,
                                  ActionForTest::ActionType::kSetQueuePriority,
                                  NowTicks());

  TestTaskQueue* chosen_task_queue =
      GetTaskQueueFor(action.task_queue_id())->queue.get();
  chosen_task_queue->SetQueuePriority(ToTaskQueuePriority(action.priority()));
}

void ThreadManager::ExecuteSetQueueEnabledAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::SetQueueEnabledAction& action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(&ordered_actions_, action_id,
                                  ActionForTest::ActionType::kSetQueueEnabled,
                                  NowTicks());

  scoped_refptr<TaskQueueWithVoters> chosen_task_queue =
      GetTaskQueueFor(action.task_queue_id());

  if (chosen_task_queue->voters.IsEmpty()) {
    chosen_task_queue->voters.push_back(
        chosen_task_queue->queue.get()->CreateQueueEnabledVoter());
  }

  size_t voter_index = action.voter_id() % chosen_task_queue->voters.size();
  chosen_task_queue->voters[voter_index]->SetVoteToEnable(action.enabled());
}

void ThreadManager::ExecuteCreateQueueVoterAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::CreateQueueVoterAction& action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(&ordered_actions_, action_id,
                                  ActionForTest::ActionType::kCreateQueueVoter,
                                  NowTicks());

  scoped_refptr<TaskQueueWithVoters> chosen_task_queue =
      GetTaskQueueFor(action.task_queue_id());
  chosen_task_queue->voters.push_back(
      chosen_task_queue->queue.get()->CreateQueueEnabledVoter());
}

void ThreadManager::ExecuteShutdownTaskQueueAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::ShutdownTaskQueueAction& action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(&ordered_actions_, action_id,
                                  ActionForTest::ActionType::kShutdownTaskQueue,
                                  NowTicks());

  TestTaskQueue* chosen_task_queue = nullptr;
  size_t queue_index;
  {
    AutoLock lock(lock_);

    // We always want to have a default task queue.
    if (task_queues_.size() > 1) {
      queue_index = action.task_queue_id() % task_queues_.size();
      chosen_task_queue = task_queues_[queue_index]->queue.get();
    }
  }

  if (chosen_task_queue) {
    chosen_task_queue->ShutdownTaskQueue();
    AutoLock lock(lock_);
    task_queues_.erase(task_queues_.begin() + queue_index);
  }
}

void ThreadManager::ExecuteCancelTaskAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::CancelTaskAction& action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(&ordered_actions_, action_id,
                                  ActionForTest::ActionType::kCancelTask,
                                  NowTicks());

  AutoLock lock(lock_);
  if (!pending_tasks_.IsEmpty()) {
    size_t task_index = action.task_id() % pending_tasks_.size();
    pending_tasks_[task_index]->weak_ptr_factory_.InvalidateWeakPtrs();

    // If it is already running, it is a parent task and will be deleted when
    // it is done.
    if (!pending_tasks_[task_index]->is_running_) {
      pending_tasks_.erase(pending_tasks_.begin() + task_index);
    }
  }
}

void ThreadManager::ExecuteInsertFenceAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::InsertFenceAction& action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(&ordered_actions_, action_id,
                                  ActionForTest::ActionType::kInsertFence,
                                  NowTicks());

  scoped_refptr<TestTaskQueue> chosen_task_queue =
      GetTaskQueueFor(action.task_queue_id())->queue.get();

  if (action.position() ==
      SequenceManagerTestDescription::InsertFenceAction::NOW) {
    chosen_task_queue->InsertFence(TaskQueue::InsertFencePosition::kNow);
  } else {
    chosen_task_queue->InsertFence(
        TaskQueue::InsertFencePosition::kBeginningOfTime);
  }
}

void ThreadManager::ExecuteRemoveFenceAction(
    uint64_t action_id,
    const SequenceManagerTestDescription::RemoveFenceAction& action) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);

  processor_->LogActionForTesting(&ordered_actions_, action_id,
                                  ActionForTest::ActionType::kRemoveFence,
                                  NowTicks());

  scoped_refptr<TestTaskQueue> chosen_task_queue =
      GetTaskQueueFor(action.task_queue_id())->queue.get();
  chosen_task_queue->RemoveFence();
}

void ThreadManager::ExecuteTask(
    const SequenceManagerTestDescription::Task& task) {
  base::TimeTicks start_time = NowTicks();

  // We can limit the depth of the nested post delayed action when processing
  // the proto.
  for (const auto& task_action : task.actions()) {
    // TODO(farahcharab) Add run loop to deal with nested tasks later. So far,
    // we are assuming tasks are non-nestable.
    RunAction(task_action);
  }

  base::TimeTicks end_time = NowTicks();

  base::TimeTicks next_time =
      start_time +
      std::max(base::TimeDelta(),
               base::TimeDelta::FromMilliseconds(task.duration_ms()) -
                   (end_time - start_time));

  while (NowTicks() != next_time) {
    processor_->thread_pool_manager()->AdvanceClockSynchronouslyToTime(
        this, next_time);
  }

  processor_->LogTaskForTesting(&ordered_tasks_, task.task_id(), start_time,
                                NowTicks());
}

void ThreadManager::DeleteTask(Task* task) {
  AutoLock lock(lock_);
  size_t i = 0;
  while (i < pending_tasks_.size() && task != pending_tasks_[i].get()) {
    i++;
  }
  if (i < pending_tasks_.size())
    pending_tasks_.erase(pending_tasks_.begin() + i);
}

scoped_refptr<TaskQueueWithVoters> ThreadManager::GetTaskQueueFor(
    uint64_t task_queue_id) {
  AutoLock lock(lock_);
  DCHECK(!task_queues_.IsEmpty());
  return task_queues_[task_queue_id % task_queues_.size()].get();
}

const Vector<SequenceManagerFuzzerProcessor::TaskForTest>&
ThreadManager::ordered_tasks() const {
  return ordered_tasks_;
}

const Vector<SequenceManagerFuzzerProcessor::ActionForTest>&
ThreadManager::ordered_actions() const {
  return ordered_actions_;
}

ThreadManager::Task::Task(ThreadManager* thread_manager)
    : is_running_(false), thread_manager_(thread_manager) {
  DCHECK(thread_manager_);
}

void ThreadManager::Task::Execute(
    const SequenceManagerTestDescription::Task& task) {
  DCHECK_CALLED_ON_VALID_THREAD(thread_manager_->thread_checker_);
  is_running_ = true;
  thread_manager_->ExecuteTask(task);
  thread_manager_->DeleteTask(this);
}

}  // namespace sequence_manager
}  // namespace base


text:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <installed facet="wst.jsdt.web" version="1.0"/>
  <installed facet="jst.web" version="3.1"/>
  <installed facet="java" version="1.8"/>
</faceted-project>


text:
@interface ReadViewController : UIViewController <UIScrollViewDelegate>{
    UIScrollView *scrollView;
}
@property(nonatomic,strong) UIScrollView *scrollView;;
-(void)add;
-(void)dele;
-(void)reloadView;
@end


text:
import React from 'react';
import { shallow } from 'enzyme';
import { expect } from 'chai';
import { OverviewChordDiagram } from 'src/features/diagram/OverviewChordDiagram';

describe('diagram/OverviewChordDiagram', () => {
  it('renders node with correct class name', () => {
    const props = {
      home: {
        features: ['f1'],
        featureById: {
          f1: {
            name: 'F1',
            deps: [],
          }
        },
      },
    };

    const renderedComponent = shallow(
      <OverviewChordDiagram {...props} />
    );

    expect(
      renderedComponent.find('.diagram-overview-chord-diagram').getElement()
    ).to.exist;
  });
});


text:
package org.xsystem.bpmn2.model.collaboration;

import org.xsystem.bpmn2.model.common.Message;
import org.xsystem.bpmn2.model.foundation.BaseElement;
import org.xsystem.bpmn2.model.system.Reference;

/**
 *
 * @author Andrey Timofeev
 */
public interface MessageFlow extends BaseElement{
    public String getName();
    public void setName(String name);

    //sourceRef: InteractionNode
    public Reference<InteractionNode> getSourceRef();
    public void setSourceRef(Reference<InteractionNode> sourceRef);

    //targetRef: InteractionNode
    public Reference<InteractionNode> getTargetRef();
    public void setTargetRef(Reference<InteractionNode> targetRef);

    //messageRef: Message [0..1]
    public Reference<Message> getMessageRef();
    public void setMessageRef(Reference<Message> message);
}


text:
@implementation NSObject (JavaObject)

- (id)clone {
  if (![self conformsToProtocol:@protocol(NSCopying)] &&
      ![self conformsToProtocol:@protocol(NSMutableCopying)]) {
    id exception = [[JavaLangCloneNotSupportedException alloc] init];
#if ! __has_feature(objc_arc)
    [exception autorelease];
#endif
    @throw exception;
  }
  // Deliberately not calling "init" on the cloned object. It is expected that
  // any object implementing Cloneable, and all of it's superclasses, will
  // contain a valid implementation of copyAllFieldsTo as is generated by J2ObjC
  // translation.
  id clone = AUTORELEASE([[self class] alloc]);
  [self copyAllFieldsTo:clone];
  return clone;
}

- (IOSClass *)getClass {
  return [IOSClass classWithClass:[self class]];
}

- (int)compareToWithId:(id)other {
#if __has_feature(objc_arc)
  @throw [[JavaLangClassCastException alloc] init];
#else
  @throw [[[JavaLangClassCastException alloc] init] autorelease];
#endif
  return 0;
}

- (void)notify {
  int result = objc_sync_notify(self);
  if (result == OBJC_SYNC_SUCCESS) {  // Test most likely outcome first.
    return;
  }
  if (result == OBJC_SYNC_NOT_OWNING_THREAD_ERROR) {
    @throw AUTORELEASE([[JavaLangIllegalMonitorStateException alloc] init]);
  } else {
    NSString *msg = [NSString stringWithFormat:@"system error %d", result];
    @throw AUTORELEASE([[JavaLangInternalError alloc] initWithNSString:msg]);
  }
}

- (void)notifyAll {
  int result = objc_sync_notifyAll(self);
  if (result == OBJC_SYNC_SUCCESS) {  // Test most likely outcome first.
    return;
  }
  if (result == OBJC_SYNC_NOT_OWNING_THREAD_ERROR) {
    @throw AUTORELEASE([[JavaLangIllegalMonitorStateException alloc] init]);
  } else {
    NSString *msg = [NSString stringWithFormat:@"system error %d", result];
    @throw AUTORELEASE([[JavaLangInternalError alloc] initWithNSString:msg]);
  }
}

static void doWait(id obj, long long timeout) {
  if (timeout < 0) {
    @throw AUTORELEASE([[JavaLangIllegalArgumentException alloc] init]);
  }
  JavaLangThread *javaThread = [JavaLangThread currentThread];
  int result = OBJC_SYNC_SUCCESS;
  if (!javaThread->interrupted__) {
    assert(javaThread->blocker_ == nil);
    javaThread->blocker_ = obj;
    result = objc_sync_wait(obj, timeout);
    javaThread->blocker_ = nil;
  }
  BOOL wasInterrupted = javaThread->interrupted__;
  javaThread->interrupted__ = NO;
  if (wasInterrupted) {
    @throw AUTORELEASE([[JavaLangInterruptedException alloc] init]);
  }
  if (result == OBJC_SYNC_SUCCESS) {
    return;  // success
  }
  if (result == OBJC_SYNC_TIMED_OUT) {
    return;
  }
  if (result == OBJC_SYNC_NOT_OWNING_THREAD_ERROR) {
    @throw AUTORELEASE([[JavaLangIllegalMonitorStateException alloc] init]);
  } else {
    NSString *msg = [NSString stringWithFormat:@"system error %d", result];
    @throw AUTORELEASE([[JavaLangInternalError alloc] initWithNSString:msg]);
  }
}

- (void)wait {
  doWait(self, 0LL);
}

- (void)waitWithLong:(long long)timeout {
  doWait(self, timeout);
}

- (void)waitWithLong:(long long)timeout withInt:(int)nanos {
  if (nanos < 0) {
    @throw AUTORELEASE([[JavaLangIllegalArgumentException alloc] init]);
  }
  doWait(self, timeout + (nanos == 0 ? 0 : 1));
}

+ (id)throwClassCastException {
  @throw AUTORELEASE([[JavaLangClassCastException alloc] init]);
  return nil;
}

- (void)copyAllFieldsTo:(id)other {
}

- (NSArray *)memDebugStrongReferences {
  return [NSArray array];
}

+ (NSArray *)memDebugStaticReferences {
  return nil;
}

// Unimplemented private methods for java.lang.ref.Reference. The methods'
// implementations are set when swizzling the Reference's referent class.
- (void)_java_lang_ref_original_dealloc {}
- (void)_java_lang_ref_original_release {}

@end


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

<title>Uses of Class javax.naming.directory.SearchControls (Java Platform SE 8 )</title>
<meta name="date" content="2014-12-17">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 8

Prev

Next

Frames

No Frames

All Classes

Uses of Class
javax.naming.directory.SearchControls

Packages that use SearchControls

Package
Description

javax.naming.directory

Extends the <tt>javax.naming</tt> package to provide functionality
for accessing directory services.

javax.naming.event

Provides support for event notification when accessing naming and
directory services.

Uses of SearchControls in javax.naming.directory

Methods in javax.naming.directory with parameters of type SearchControls

Modifier and Type
Method and Description

NamingEnumeration<SearchResult>
InitialDirContext.search(Name name,
      String filterExpr,
      Object[] filterArgs,
      SearchControls cons)

NamingEnumeration<SearchResult>
DirContext.search(Name name,
      String filterExpr,
      Object[] filterArgs,
      SearchControls cons)

Searches in the named context or object for entries that satisfy the
 given search filter.

NamingEnumeration<SearchResult>
InitialDirContext.search(Name name,
      String filter,
      SearchControls cons)

NamingEnumeration<SearchResult>
DirContext.search(Name name,
      String filter,
      SearchControls cons)

Searches in the named context or object for entries that satisfy the
 given search filter.

NamingEnumeration<SearchResult>
InitialDirContext.search(String name,
      String filterExpr,
      Object[] filterArgs,
      SearchControls cons)

NamingEnumeration<SearchResult>
DirContext.search(String name,
      String filterExpr,
      Object[] filterArgs,
      SearchControls cons)

Searches in the named context or object for entries that satisfy the
 given search filter.

NamingEnumeration<SearchResult>
InitialDirContext.search(String name,
      String filter,
      SearchControls cons)

NamingEnumeration<SearchResult>
DirContext.search(String name,
      String filter,
      SearchControls cons)

Searches in the named context or object for entries that satisfy the
 given search filter.

Uses of SearchControls in javax.naming.event

Methods in javax.naming.event with parameters of type SearchControls

Modifier and Type
Method and Description

void
EventDirContext.addNamingListener(Name target,
                 String filter,
                 Object[] filterArgs,
                 SearchControls ctls,
                 NamingListener l)

Adds a listener for receiving naming events fired
 when objects identified by the search filter <tt>filter</tt> and
 filter arguments at the object named by the target are modified.

void
EventDirContext.addNamingListener(Name target,
                 String filter,
                 SearchControls ctls,
                 NamingListener l)

Adds a listener for receiving naming events fired
 when objects identified by the search filter <tt>filter</tt> at
 the object named by target are modified.

void
EventDirContext.addNamingListener(String target,
                 String filter,
                 Object[] filterArgs,
                 SearchControls ctls,
                 NamingListener l)

Adds a listener for receiving naming events fired when
 objects identified by the search filter <tt>filter</tt>
 and filter arguments at the
 object named by the string target name are modified.

void
EventDirContext.addNamingListener(String target,
                 String filter,
                 SearchControls ctls,
                 NamingListener l)

Adds a listener for receiving naming events fired when
 objects identified by the search filter <tt>filter</tt> at the
 object named by the string target name are modified.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 8

Prev

Next

Frames

No Frames

All Classes

 Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2015, Oracle and/or its affiliates.  All rights reserved.


text:
<!DOCTYPE html>

  <title>Detail Admin - UI Elements</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link href="css/bootstrap/bootstrap.css" rel="stylesheet" />
    <link href="css/bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet" />

    <link href="css/lib/jquery-ui-1.10.2.custom.css" rel="stylesheet" type="text/css" />
    <link href="css/lib/font-awesome.css" type="text/css" rel="stylesheet" />
    <link href="css/lib/bootstrap.datepicker.css" type="text/css" rel="stylesheet" />

    <link rel="stylesheet" type="text/css" href="css/compiled/layout.css" />
    <link rel="stylesheet" type="text/css" href="css/compiled/elements.css" />
    <link rel="stylesheet" type="text/css" href="css/compiled/icons.css" />

    <link rel="stylesheet" href="css/compiled/ui-elements.css" type="text/css" media="screen" />

    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css' />

            <button class="navbar-toggle" type="button" data-toggle="collapse" id="menu-toggler">
                Toggle navigation

            </button>

                <input class="search" type="text" />

                    8

You have 6 new notifications

                                 New user registration
                                 13 min.

                                 New user registration
                                 18 min.

                                 New message from Alejandra
                                 28 min.

                                 New user registration
                                 49 min.

                                 New order placed
                                 1 day.

                                View all notifications

Alejandra Galván

                                    There are many variations of available, but the majority have suffered alterations.

                                 13 min.

Alejandra Galván

                                    There are many variations of available, have suffered alterations.

                                 26 min.

Alejandra Galván

                                    There are many variations of available, but the majority have suffered alterations.

                                 48 min.

                                View all messages

                    Your account

Personal info

Account settings

Billing

Export your data

Send feedback

                    Home

                    Charts

                    Users

User list

New user form

User profile

                    Forms

Form showcase

Form wizard

                    Gallery

                    Calendar

                    Tables

Custom tables

DataTables

                    UI Elements

UI Elements

Icons

                    My Info

                    Extras

Code editor

Grids

Sign in

Sign up

                Default

                Dark skin

Flat Buttons

                            .btn-flat.inverse
                            INVERSE BUTTON

                            .btn-flat.white
                            WHITE BUTTON

                            .btn-flat.gray
                            GRAY BUTTON

                            .btn-flat.default
                            DEFAULT BUTTON

                            .btn-flat.primary
                            PRIMARY BUTTON

                            .btn-flat.success
                            SUCCESS BUTTON

                            .btn-flat.info
                            INFO BUTTON

                            .btn-flat.danger
                            DANGER BUTTON

                            <button class="glow left"></button>
                            <button class="glow middle"></button>
                            <button class="glow middle"></button>
                            <button class="glow right"></button>

                            <button class="glow left active">LEFT</button>
                            <button class="glow right">RIGHT</button>

                            <button class="glow left"></button>
                            <button class="glow middle"></button>
                            <button class="glow right"></button>

 Fork me on github

 Icon button

                            <button class="btn glow">Drop down</button>
                            <button class="btn glow dropdown-toggle" data-toggle="dropdown">

                            </button>

Option one

Option two

Option three

Option four

‹

1

2

3

4

›

‹

1

2

3

4

›

                        <input class="search" type="text" placeholder="Search input.." />

                            <button class="btn glow"></button>
                            <button class="btn glow dropdown-toggle" data-toggle="dropdown">

                            </button>

Option one

Option two

Option three

Option four

Switch buttons

                            OFF

                            OFF

                            OFF

Glow buttons

                            .btn-glow
                            Sign up now

                            .btn-glow.inverse
                            Sign up now

                            .btn-glow.primary
                            Sign up now

                            .btn-glow.success
                            Sign up now

Sliders

Bootstrap 3 buttons

                            .btn.btn-default
                            Sign up now

                            .btn.btn-primary
                            Sign up now

                            btn.btn-success
                            Sign up now

                            btn.btn-warning
                            Sign up now

                            btn.btn-info
                            Sign up now

                            btn.btn-danger
                            Sign up now

Bootstrap 3 elements

Dropdown header

Action

Another action

Something else here

Separated link

                          <button type="button" class="btn btn-default">1</button>
                          <button type="button" class="btn btn-default">2</button>
                          <button type="button" class="btn btn-default">3</button>

                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                              Dropdown

                            </button>

Dropdown link

Dropdown link

Home

Profile

Messages

Home tab!

Profile tab!

Messages tab!

                          <button type="button" class="btn btn-success">Action</button>
                          <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">

                          </button>

Action

Another action

Something else here

Separated link

                          <button type="button" class="btn btn-info">Action</button>
                          <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">

                          </button>

Action

Another action

Something else here

Separated link

                          <button type="button" class="btn btn-primary">Action</button>
                          <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">

                          </button>

Action

Another action

Something else here

Separated link

Datepicker inline

Menu

                                Profile
                                My tasks
                                Deals
                                Terms of service
                                Privacy policy

                                    Log out

Settings window

                                        List item
                                        <input type="checkbox" class="check" />

                                        List item
                                        <input type="checkbox" checked="checked" class="check" />

                                        List item
                                        <input type="checkbox" checked="checked" class="check" />

                                        List item
                                        <input type="checkbox" class="check" />

                                        List item
                                        <input type="checkbox" checked="checked" class="check" />

                                        List item
                                        <input type="checkbox" class="check" />

Alerts

                            Do you want to get these resources for as little as $0.70 each?

                             Your order has been placed.

                            Password strength is low.

                            Unexpected error. Please try again later.


text:
require 'slack-ruby-client'
require_relative 'validator'

module DeployChanges

  class Notifier

    attr_reader(
      :git_repo_url,
      :tag_prefix,
      :slack_channel,
      :deploy_job_name,
      :deploy_job_build_number,
      :new_tag_name
    )

    def initialize(&block)
      create_required_objects

      config = build_config(&block)
      set_required_values(config)

      configure_slack
    end

    def send_deploy_changes_notification
      cleanup_repo
      clone_repo
      send_slack_notification
    rescue StandardError => e
      raise e
    ensure
      cleanup_repo
    end

    def git_repo_directory
      @git_repo_directory ||= git_repo_url
                                .split('/')
                                .last
                                .gsub('.git', '')
    end

    private

    attr_writer :new_tag_name
    attr_accessor :validator, :error_raiser, :slack_bot_api_token

    def create_required_objects
      self.error_raiser = ErrorRaiser.new
      self.validator = Validator.new(self, error_raiser)
    end

    def build_config(&block)
      config = OpenStruct.new

      yield config if block_given?

      config
    end

    def set_required_values(config)
      self.git_repo_url = config.git_repo_url || ENV["GIT_REPO_URL"]
      self.tag_prefix = config.tag_prefix || ENV["TAG_PREFIX"]

      self.deploy_job_build_number = config.deploy_job_build_number || ENV["DEPLOY_JOB_BUILD_NUMBER"]
      self.deploy_job_name = config.deploy_job_name || ENV["DEPLOY_JOB_NAME"]

      self.new_tag_name = tag_prefix + deploy_job_build_number

      self.slack_channel = config.slack_channel || ENV["SLACK_CHANNEL"]
      self.slack_bot_api_token = config.slack_bot_api_token || ENV["SLACK_BOT_API_TOKEN"]
    end

    def configure_slack
      validator.validate_slack_api_token(ENV["SLACK_BOT_API_TOKEN"])

      Slack.configure do |config|
        config.token = ENV["SLACK_BOT_API_TOKEN"]
      end
    end

    def send_slack_notification
      slack_client.auth_test

      slack_client.chat_postMessage(
        channel: slack_channel,
        text: deploy_changes_message,
        as_user: true
      )
    end

    def deploy_changes_message
      deploy_changes_array = deploy_changes_list

      message = "*#{deploy_job_name} \##{deploy_job_build_number} changes:*\n"

      message += if deploy_changes_array.empty?
                   " - No changes"
                 else
                   deploy_changes_array
                   .map { |commit_message| " - " + commit_message }
                   .join("\n")
                 end

      puts message

      message
    end

    def deploy_changes_list
      return [] if previous_tag_name.nil? || previous_tag_name.empty?

      deploy_changes_string = deploy_changes_command_output
      return [] unless last_command_successful?

      deploy_changes_string.split("\n")
    end

    def deploy_changes_command_output
      `#{deploy_changes_command}`
    end

    def deploy_changes_command
      validator.validate_new_tag(new_tag_name)

      puts "New tag name: #{new_tag_name}"

      "cd #{git_repo_directory} && git log  --pretty=oneline --no-merges --format=\"%s [%an]\" #{previous_tag_name}...#{new_tag_name}"
    end

    def previous_tag_name
      return @previous_tag_name if @previous_tag_name

      previous_tag = previous_tag_from_tags_list(tags_list)

      puts "Previous tag name: #{previous_tag}"
      @previous_tag_name = previous_tag
    end

    def tags_list
      tags = tags_list_command_output
      tags.split("\n")
        .reverse
        .map { |ref| ref.gsub("refs/tags/", "") }
    end

    def tags_list_command_output
      `cd #{git_repo_directory} && git for-each-ref --sort=taggerdate --format="%(refname)" refs/tags/#{tag_prefix}*`
    end

    def previous_tag_from_tags_list(tags_list)
      tags_list.each_with_index do |tag, index|
        return tags_list[index + 1] if tag == new_tag_name
      end
    end

    def clone_repo
      puts "Cloning from '#{git_repo_url}'"

      `git clone #{git_repo_url}`

      unless last_command_successful? && Dir.exist?(repo_directory_name)
        error_raiser.raise_git_repo_clone_failed_error
      end
    end

    def last_command_successful?
      $CHILD_STATUS.success?
    end

    def cleanup_repo
      return true unless Dir.exist?(git_repo_directory)

      puts "Deleting '#{git_repo_directory}' folder"

      `rm -rf #{git_repo_directory}`
    end

    def git_repo_url=(repo_url)
      validator.validate_repo_url(repo_url)

      @git_repo_url = repo_url
    end

    def tag_prefix=(prefix)
      validator.validate_tag_prefix(prefix)

      @tag_prefix = prefix
    end

    def deploy_job_build_number=(job_build_number)
      validator.validate_deploy_job_build_number(job_build_number)

      @deploy_job_build_number = job_build_number
    end

    def deploy_job_name=(job_name)
      validator.validate_deploy_job_name(job_name)

      @deploy_job_name = job_name
    end

    def slack_channel=(channel_name)
      validator.validate_slack_channel_name(channel_name)

      @slack_channel = channel_name
    end

    def slack_client
      @slack_client ||= Slack::Web::Client.new
    end

  end

end


text:
package org.springframework.web.cors;

import javax.servlet.http.HttpServletRequest;

/**
 * Interface to be implemented by classes (usually HTTP request handlers) that
 * provides a {@link CorsConfiguration} instance based on the provided request.
 *
 * @author Sebastien Deleuze
 * @since 4.2
 */
public interface CorsConfigurationSource {

	/**
	 * Return a {@link CorsConfiguration} based on the incoming request.
	 * @return the associated {@link CorsConfiguration}, or {@code null} if none
	 */
	CorsConfiguration getCorsConfiguration(HttpServletRequest request);

}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Microsoft.Kinect;

namespace KinectV2OSC.Model.Drawing
{
    public class KinectMapper
    {
        private KinectSensor kinectSensor;

        public KinectMapper(KinectSensor kinectSensor)
        {
            this.kinectSensor = kinectSensor;
        }

        public IReadOnlyDictionary<JointType, Point> JointsTo2DPoints(Body body)
        {
            var joints = body.Joints;
            var points = new Dictionary<JointType, Point>();

            foreach (JointType jointType in joints.Keys)
            {
                var depthSpacePoint = this.kinectSensor.CoordinateMapper.MapCameraPointToDepthSpace(joints[jointType].Position);
                points[jointType] = new Point(depthSpacePoint.X, depthSpacePoint.Y);
            }

            return points;
        }
    }
}


text:
title: "The Princess in Black and the Perfect Princess Party"
written_by:
isbn: "9780763665111"
link_to_buy_page:
image_path: "https://ecx.images-amazon.com/images/I/61i0uuziIUL.jpg"
thumbnail_height: "500"
thumbnail_width: "391"
url: "https://www.amazon.com/The-Princess-Black-Perfect-Party/dp/0763665118"
---


text:
package org.apache.maven.project;

import java.io.File;
import java.util.Collections;

import org.apache.maven.artifact.repository.ArtifactRepository;
import org.codehaus.plexus.component.annotations.Component;

@Component(role=ProjectBuilder.class,hint="classpath")
public class TestProjectBuilder
    extends DefaultProjectBuilder
{

    @Override
    public ProjectBuildingResult build( File pomFile, ProjectBuildingRequest configuration )
        throws ProjectBuildingException
    {
        ProjectBuildingResult result = super.build( pomFile, configuration );

        result.getProject().setRemoteArtifactRepositories( Collections.<ArtifactRepository> emptyList() );

        return result;
    }

}


text:
//    Shine is an MP3 encoder
//    Copyright (C) 1999-2000  Gabriel Bouvigne
//
//    This library is free software; you can redistribute it and/or
//    modify it under the terms of the GNU Library General Public
//    License as published by the Free Software Foundation; either
//    version 2 of the License, or (at your option) any later version.
//
//    This library is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//    Library General Public License for more details.

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>

#include "types.h"
#include "error.h"
#include "wave.h"
#include "layer3.h"

#include "AS3.h"

config_t config;

static void print_header()
{
    fprintf(stderr,"Shine 0.1.4");
}

static void set_defaults()
{
    config.byte_order = DetermineByteOrder();
    if(config.byte_order==order_unknown) ERROR("Can't determine byte order");

    config.mpeg.type = 1;
    config.mpeg.layr = 2;
    config.mpeg.mode = (config.wave.channels==1) ? MODE_MONO :MODE_STEREO;
    config.mpeg.bitr = 128;
    config.mpeg.psyc = 2;
    config.mpeg.emph = 0;
    config.mpeg.crc  = 0;
    config.mpeg.ext  = 0;
    config.mpeg.mode_ext  = 0;
    config.mpeg.copyright = 0;
    config.mpeg.original  = 1;
}

static int find_samplerate_index(long freq)
{
    static long mpeg1[3] = {44100, 48000, 32000};
    int i;

    for(i=0;i<3;i++)
        if(freq==mpeg1[i]) return i;

    ERROR("Invalid samplerate");
    return -1;
}

static int find_bitrate_index(int bitr)
{
    static long mpeg1[15] = {0,32,40,48,56,64,80,96,112,128,160,192,224,256,320};
    int i;

    for(i=0;i<15;i++)
        if(bitr==mpeg1[i]) return i;

    ERROR("Invalid bitrate");
    return -1;
}

static void check_config()
{
    static char *mode_names[4]    = { "stereo", "j-stereo", "dual-ch", "mono" };
    static char *layer_names[3]   = { "I", "II", "III" };
    static char *version_names[2] = { "MPEG-II (LSF)", "MPEG-I" };
    static char *psy_names[3]     = { "", "MUSICAM", "Shine" };
    static char *demp_names[4]    = { "none", "50/15us", "", "CITT" };

    config.mpeg.samplerate_index = find_samplerate_index(config.wave.samplerate);
    config.mpeg.bitrate_index    = find_bitrate_index(config.mpeg.bitr);

    fprintf(stderr, "%s layer %s, %s  Psychoacoustic Model: %s",
           version_names[config.mpeg.type],
           layer_names[config.mpeg.layr],
           mode_names[config.mpeg.mode],
           psy_names[config.mpeg.psyc]);
    fprintf(stderr, "Bitrate=%d kbps  ",config.mpeg.bitr );
    fprintf(stderr, "De-emphasis: %s   %s %s\n",
          demp_names[config.mpeg.emph],
          ((config.mpeg.original)?"Original":""),
          ((config.mpeg.copyright)?"(C)":""));

}

// ALCHEMY UTILS

int readByteArray(void *cookie, char *dst, int size)
{
	return AS3_ByteArray_readBytes(dst, (AS3_Val)cookie, size);
}

int writeByteArray(void *cookie, const char *src, int size)
{
	return AS3_ByteArray_writeBytes((AS3_Val)cookie, (char *)src, size);
}

fpos_t seekByteArray(void *cookie, fpos_t offs, int whence)
{
	return AS3_ByteArray_seek((AS3_Val)cookie, offs, whence);
}

int closeByteArray(void * cookie)
{
	AS3_Val zero = AS3_Int(0);

	/* just reset the position */
	AS3_SetS((AS3_Val)cookie, "position", zero);
	AS3_Release(zero);
	return 0;
}

static AS3_Val init(void * self, AS3_Val args)
{
	void * ref;
	void * src;
	void * dest;

	AS3_ArrayValue(args, "AS3ValType, AS3ValType, AS3ValType", &ref, &src, &dest);

	flashErrorsRef = (AS3_Val)ref;

	config.wave.file	= funopen((void *)src, readByteArray, writeByteArray, seekByteArray, closeByteArray);
	config.wave.output	= funopen((void *)dest, readByteArray, writeByteArray, seekByteArray, closeByteArray);

	if (config.wave.file == NULL || config.wave.output == NULL) {
		ERROR("Unable to set bytes arrays");
	}

	wave_open();

	set_defaults();
    check_config();

	start_compress();

	return AS3_Int(1);
}

static AS3_Val update(void* self, AS3_Val args) {

	int statut = update_compress();

	if(statut==100) wave_close();

	return AS3_Int(statut);
}

int main(int argc, char **argv)
{
    print_header();

	// set convert & update methods visible to flash
	AS3_Val convertMethod = AS3_Function( NULL, init );
	AS3_Val updateMethod = AS3_Function( NULL, update );

	AS3_Val result = AS3_Object( "init:AS3ValType, update: AS3ValType", convertMethod, updateMethod );

	AS3_Release( convertMethod );
	AS3_Release( updateMethod );

	// notify that we initialized -- THIS DOES NOT RETURN!
	AS3_LibInit( result );

    return 0;

}


text:
package org.apache.struts2.views.java.simple;

import org.apache.struts2.views.java.TagGenerator;
import org.apache.struts2.views.java.Attributes;
import org.apache.commons.lang3.StringUtils;

import java.io.IOException;
import java.util.Map;

public class SubmitHandler extends AbstractTagHandler implements TagGenerator {

    public void generate() throws IOException {
        Map<String, Object> params = context.getParameters();
        Attributes attrs = new Attributes();

        String type = StringUtils.defaultString((String) params.get("type"), "input");

        if ("button".equals(type)) {
            attrs.addIfExists("name", params.get("name"))
                    .add("type", "submit")
                    .addIfExists("value", params.get("nameValue"))
                    .addIfTrue("disabled", params.get("disabled"))
                    .addIfExists("tabindex", params.get("tabindex"))
                    .addIfExists("id", params.get("id"))
                    .addIfExists("class", params.get("cssClass"))
                    .addIfExists("style", params.get("cssStyle"));

            start("button", attrs);
        } else if ("image".equals(type)) {
            attrs.addIfExists("src", params.get("src"))
                    .add("type", "image")
            		.addIfExists("alt", params.get("label"))
            		.addIfExists("id", params.get("id"))
                    .addIfExists("class", params.get("cssClass"))
            		.addIfExists("style", params.get("cssStyle"));
             start("input", attrs);
        } else {
            attrs.addIfExists("name", params.get("name"))
                    .add("type", "submit")
                    .addIfExists("value", params.get("nameValue"))
                    .addIfTrue("disabled", params.get("disabled"))
                    .addIfExists("tabindex", params.get("tabindex"))
                    .addIfExists("id", params.get("id"))
                    .addIfExists("class", params.get("cssClass"))
                    .addIfExists("style", params.get("cssStyle"));

            start("input", attrs);
        }
    }

    public static class CloseHandler extends AbstractTagHandler implements TagGenerator {
        public void generate() throws IOException {
            Map<String, Object> params = context.getParameters();
            String body = (String) params.get("body");

            String type = StringUtils.defaultString((String) params.get("type"), "input");
            if ("button".equals(type)) {
                //button body
                if (StringUtils.isNotEmpty(body))
                    characters(body, false);
                else if (params.containsKey("label")) {
                    String label = (String) params.get("label");
                    if (StringUtils.isNotEmpty(label))
                        characters(label, false);
                }
                end("button");
            } else if ("image".equals(type)) {
                if (StringUtils.isNotEmpty(body))
                    characters(body, false);
                end("input");
            } else
                end("input");
        }
    }
}


text:
//
//  CJSwitchSliderStatusModel.h
//  CJUIKitDemo
//
//  Created by ciyouzen on 2017/6/26.
//  Copyright © 2017年 dvlproad. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface CJSwitchSliderStatusModel : NSObject

//normalState
@property (nonatomic, strong) UIImage *normalImage;
@property (nonatomic, copy) NSString *normalText;
@property (nonatomic, strong) UIColor *normalColor;

//dragingState
@property (nonatomic, strong) UIImage *dragingImage;
@property (nonatomic, copy) NSString *dragingText;
@property (nonatomic, strong) UIColor *dragingColor;
//@property (nonatomic, assign) BOOL useDragingStatusWhenDraging; /**< 当移动的时候是否使用移动的样式(注:移动时候,又移动回初始0的时候这个位置算为不是移动状态) */

@property (nonatomic, assign) BOOL goNextStepWhenSwitchEventOccur;   /**< 已默认初始化为YES(只对非最后一步有效) */

@end


text:
- **Title:** Remove keys in ansible-libelektra
- **Scope:** ansible-libelektra
- **Level:** User Goal
- **Actors:** User (usually sysadmin)
- **Brief:** It should be possible to remove keys from the KDB using ansible-libelektra

## Scenarios

- **Precondition:** User specifies which key to delete in the playbook
- **Main success scenario:** The key exists on the target machine and will be deleted
- **Alternative scenario:** The key does not exists, nothing will be deleted
- **Error scenario:** -
- **Postcondition:** The specified key does not exist on the target machine
- **Non-functional Constraints:** -


text:
from __future__ import unicode_literals

from django.conf import settings

SEQUENCE = []

if settings.DATABASES['default']['ENGINE'].endswith('mysql'):
    SEQUENCE.append('fields_changed_longtext')

SEQUENCE.extend([
    'rich_text',
    'changedesc_user',
])


text:
import $ from 'jquery';

import curry from 'sonata/util/curry';
import containsSelector from 'sonata/util/containsSelector';

const {map} = Array.prototype;

const containsPlaceholderOption = containsSelector('option[value=""]');

/**
 * @constant
 * @type {RegExp}
 */
const CSS_WIDTH_RX = /width:(auto|(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc)))/i;

/**
 * Return the width for simple and sortable select2 element
 *
 * @param {jQuery} $element The select2 container.
 * @returns {string}
 */
function getSelect2Width ($element) {
    // this code is an adaptation of select2 code (initContainerWidth function)
    let style = $element.attr('style');
    if (style) {
        const rules = style.split(';');
        for (let i = 0, l = rules.length; i < l; i++) {
            const matches = rules[i].replace(/\s/g, '').match(CSS_WIDTH_RX);
            if (matches && matches.length) {
                return matches[1];
            }
        }
    }

    style = $element.css('width');
    if (style.indexOf('%') > 0) {
        return style;
    }

    return '100%';
}

/**
 * Initializes a select2 widget.
 *
 * @param {jQuery} $subject The input/select element.
 */
function createSelect2 ($subject) {
    let allowClearEnabled = false;
    const popover = $subject.data('popover');

    $subject.removeClass('form-control');

    if (containsPlaceholderOption($subject) || $subject.data('sonataSelect2AllowClear')) {
        allowClearEnabled = true;
    }

    $subject.select2({
        width: function () {
            return getSelect2Width(this.element);
        },
        dropdownAutoWidth: true,
        minimumResultsForSearch: 10,
        allowClear: allowClearEnabled
    });

    if (popover) {
        $subject.select2('container').popover(popover.options);
    }
}

/**
 * Convert a choice from Sonata to select2 format
 *
 * @returns {{id: string, label: string}}
 */
const choiceToSelect2 = ({data, label}) => ({id: data, text: label});

const valueToInput = curry((name, index, value) => {
    return $('<input type="hidden"/>').attr('name', `${name}${index}]`).val(value);
});

/**
 * Creates a sortable select2 widget.
 * Choices are passed to the hidden input via data-select2-choices attribute.
 *
 * @param {jQuery} $subject The input/select element.
 */
function createSortableSelect2 ($subject) {
    const choices = map.call($subject.data('select2Choices'), choiceToSelect2);

    $subject.select2({
        width: function () {
            return getSelect2Width(this.element);
        },
        dropdownAutoWidth: true,
        data: choices,
        multiple: true
    });

    $subject.select2('container').find('ul.select2-choices').sortable({
        containment: 'parent',
        start: () => $subject.select2('onSortStart'),
        update: () => $subject.select2('onSortEnd')
    });

    // On form submit, transform value to match what is expected by server
    var $form = $subject.closest('form');
    $form.on('submit', () => {
        const value = $subject.val().trim();
        if (value) {
            const baseName = $subject.attr('name').slice(0, -1);
            const inputs = value.split(',').map(valueToInput(baseName));
            $form.append(inputs);
        }
        $subject.remove();
    });
}

export function setupSelect2 ($subject) {
    $subject
        .find('select:not([data-sonata-select2="false"])')
        .each((i, select) => createSelect2($(select)))
    ;
}

export function setupSortableSelect2 ($subject) {
    $subject
        .find('.sonata-select2-sortable')
        .each((i, sortable) => createSortableSelect2($(sortable)))
    ;
}

/**
 * Initializes all select2 elements in $subject.
 *
 * Exported for BC.
 *
 * @private
 * @param {jQuery} $subject
 */
export default $subject => {
    setupSelect2($subject);
    setupSortableSelect2($subject);
};


text:
/**
 *
 */
package org.flowninja.collector.common.netflow9.types;

/**
 * @author rainer
 *
 */
public class DataFlowRecord {
	FieldType type;
	private Object value;

	public DataFlowRecord(FieldType type, Object value) {
		this.type = type;
		this.value = value;
	}

	/**
	 * @return the type
	 */
	public FieldType getType() {
		return type;
	}

	/**
	 * @return the value
	 */
	public Object getValue() {
		return value;
	}
}


text:
package org.innovateuk.ifs.starters.stubdev;

import lombok.extern.slf4j.Slf4j;
import org.innovateuk.ifs.IfsProfileConstants;
import org.innovateuk.ifs.starters.stubdev.cfg.StubDevConfigurationProperties;
import org.innovateuk.ifs.starters.stubdev.filter.RewriteFilter;
import org.innovateuk.ifs.starters.stubdev.security.StubUidSupplier;
import org.innovateuk.ifs.starters.stubdev.thymeleaf.IfsThymeleafPostProcessorDialect;
import org.innovateuk.ifs.starters.stubdev.util.WarningLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;
import org.thymeleaf.dialect.IDialect;
import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver;
import org.thymeleaf.templatemode.TemplateMode;
import org.thymeleaf.templateresolver.ITemplateResolver;

import javax.annotation.PostConstruct;
import javax.servlet.Filter;
import java.nio.charset.StandardCharsets;

import static org.innovateuk.ifs.starters.stubdev.cfg.StubDevConfigurationProperties.STUB_DEV_PROPS_PREFIX;

/**
 * Auto Configuration for Stub Dev mode. Consists of a number of components, see each for details.
 *
 * Guarantee that we only run in dev by running conditionally on devtools class LiveReloadServer.
 * @ConditionalOnClass(name = "org.springframework.boot.devtools.livereload.LiveReloadServer")
 * @AutoConfigureAfter(name = "org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration")
 *
 */
@Slf4j
@Configuration
@Profile(IfsProfileConstants.STUBDEV)
@EnableConfigurationProperties(StubDevConfigurationProperties.class)
@ConditionalOnClass(name = {"org.springframework.boot.devtools.livereload.LiveReloadServer",
        "org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration"})
@AutoConfigureAfter(name = "org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration")
public class IfsStubDevAutoConfiguration {

    @Autowired
    private StubDevConfigurationProperties stubDevConfigurationProperties;

    @Autowired
    private ApplicationContext applicationContext;

    @PostConstruct
    public void logSettings() {
        log.info("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
        log.info("XXXXXXXXXXXXXXXXXXXXXXXXX STUB DEV XXXXXXXXXXXXXXXXXXXXXXXXX");
        log.info(stubDevConfigurationProperties.toString());
        log.info("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }

    @Bean
    public WarningLogger getScheduled() {
        return new WarningLogger();
    }

    @Bean
    public Filter filter() {
        return new RewriteFilter();
    }

    @Bean
    @ConditionalOnProperty(prefix=STUB_DEV_PROPS_PREFIX, name="validateHtml", havingValue="true")
    public IDialect ifsThymeleafPostProcessorDialect() {
        return new IfsThymeleafPostProcessorDialect();
    }

    /**
     * Sets up serving thymeleaf fragments from web-core filesystem
     * @return the web-core template resolver
     */
    @Bean
    public ITemplateResolver webCoreTemplateResolver() {
        return buildITemplateResolver("WEB_CORE_TEMPLATE_RESOLVER",
                stubDevConfigurationProperties.getProjectRootDirectory()
                        + stubDevConfigurationProperties.getWebCoreTemplates());
    }

    @Bean
    public ITemplateResolver assessmentCommonsResolver() {
        return buildITemplateResolver("ASSESSMENT_COMMONS_TEMPLATE_RESOLVER",
                stubDevConfigurationProperties.getProjectRootDirectory()
                + stubDevConfigurationProperties.getAssessmentCommonsTemplates());
    }

    private ITemplateResolver buildITemplateResolver(String name, String templateDirectory) {
        SpringResourceTemplateResolver resolver = new SpringResourceTemplateResolver();
        resolver.setName(name);
        resolver.setApplicationContext(this.applicationContext);
        resolver.setPrefix(stubDevConfigurationProperties.getProjectRootDirectory()
                + templateDirectory);
        resolver.setSuffix(".html");
        resolver.setTemplateMode(TemplateMode.HTML);
        resolver.setCharacterEncoding(StandardCharsets.UTF_8.name());
        resolver.setCacheable(false);
        resolver.setCheckExistence(true);
        return resolver;
    }

    @Bean
    @Primary
    public StubUidSupplier stubUidSupplier() {
        return new StubUidSupplier();
    }

}


text:
import scala.reflect.macros.blackbox.{Context => BlackboxContext}
import scala.reflect.macros.whitebox.{Context => WhiteboxContext}
import language.experimental.macros

class Logger {
  def error1(message: String): Unit = macro Impls.error1
  def error2(message: String): Unit = macro Impls.error2
}

object Impls {
  type LoggerContext1 = BlackboxContext { type PrefixType = Logger }
  def error1(c: LoggerContext1)(message: c.Expr[String]): c.Expr[Unit] = ???

  type LoggerContext2 = WhiteboxContext { type PrefixType = Logger }
  def error2(c: LoggerContext2)(message: c.Expr[String]): c.Expr[Unit] = ???
}


text:
module Azure::RecoveryServicesBackup::Mgmt::V2016_06_01
  module Models
    #
    # IaaS VM workload-specific backup item representing the Resource Manager
    # VM.
    #
    class AzureIaaSComputeVMProtectedItem < AzureIaaSVMProtectedItem

      include MsRestAzure

      def initialize
        @protectedItemType = "Microsoft.Compute/virtualMachines"
      end

      attr_accessor :protectedItemType

      #
      # Mapper for AzureIaaSComputeVMProtectedItem class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Microsoft.Compute/virtualMachines',
          type: {
            name: 'Composite',
            class_name: 'AzureIaaSComputeVMProtectedItem',
            model_properties: {
              backup_management_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'backupManagementType',
                type: {
                  name: 'Enum',
                  module: 'BackupManagementType'
                }
              },
              workload_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'workloadType',
                type: {
                  name: 'Enum',
                  module: 'DataSourceType'
                }
              },
              source_resource_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'sourceResourceId',
                type: {
                  name: 'String'
                }
              },
              policy_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'policyId',
                type: {
                  name: 'String'
                }
              },
              last_recovery_point: {
                client_side_validation: true,
                required: false,
                serialized_name: 'lastRecoveryPoint',
                type: {
                  name: 'DateTime'
                }
              },
              protectedItemType: {
                client_side_validation: true,
                required: true,
                serialized_name: 'protectedItemType',
                type: {
                  name: 'String'
                }
              },
              friendly_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'friendlyName',
                type: {
                  name: 'String'
                }
              },
              virtual_machine_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'virtualMachineId',
                type: {
                  name: 'String'
                }
              },
              protection_status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'protectionStatus',
                type: {
                  name: 'String'
                }
              },
              protection_state: {
                client_side_validation: true,
                required: false,
                serialized_name: 'protectionState',
                type: {
                  name: 'Enum',
                  module: 'ProtectionState'
                }
              },
              last_backup_status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'lastBackupStatus',
                type: {
                  name: 'String'
                }
              },
              last_backup_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'lastBackupTime',
                type: {
                  name: 'DateTime'
                }
              },
              extended_info: {
                client_side_validation: true,
                required: false,
                serialized_name: 'extendedInfo',
                type: {
                  name: 'Composite',
                  class_name: 'AzureIaaSVMProtectedItemExtendedInfo'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
#ifndef __TileImages2D3D_h_
#define __TileImages2D3D_h_

#include "ITKToolsBase.h"

#include "itkImageSeriesReader.h"
#include "itkImageFileWriter.h"

/** \class TileImages2D3DBase
 *
 * Untemplated pure virtual base class that holds
 * the Run() function and all required parameters.
 */

class ITKToolsTileImages2D3DBase : public itktools::ITKToolsBase
{
public:
  /** Constructor. */
  ITKToolsTileImages2D3DBase()
  {
    this->m_OutputFileName = "";
    this->m_Zspacing = 1.0;
  };
  /** Destructor. */
  ~ITKToolsTileImages2D3DBase(){};

  /** Input member parameters. */
  std::vector<std::string> m_InputFileNames;
  std::string m_OutputFileName;
  double m_Zspacing;

}; // end class ITKToolsTileImages2D3DBase

/** \class ITKToolsTileImages2D3D
 *
 * Templated class that implements the Run() function
 * and the New() function for its creation.
 */

template< class TComponentType >
class ITKToolsTileImages2D3D : public ITKToolsTileImages2D3DBase
{
public:
  /** Standard ITKTools stuff. */
  typedef ITKToolsTileImages2D3D Self;

  static Self * New( itk::ImageIOBase::IOComponentType componentType )
  {
    if( itktools::IsType<TComponentType>( componentType ) )
    {
      return new Self;
    }
    return 0;
  }

  ITKToolsTileImages2D3D(){};
  ~ITKToolsTileImages2D3D(){};

  /** Run function. */
  void Run( void )
  {
    /** Define image type. */
    const unsigned int Dimension = 3;

    /** Some typedef's. */
    typedef itk::Image<TComponentType, Dimension>       ImageType;
    typedef typename ImageType::SpacingType             SpacingType;
    typedef itk::ImageSeriesReader<ImageType>           ImageSeriesReaderType;
    typedef itk::ImageFileWriter<ImageType>             ImageWriterType;

    /** Create reader. */
    typename ImageSeriesReaderType::Pointer reader = ImageSeriesReaderType::New();
    reader->SetFileNames( this->m_InputFileNames );

    /** Update the reader. */
    reader->Update();
    typename ImageType::Pointer tiledImage = reader->GetOutput();

    /** Get and set the spacing, if it was set by the user. */
    if( this->m_Zspacing > 0.0 )
    {
      /** Make sure that changes are not undone. */
      tiledImage->DisconnectPipeline();

      /** Set the zspacing */
      SpacingType spacing = tiledImage->GetSpacing();
      spacing[ 2 ] = this->m_Zspacing;
      tiledImage->SetSpacing( spacing );
    }

    /** Write to disk. */
    typename ImageWriterType::Pointer writer = ImageWriterType::New();
    writer->SetFileName( this->m_OutputFileName.c_str() );
    writer->SetInput( tiledImage );
    writer->Update();

  } // end Run()

}; // end class ITKToolsTileImages2D3D

#endif


text: Accessible dropdwon menu with jQuery librairie


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
  <id>bin</id>
  <formats>
    <format>tar.gz</format>
  </formats>
  <includeBaseDirectory>true</includeBaseDirectory>
  <moduleSets>
    <moduleSet>

      <!-- Enable access to all projects in the current multimodule build! -->
      <useAllReactorProjects>true</useAllReactorProjects>

      <binaries>
        <outputDirectory>lib</outputDirectory>
        <unpack>false</unpack>
        <dependencySets>
          <dependencySet/>
        </dependencySets>
      </binaries>
    </moduleSet>
  </moduleSets>
  <fileSets>
    <!-- Include top level bin directory -->
    <!-- First copy all but the *.cmd files-->
    <fileSet>
      <directory>${project.basedir}/../bin</directory>
      <outputDirectory>bin</outputDirectory>
      <fileMode>0755</fileMode>
      <directoryMode>0755</directoryMode>
    </fileSet>
    <!-- Include top level text files-->
    <fileSet>
      <directory>${project.basedir}/..</directory>
      <outputDirectory>.</outputDirectory>
      <includes>
        <include>LICENSE</include>
        <include>NOTICE</include>
        <include>README.rst</include>
        <include>KEYS</include>
        <include>DISCLAIMER</include>
      </includes>
      <fileMode>0644</fileMode>
    </fileSet>
  </fileSets>
</assembly>


text:
namespace PayStuffWeb.Controllers
{
    using System.Collections.Generic;
    using System.Net;
    using System.Web.Http;

    public class ValuesController : ApiController
    {
        // GET api/values
        public IEnumerable<string> Get()
        {
            return new[] { "value1", "value2" };
        }

        // GET api/values/5
        public string Get(int id)
        {
            throw new HttpResponseException(HttpStatusCode.NotImplemented);
            return "value";
        }

        // POST api/values
        public void Post([FromBody]string value)
        {
        }

        // PUT api/values/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/values/5
        public void Delete(int id)
        {
        }
    }
}