text
stringlengths
2
9.78k
meta
dict
/***************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * $Id: multi-app.c,v 1.3 2003/01/09 11:43:08 bagder Exp $ * * This is an example application source code using the multi interface. */ #include <stdio.h> #include <string.h> /* somewhat unix-specific */ #include <sys/time.h> #include <unistd.h> /* curl stuff */ #include <curl/curl.h> /* * Download a HTTP file and upload an FTP file simultaneously. */ int main(int argc, char **argv) { CURL *http_handle; CURL *ftp_handle; CURLM *multi_handle; int still_running; /* keep number of running handles */ http_handle = curl_easy_init(); ftp_handle = curl_easy_init(); /* set the options (I left out a few, you'll get the point anyway) */ curl_easy_setopt(http_handle, CURLOPT_URL, "http://website.com"); curl_easy_setopt(ftp_handle, CURLOPT_URL, "ftp://ftpsite.com"); curl_easy_setopt(ftp_handle, CURLOPT_UPLOAD, TRUE); /* init a multi stack */ multi_handle = curl_multi_init(); /* add the individual transfers */ curl_multi_add_handle(multi_handle, http_handle); curl_multi_add_handle(multi_handle, ftp_handle); /* we start some action by calling perform right away */ while(CURLM_CALL_MULTI_PERFORM == curl_multi_perform(multi_handle, &still_running)); while(still_running) { struct timeval timeout; int rc; /* select() return code */ fd_set fdread; fd_set fdwrite; fd_set fdexcep; int maxfd; FD_ZERO(&fdread); FD_ZERO(&fdwrite); FD_ZERO(&fdexcep); /* set a suitable timeout to play around with */ timeout.tv_sec = 1; timeout.tv_usec = 0; /* get file descriptors from the transfers */ curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); switch(rc) { case -1: /* select error */ break; case 0: /* timeout, do something else */ break; default: /* one or more of curl's file descriptors say there's data to read or write */ while(CURLM_CALL_MULTI_PERFORM == curl_multi_perform(multi_handle, &still_running)); break; } } curl_multi_cleanup(multi_handle); curl_easy_cleanup(http_handle); curl_easy_cleanup(ftp_handle); return 0; }
{ "pile_set_name": "Github" }
/* * Pro Pinball Series Soundbank (44c, 22c, 11c, 5c) demuxer. * * Copyright (C) 2020 Zane van Iperen (zane@zanevaniperen.com) * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" #include "internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/avassert.h" #include "libavutil/internal.h" #define PP_BNK_MAX_READ_SIZE 4096 #define PP_BNK_FILE_HEADER_SIZE 20 #define PP_BNK_TRACK_SIZE 20 typedef struct PPBnkHeader { uint32_t bank_id; /*< Bank ID, useless for our purposes. */ uint32_t sample_rate; /*< Sample rate of the contained tracks. */ uint32_t always1; /*< Unknown, always seems to be 1. */ uint32_t track_count; /*< Number of tracks in the file. */ uint32_t flags; /*< Flags. */ } PPBnkHeader; typedef struct PPBnkTrack { uint32_t id; /*< Track ID. Usually track[i].id == track[i-1].id + 1, but not always */ uint32_t size; /*< Size of the data in bytes. */ uint32_t sample_rate; /*< Sample rate. */ uint32_t always1_1; /*< Unknown, always seems to be 1. */ uint32_t always1_2; /*< Unknown, always seems to be 1. */ } PPBnkTrack; typedef struct PPBnkCtxTrack { int64_t data_offset; uint32_t data_size; uint32_t bytes_read; } PPBnkCtxTrack; typedef struct PPBnkCtx { int track_count; PPBnkCtxTrack *tracks; uint32_t current_track; } PPBnkCtx; enum { PP_BNK_FLAG_PERSIST = (1 << 0), /*< This is a large file, keep in memory. */ PP_BNK_FLAG_MUSIC = (1 << 1), /*< This is music. */ PP_BNK_FLAG_MASK = (PP_BNK_FLAG_PERSIST | PP_BNK_FLAG_MUSIC) }; static void pp_bnk_parse_header(PPBnkHeader *hdr, const uint8_t *buf) { hdr->bank_id = AV_RL32(buf + 0); hdr->sample_rate = AV_RL32(buf + 4); hdr->always1 = AV_RL32(buf + 8); hdr->track_count = AV_RL32(buf + 12); hdr->flags = AV_RL32(buf + 16); } static void pp_bnk_parse_track(PPBnkTrack *trk, const uint8_t *buf) { trk->id = AV_RL32(buf + 0); trk->size = AV_RL32(buf + 4); trk->sample_rate = AV_RL32(buf + 8); trk->always1_1 = AV_RL32(buf + 12); trk->always1_2 = AV_RL32(buf + 16); } static int pp_bnk_probe(const AVProbeData *p) { uint32_t sample_rate = AV_RL32(p->buf + 4); uint32_t track_count = AV_RL32(p->buf + 12); uint32_t flags = AV_RL32(p->buf + 16); if (track_count == 0 || track_count > INT_MAX) return 0; if ((sample_rate != 5512) && (sample_rate != 11025) && (sample_rate != 22050) && (sample_rate != 44100)) return 0; /* Check the first track header. */ if (AV_RL32(p->buf + 28) != sample_rate) return 0; if ((flags & ~PP_BNK_FLAG_MASK) != 0) return 0; return AVPROBE_SCORE_MAX / 4 + 1; } static int pp_bnk_read_header(AVFormatContext *s) { int64_t ret; AVStream *st; AVCodecParameters *par; PPBnkCtx *ctx = s->priv_data; uint8_t buf[FFMAX(PP_BNK_FILE_HEADER_SIZE, PP_BNK_TRACK_SIZE)]; PPBnkHeader hdr; if ((ret = avio_read(s->pb, buf, PP_BNK_FILE_HEADER_SIZE)) < 0) return ret; else if (ret != PP_BNK_FILE_HEADER_SIZE) return AVERROR(EIO); pp_bnk_parse_header(&hdr, buf); if (hdr.track_count == 0 || hdr.track_count > INT_MAX) return AVERROR_INVALIDDATA; if (hdr.sample_rate == 0 || hdr.sample_rate > INT_MAX) return AVERROR_INVALIDDATA; if (hdr.always1 != 1) { avpriv_request_sample(s, "Non-one header value"); return AVERROR_PATCHWELCOME; } ctx->track_count = hdr.track_count; if (!(ctx->tracks = av_malloc_array(hdr.track_count, sizeof(PPBnkCtxTrack)))) return AVERROR(ENOMEM); /* Parse and validate each track. */ for (int i = 0; i < hdr.track_count; i++) { PPBnkTrack e; PPBnkCtxTrack *trk = ctx->tracks + i; ret = avio_read(s->pb, buf, PP_BNK_TRACK_SIZE); if (ret < 0 && ret != AVERROR_EOF) goto fail; /* Short byte-count or EOF, we have a truncated file. */ if (ret != PP_BNK_TRACK_SIZE) { av_log(s, AV_LOG_WARNING, "File truncated at %d/%u track(s)\n", i, hdr.track_count); ctx->track_count = i; break; } pp_bnk_parse_track(&e, buf); /* The individual sample rates of all tracks must match that of the file header. */ if (e.sample_rate != hdr.sample_rate) { ret = AVERROR_INVALIDDATA; goto fail; } if (e.always1_1 != 1 || e.always1_2 != 1) { avpriv_request_sample(s, "Non-one track header values"); ret = AVERROR_PATCHWELCOME; goto fail; } trk->data_offset = avio_tell(s->pb); trk->data_size = e.size; trk->bytes_read = 0; /* * Skip over the data to the next stream header. * Sometimes avio_skip() doesn't detect EOF. If it doesn't, either: * - the avio_read() above will, or
{ "pile_set_name": "Github" }
'use strict'; var floor = Math.floor; module.exports = function (x) { if (isNaN(x)) return NaN; x = Number(x); if (x === 0) return x; if (x === Infinity) return Infinity; if (x === -Infinity) return -Infinity; if (x > 0) return floor(x); return -floor(-x); };
{ "pile_set_name": "Github" }
FROM golang:1.14 ENV GO111MODULE on WORKDIR /go-std COPY ./src /go-std RUN go get github.com/valyala/quicktemplate/qtc RUN go get -u github.com/mailru/easyjson/... RUN go mod download RUN go generate ./templates RUN easyjson -pkg RUN go build -ldflags="-s -w" -o app . CMD ./app -db pgx
{ "pile_set_name": "Github" }
# ์˜ค๋ธŒ์ ํŠธ ์ฑ…๊ฐˆํ”ผ ![https://wikibook.co.kr/object/](https://wikibook.co.kr/images/cover/l/9791158391409.jpg) [์ฑ…](https://wikibook.co.kr/object/)์€ ๊ธฐ๋Œ€๋งŒํผ ๋„ˆ๋ฌด๋‚˜๋„ ~~์ข‹๋‹ค.~~ ์ข‹์„ ๊ฒƒ์ด๋‹ค.(์•„์ง ๋‹ค ๋ณธ ๊ฑด ์•„๋‹ˆ๋ฏ€๋กœ..) ํ•™์Šต ํšจ๊ณผ์˜ ๊ทน๋Œ€ํ™”๋ฅผ ์œ„ํ•ด ์ฑ…๊ฐˆํ”ผ๋กœ ๋‚จ๊ฒจ๋‘๊ณ  ๊ฐ€๋Šฅํ•˜๋‹ค๋ฉด ์กฐ๊ธˆ ๋‹ค๋ฅธ ์ƒ๊ฐ, ๋‹ค๋ฅธ ํ‘œํ˜„๋„ ๊ณ๋“ค์—ฌ๋ณด์ž. ์ฑ…์˜ ๋‚ด์šฉ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ‘œ์‹œํ•˜๊ณ , >์ฑ… ๋‚ด์šฉ (๊ฑฐ์˜) ๊ทธ๋Œ€๋กœ ๋ง๋ถ™์ด๊ฑฐ๋‚˜ ๋‹ค๋ฅธ ์ƒ๊ฐ์€ - ๋ง๋ถ™์ž„ - ๋‹ค๋ฅธ ์ƒ๊ฐ - ๋‹ค๋ฅธ ํ‘œํ˜„ ์œผ๋กœ ํ‘œ์‹œํ•œ๋‹ค. ๊ฒฉ๋ฆฌ๋ฅผ ์œ„ํ•ด ์‚ฌ์šฉ๋˜๋Š” ์ผ๋ฐ˜์ ์ธ ์˜๋ฏธ์˜ ์ธํ„ฐํŽ˜์ด์Šค๋Š” `์ธํ„ฐํŽ˜์ด์Šค`๋กœ, ์ž๋ฐ”์˜ interface๋Š” `interface`๋กœ ํ‘œ๊ธฐํ•œ๋‹ค. ๊ฐ ์žฅ ์ œ๋ชฉ ๋ฐ”๋กœ ์•„๋ž˜์— **๊ตต์€ ๊ธ€์”จ**๋Š” ์žฅ ๋‚ด์šฉ ์š”์•ฝ์ด ์•„๋‹ˆ๋ผ ํ•ด๋‹น ์žฅ์—์„œ ๋‚ด๊ฐ€ ๊นจ๋‹ฌ์€ ๊ฒƒ์„ ์ ์—ˆ๋‹ค. ## 01. ๊ฐ์ฒด, ์„ค๊ณ„ ### p13 - `Theater.enter(Audience)` ๋ณด๋‹ค๋Š” `Theater.receive(Audience)`๊ฐ€ ๋‚˜์„ ๋“ฏ ### p14 #### ๋ชจ๋“ˆ์˜ 3๊ฐ€์ง€ ๊ธฐ๋Šฅ?์†์„ฑ? by Robert C. Martin >- ์‹คํ–‰ ์ค‘ ์ •์ƒ ๋™์ž‘ >- ๋‚ฎ์€ ๋ณ€๊ฒฝ ๋น„์šฉ >- ๋‚ฎ์€ ์˜์‚ฌ์†Œํ†ต ๋น„์šฉ #### ์‹คํ–‰ ์ค‘ ์ •์ƒ ๋™์ž‘ - ํ…Œ์ŠคํŠธ๋กœ ๋ณด์žฅ #### ๋‚ฎ์€ ๋ณ€๊ฒฝ ๋น„์šฉ - ๋ถˆํ•„์š”ํ•œ ์˜์กด ๊ด€๊ณ„ ์ œ๊ฑฐ๋ฅผ ํ†ตํ•ด ๋‹ฌ์„ฑ - ์˜์กด์˜ ๋ฐ˜๋Œ€๋ง์€ ๋…๋ฆฝ - ์–ธ์ œ ๋…๋ฆฝ ์‹œํ‚ค๋‚˜? ๋ฏฟ์„๋งŒํ•œ ์ž์œจ์„ฑ์ด ์žˆ์„ ๋•Œ - ๋”ฐ๋ผ์„œ **๊ฐ์ฒด์—๊ฒŒ ๋ฏฟ์„๋งŒํ•œ ์ž์œจ์„ฑ์„ ์ค˜์•ผ ๋…๋ฆฝ์‹œํ‚ค๊ณ  ๋ถˆํ•„์š”ํ•œ ์˜์กด ๊ด€๊ณ„๋ฅผ ์ œ๊ฑฐํ•  ์ˆ˜ ์žˆ๋‹ค.** #### ๋‚ฎ์€ ์˜์‚ฌ์†Œํ†ต ๋น„์šฉ - ๊ด€์Šต, ๊ทœ์•ฝ, ํŒจํ„ด - ์ฝ”๋“œ ๋ฆฌ๋ทฐ ### p20 #### ์บก์Аํ™” >๊ฐœ๋…์ ์ด๋‚˜ ๋ฌผ๋ฆฌ์ ์œผ๋กœ ๊ฐ์ฒด ๋‚ด๋ถ€์˜ ์„ธ๋ถ€์ ์ธ ์‚ฌํ•ญ์„ ๊ฐ์ถ”๋Š” ๊ฒƒ์„ **์บก์Аํ™”(encapsulation)** ๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. - ์บก์Аํ™”๋ฅผ ์ž˜ ํ•˜๋ฉด ๊ฐ์ฒด ๋‚ด๋ถ€ ์„ธ๋ถ€ ์‚ฌํ•ญ์ด ๊ฐ์ถฐ์ง€๋Š” ํšจ๊ณผ๊ฐ€ ๋‚˜์ง€๋งŒ, ๊ทธ๋ ‡๋‹ค๊ณ  ์„ธ๋ถ€ ์‚ฌํ•ญ์„ ๊ฐ์ถ”๋Š” ๊ฒƒ์„ ์บก์Аํ™”๋ผ๊ณ  ๋ถ€๋ฅด๋Š” ๊ฒŒ ์ ์ ˆํ•œ๊ฐ€? - ์ด๋ณด๋‹ค๋Š” Holub on Patterns์˜ ์—ญ์ž์ฃผ ๋‚ด์šฉ์„ ์ฐธ๊ณ ํ•ด์„œ ์บก์Аํ™”์™€ ์€๋‹‰์„ ๊ตฌ๋ถ„ํ•˜๋Š” ๊ฒŒ ์ข‹์„ ๋“ฏ - ์บก์Аํ™”(encapsulation) - ๋ฐ์ดํ„ฐ์™€ ์—ฐ์‚ฐ์„ ํ•œ๋ฐ ๋ฌถ์–ด์„œ ์Šค์Šค๋กœ ์ฒ˜๋ฆฌํ•˜๋ฉด์„œ **์ž์œจ์„ฑ ํ™•๋ณด** - ํ˜๋Ÿฌ๋‹ค๋‹ˆ๋Š” ๋ฐ์ดํ„ฐ์˜ ์–‘/์ข…๋ฅ˜์™€ ๊ฒฐํ•ฉ๋„๋Š” ๋ณดํ†ต ๋น„๋ก€ํ•˜๋Š”๋ฐ **๋ฐ์ดํ„ฐ์™€ ์—ฐ์‚ฐ์„ ํ•œ๋ฐ ๋ฌถ์–ด์„œ ๊ฒฐํ•ฉ๋„ ์ฆ๊ฐ€๋ฅผ ๋ง‰์•„์ฃผ๋Š” ์žฅ์น˜** - ์ฃผ๋กœ ํด๋ž˜์Šค์™€ ๊ด€๋ จ์ด ๊นŠ๋‹ค - ์ •๋ณด ๊ฐ์ถค/์ˆจ๊น€/์€๋‹‰(information hiding) - ๋‚ด๋ถ€๋ฅผ ๊ฐ์ถค์œผ๋กœ์จ ์ž์œจ์„ฑ์˜ ํ›ผ์†์„ ๋ฐฉ์ง€ํ•˜๊ณ  - **์ž์œจ์„ฑ ํ›ผ์† ๋ฐฉ์ง€๋ฅผ ํ†ตํ•ด ๊ฒฐํ•ฉ๋„ ์ฆ๊ฐ€๋ฅผ ๋ง‰์•„์ฃผ๋Š” ์žฅ์น˜** - ์ฃผ๋กœ ์ ‘๊ทผ ์ง€์ •์ž(public, protected, private ๋“ฑ) ๋ฐ ์ธํ„ฐํŽ˜์ด์Šค์™€ ๊ด€๋ จ์ด ๊นŠ๋‹ค ### p25 #### ๊ฐ์ฒด ์ง€ํ–ฅ ์„ค๊ณ„ ๊ฐœ์„  ๋ฐฉํ–ฅ >์šฐ๋ฆฌ๋Š” ๊ฐ์ฒด์˜ ์ž์œจ์„ฑ์„ ๋†’์ด๋Š” ๋ฐฉํ–ฅ์œผ๋กœ ์„ค๊ณ„๋ฅผ ๊ฐœ์„ ํ–ˆ๋‹ค. ๊ทธ ๊ฒฐ๊ณผ ์ดํ•ดํ•˜๊ธฐ ์‰ฝ๊ณ  ์œ ์—ฐํ•œ ์„ค๊ณ„๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์—ˆ๋‹ค. ### p26 #### ์‘์ง‘๋„ >๋ฐ€์ ‘ํ•˜๊ฒŒ ์—ฐ๊ด€๋œ ์ž‘์—…๋งŒ์„ ์ˆ˜ํ–‰ํ•˜๊ณ  ์—ฐ๊ด€์„ฑ ์—†๋Š” ์ž‘์—…์€ ๋‹ค๋ฅธ ๊ฐ์ฒด์—๊ฒŒ ์œ„์ž„ํ•˜๋Š” ๊ฐ์ฒด๋ฅผ ๊ฐ€๋ฆฌ์ผœ ์‘์ง‘๋„(cohesion)๊ฐ€ ๋†’๋‹ค๊ณ  ๋งํ•œ๋‹ค. - ์‘์ง‘๋„์— ์œ„์ž„ ๊ฐœ๋…์ด ๋ฐ˜๋“œ์‹œ ๋“ค์–ด๊ฐ€์•ผํ• ๊นŒ? - ๊ฐ์ฒด ์ž์‹ ์ด ์†Œ์œ ํ•˜๊ณ  ์žˆ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ๋งŽ์ด ํ™œ์šฉํ•˜๋ฉด์„œ ๋™์ž‘ํ•˜๋Š” ๊ฐ์ฒด๋Š” ์œ„์ž„ํ•˜์ง€ ์•Š๋”๋ผ๋„ ์‘์ง‘๋„๊ฐ€ ๋†’๋‹ค. - ์†Œ์œ ํ•˜๊ณ  ์žˆ์ง€๋งŒ ํ™œ์šฉ๋˜์ง€ ์•Š๋Š” ๋ฐ์ดํ„ฐ๊ฐ€ ๋งŽ์œผ๋ฉด ์‘์ง‘๋„๊ฐ€ ๋‚ฎ์•„์ง€๋ฉฐ, ์ด๋ฅผ ์†Œ์œ ํ•˜์ง€ ์•Š๊ณ  ์™ธ๋ถ€
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>IndirectFitTab</class> <widget class="QWidget" name="IndirectFitTab"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>513</width> <height>454</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="MantidQt::CustomInterfaces::IDA::IndirectDockWidgetArea" name="dockArea" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> </widget> </item> <item> <widget class="QFrame" name="frame"> <layout class="QVBoxLayout" name="verticalLayout_3"> <property name="spacing"> <number>0</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <layout class="QHBoxLayout" name="loSpectrumView" stretch="0"> <property name="topMargin"> <number>0</number> </property> <item> <widget class="MantidQt::CustomInterfaces::IDA::IndirectSpectrumSelectionView" name="svSpectrumView" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <horstretch>1</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> <width>0</width> <height>0</height> </size> </property> </widget> </item> </layout> </item> <item> <widget class="QGroupBox" name="gbRun"> <property name="title"> <string>Run</string> </property> <layout class="QHBoxLayout" name="horizontalLayout"> <property name="topMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>7</number> </property> <item> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> <item> <widget class="QPushButton" name="pbRun"> <property name="text"> <string>Run</string> </property> </widget> </item> <item> <spacer name="horizontalSpacer_2"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </widget> </item> <item> <widget class="MantidQt::CustomInterfaces::IDA::IndirectFitOutputOptionsView" name="ovOutputOptionsView" native="true"/> </item> </layout> </widget> </item> </layout> </widget> <customwidgets> <customwidget> <class>MantidQt::CustomInterfaces::IDA::IndirectSpectrumSelectionView</class> <extends>QWidget</extends> <header>IndirectSpectrumSelectionView.h</header> <container>1</container> </customwidget> <customwidget> <class>MantidQt::CustomInterfaces::IDA::IndirectFitOutputOptionsView</class> <extends>QWidget</extends> <header>IndirectFitOutputOptionsView.h</header> <container>1</container> </customwidget> <customwidget> <class>MantidQt::CustomInterfaces::IDA::IndirectDockWidgetArea</class> <extends>QWidget</extends> <header>IndirectDockWidgetArea.h</header> <container>1</container> </customwidget> </customwidgets> <resources/> <connections/> </ui>
{ "pile_set_name": "Github" }
# Festplatte ![01010011 01110000 01100001 01100011 01100101.](oredict:oc:hdd1) Die Festplatten haben mehr Speicherplatz als andere OpenComputers-Speichermedien. Alle Medien arbeiten gleich schnell, haben allerdings unterschiedliche SpeicherplatzgrรถรŸen. Es gibt auch Gerรคte die nur Disketten verwenden. Festplatten kรถnnen in einem [RAID](../block/raid.md) platziert werden, um Gerรคten das Teilen des selben Dateisystems zu ermรถglichen. Wenn eine Festplatte in einem RAID platziert werden, werden allerdings die Daten gelรถscht.
{ "pile_set_name": "Github" }
# SPDX-License-Identifier: GPL-2.0 # # Makefile for the Atmel network device drivers. # macb-y := macb_main.o ifeq ($(CONFIG_MACB_USE_HWSTAMP),y) macb-y += macb_ptp.o endif obj-$(CONFIG_MACB) += macb.o obj-$(CONFIG_MACB_PCI) += macb_pci.o
{ "pile_set_name": "Github" }
680x0bin.txt Instruction set of the 680x0 in binary order 1988/WJvG 0 1 2 3 0000 000000 aaaaaa 00000000 dddddddd ori.b #datab,a 0000 000000 111100 00000000 dddddddd ori.b #datab,ccr 0000 000001 aaaaaa dddddddd dddddddd ori.w #dataw,a 0000 000001 111100 dddddddd dddddddd ori.w #dataw,sr (sup) 0000 000010 aaaaaa longword ori.l #datal,a 0000 000011 aaaaaa nnnn0000 00000000 cmp2.b a,Rn (020) 0000 000011 aaaaaa nnnn1000 00000000 chk2.b a,Rn (020) 0000 001000 aaaaaa 00000000 dddddddd andi.b #datab,a 0000 001000 111100 00000000 dddddddd andi.b #datab,ccr 0000 001001 aaaaaa dddddddd dddddddd andi.w #dataw,a 0000 001001 111100 dddddddd dddddddd andi.w #dataw,sr (sup) 0000 001010 aaaaaa longword andi.l #datal,a 0000 001011 aaaaaa nnnn0000 00000000 cmp2.w a,Rn (020) 0000 001011 aaaaaa nnnn1000 00000000 chk2.w a,Rn (020) 0000 010000 aaaaaa 00000000 dddddddd subi.b #datab,a 0000 010001 aaaaaa dddddddd dddddddd subi.w #dataw,a 0000 010010 aaaaaa longword subi.l #datal,a 0000 010011 aaaaaa nnnn0000 00000000 cmp2.l a,Rn (020) 0000 010011 aaaaaa nnnn1000 00000000 chk2.l a,Rn (020) 0000 011000 aaaaaa 00000000 dddddddd addi.b #datab,a 0000 011001 aaaaaa dddddddd dddddddd addi.w #dataw,a 0000 011010 aaaaaa longword addi.l #datal,a 0000 011011 00nnnn rtm Rn (020) 0000 011011 aaaaaa 00000000 dddddddd callm #data8,a (020) 0000 100000 aaaaaa 00000000 000bbbbb btst #bitnr,a 0000 100001 aaaaaa 00000000 000bbbbb bchg #bitnr,a 0000 100010 aaaaaa 00000000 000bbbbb bclr #bitnr,a 0000 100011 aaaaaa 00000000 000bbbbb bset #bitnr,a 0000 101000 aaaaaa 00000000 dddddddd eori.b #datab,a 0000 101000 111100 00000000 dddddddd eori.b #datab,ccr 0000 101001 aaaaaa dddddddd dddddddd eori.w #dataw,a 0000 101001 111100 dddddddd dddddddd eori.w #dataw,sr (sup) 0000 101010 aaaaaa longword eori.l #datal,a 0000 101011 aaaaaa 0000000u uu000ccc cas.b Dc,Du,ea (020) 0000 101011 111100 nnnn000u uu000ccc cas2.b Dc1:Dc2,Du1:Du2, nnnn000u uu000ccc (Rn):(Rn) (020) 0000 1100zz aaaaaa cmpi.z #dataz,a 0000 110011 aaaaaa 0000000u uu000ccc cas.w Dc,Du,ea (020) 0000 110011 111100 nnnn000u uu000ccc cas2.w Dc1:Dc2,Du1:Du2, nnnn000u uu000ccc (Rn):(Rn) (020) 0000 1110zz aaaaaa nnnn0000 00000000 moves.z a,Rn (010,sup) 0000 1110zz aaaaaa nnnn1000 00000000 moves.z Rn,a (010,sup) 0000 111011 aaaaaa 0000000u uu000ccc cas.l Dc,Du,ea (020) 0000 111011 111100 nnnn000u uu000ccc cas2.l Dc1:Dc2,Du1:Du2, nnnn000u uu000ccc (Rn):(Rn) (020) 0000 nnn100 aaaaaa btst Dn,a 0000 nnn101 aaaaaa bchg Dn,a 0000 ddd10z 001sss dddddddd dddddddd movep.z data16(As),Dd 0000 nnn110 aaaaaa bclr Dn,a 0000 nnn111 aaaaaa bset Dn,a 0000 sss11z 001ddd dddddddd dddddddd movep.z Ds,data16(Ad) 0001 dddddd ssssss move.b as,ad (dddddd reversed) 0010 dddddd ssssss move.l as,ad (dddddd reversed) 0010 ddd001 ssssss movea.l as,Ad 0011 dddddd ssssss move.w as,ad (dddddd reversed) 0011 ddd001 ssssss movea.w as,Ad 0100 0000zz aaaaaa negx.z a 0100 000011 aaaaaa move SR,a (010,sup) 0100 0010zz aaaaaa clr.z a 0100 001011 aaaaaa move CCR,a (010) 0100 0100zz aaaaaa neg.z a 0100 010011 aaaaaa move a,CCR 0100 0110zz aaaaaa not.z a 0100 011011 aaaaaa move a,SR (sup) 0100 100000 aaaaaa nbcd a 0100 100000 001nnn dddddddd dddddddd link An,#disp32.l (020) dddddddd dddddddd 0100 100001 000nnn swap Dn 0100 100001 001vvv bkpt #vector (010) 0100 100001 aaaaaa pea a 0100 10001z 000nnn ext.z Dn 0100 10001z aaaaaa a6543210 d6543210 movem.z reg-list,a (rev in pred mode) 0100 1010zz aaaaaa tst.z a 0100 101011 aaaaaa tas a 0100 101011 111100 illegal 0100 101011 111010 bgnd (cpu32) 0100 110000 aaaaaa 0lll0000 0000hhhh mulu.l a,Dl (020) 0100 110000 aaaaaa 0lll0100 0000hhhh mulu.q a,Dh:Dl (020) 0100 110000 aaaaaa 0lll1000 0000hhhh muls.l a,Dl (020) 0100 110000 aaaaaa 0lll1100 0000hhhh muls.q a,Dh:Dl (020) 0100 110001 aaaaaa 0qqq0000 00000rrr divu.l a,Dq (020) 0100 110001 aaaaaa 0qqq0100 00000rrr divu.q a,Dr:Dq (020) 0100 110001 aaaaaa 0qqq1000 00000rrr divs.l a,Dq (020) 0100 110001 aaaaaa 0qqq1100 00000rrr divs.q a,Dr:Dq (020) 0100 11001z aaaaaa a6543210 d6543210 movem.z a,reg-list (rev in pred mode) 0100 111001 00vvvv trap #vector 0100 111001 010nnn dddddddd ddddddd
{ "pile_set_name": "Github" }
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | https://www.mrpt.org/ | | | | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file | | See: https://www.mrpt.org/Authors - All rights reserved. | | Released under BSD License. See: https://www.mrpt.org/License | +------------------------------------------------------------------------+ */ #pragma once #include <mrpt/bayes/CProbabilityParticle.h> #include <mrpt/random.h> namespace mrpt { /// \ingroup mrpt_bayes_grp namespace bayes { /** A base class for implementing rejection sampling in a generic state space. * See the main method CRejectionSamplingCapable::rejectionSampling * To use this class, create your own class as a child of this one and * implement the desired * virtual methods, and add any required internal data. * \ingroup mrpt_bayes_grp */ template < class TStateSpace, mrpt::bayes::particle_storage_mode STORAGE = mrpt::bayes::particle_storage_mode::POINTER> class CRejectionSamplingCapable { public: using TParticle = CProbabilityParticle<TStateSpace, STORAGE>; /** Virtual destructor */ virtual ~CRejectionSamplingCapable() = default; /** Generates a set of N independent samples via rejection sampling. * \param desiredSamples The number of desired samples to generate * \param outSamples The output samples. * \param timeoutTrials The maximum number of rejection trials for each * generated sample (i.e. the maximum number of iterations). This can be * used to set a limit to the time complexity of the algorithm for difficult * probability densities. * All will have equal importance weights (a property of rejection * sampling), although those samples * generated at timeout will have a different importance weights. */ void rejectionSampling( size_t desiredSamples, std::vector<TParticle>& outSamples, size_t timeoutTrials = 1000) { MRPT_START TStateSpace x; typename std::vector<TParticle>::iterator it; // Set output size: if (outSamples.size() != desiredSamples) { // Free old memory: outSamples.clear(); // Reserve new memory: outSamples.resize(desiredSamples); for (it = outSamples.begin(); it != outSamples.end(); ++it) it->d.reset(new TStateSpace); } // Rejection sampling loop: double acceptanceProb; for (it = outSamples.begin(); it != outSamples.end(); ++it) { size_t timeoutCount = 0; double bestLik = -1e250; TStateSpace bestVal; do { RS_drawFromProposal(*it->d); acceptanceProb = RS_observationLikelihood(*it->d); ASSERT_(acceptanceProb >= 0 && acceptanceProb <= 1); if (acceptanceProb > bestLik) { bestLik = acceptanceProb; bestVal = *it->d; } } while (acceptanceProb < mrpt::random::getRandomGenerator().drawUniform( 0.0, 0.999) && (++timeoutCount) < timeoutTrials); // Save weights: if (timeoutCount >= timeoutTrials) { it->log_w = log(bestLik); *it->d = bestVal; } else { it->log_w = 0; // log(1.0); } } // end for it MRPT_END } protected: /** Generates one sample, drawing from some proposal distribution. */ virtual void RS_drawFromProposal(TStateSpace& outSample) = 0; /** Returns the NORMALIZED observation likelihood (linear, not * exponential!!!) at a given point of the state space (values in the range * [0,1]). */ virtual double RS_observationLikelihood(const TStateSpace& x) = 0; }; // End of class def. } // namespace bayes } // namespace mrpt
{ "pile_set_name": "Github" }
<?php namespace Kirby\Cms; use PHPUnit\Framework\TestCase; class AppLanguagesTest extends TestCase { public function testLanguages() { $app = new App([ 'languages' => [ [ 'code' => 'en', 'name' => 'English', 'default' => true ], [ 'code' => 'de', 'name' => 'Deutsch' ] ] ]); $this->assertTrue($app->multilang()); $this->assertCount(2, $app->languages()); $this->assertEquals('en', $app->languageCode()); } public function testLanguageCode() { $app = new App([ 'languages' => [ [ 'code' => 'en', 'name' => 'English', 'default' => true ], [ 'code' => 'de', 'name' => 'Deutsch' ] ] ]); $this->assertEquals('de', $app->languageCode('de')); $this->assertEquals('en', $app->languageCode('en')); $this->assertEquals('en', $app->languageCode()); $this->assertEquals(null, $app->languageCode('fr')); } }
{ "pile_set_name": "Github" }
// // SecondLevelViewController.h // Nav // // Created by jeff on 4/22/09. // Copyright 2009 Jeff LaMarche. All rights reserved. // #import <Foundation/Foundation.h> @interface SecondLevelViewController : UITableViewController { UIImage *rowImage; } @property (nonatomic, retain) UIImage *rowImage; @end
{ "pile_set_name": "Github" }
StartChar: aHaa.medi_AynHaaInit Encoding: 65750 -1 224 Width: 55 Flags: HW AnchorPoint: "DigitBelow" 215 -127 basechar 0 AnchorPoint: "TaaBelow" 215 68 basechar 0 AnchorPoint: "TaaAbove" 44 488 basechar 0 AnchorPoint: "TashkilBelow" 215 -327 basechar 0 AnchorPoint: "TashkilAbove" 68 801 basechar 0 AnchorPoint: "TwoDotsBelow" 161 -127 basechar 0 AnchorPoint: "TwoDotsAbove" -20 488 basechar 0 AnchorPoint: "HamzaBelow" 215 -127 basechar 0 AnchorPoint: "HamzaAbove" 29 488 basechar 0 AnchorPoint: "DotBelow" 215 -127 basechar 0 AnchorPoint: "DotAbove" 44 488 basechar 0 LayerCount: 3 Fore Refer: 165 -1 N 1 0 0 1 0 0 2 EndChar
{ "pile_set_name": "Github" }
// deepcopy makes deep copies of things. A standard copy will copy the // pointers: deep copy copies the values pointed to. Unexported field // values are not copied. // // Copyright (c)2014-2016, Joel Scoble (github.com/mohae), all rights reserved. // License: MIT, for more details check the included LICENSE file. package deepcopy import ( "reflect" "time" ) // Interface for delegating copy process to type type Interface interface { DeepCopy() interface{} } // Iface is an alias to Copy; this exists for backwards compatibility reasons. func Iface(iface interface{}) interface{} { return Copy(iface) } // Copy creates a deep copy of whatever is passed to it and returns the copy // in an interface{}. The returned value will need to be asserted to the // correct type. func Copy(src interface{}) interface{} { if src == nil { return nil } // Make the interface a reflect.Value original := reflect.ValueOf(src) // Make a copy of the same type as the original. cpy := reflect.New(original.Type()).Elem() // Recursively copy the original. copyRecursive(original, cpy) // Return the copy as an interface. return cpy.Interface() } // copyRecursive does the actual copying of the interface. It currently has // limited support for what it can handle. Add as needed. func copyRecursive(original, cpy reflect.Value) { // check for implement deepcopy.Interface if original.CanInterface() { if copier, ok := original.Interface().(Interface); ok { cpy.Set(reflect.ValueOf(copier.DeepCopy())) return } } // handle according to original's Kind switch original.Kind() { case reflect.Ptr: // Get the actual value being pointed to. originalValue := original.Elem() // if it isn't valid, return. if !originalValue.IsValid() { return } cpy.Set(reflect.New(originalValue.Type())) copyRecursive(originalValue, cpy.Elem()) case reflect.Interface: // If this is a nil, don't do anything if original.IsNil() { return } // Get the value for the interface, not the pointer. originalValue := original.Elem() // Get the value by calling Elem(). copyValue := reflect.New(originalValue.Type()).Elem() copyRecursive(originalValue, copyValue) cpy.Set(copyValue) case reflect.Struct: t, ok := original.Interface().(time.Time) if ok { cpy.Set(reflect.ValueOf(t)) return } // Go through each field of the struct and copy it. for i := 0; i < original.NumField(); i++ { // The Type's StructField for a given field is checked to see if StructField.PkgPath // is set to determine if the field is exported or not because CanSet() returns false // for settable fields. I'm not sure why. -mohae if original.Type().Field(i).PkgPath != "" { continue } copyRecursive(original.Field(i), cpy.Field(i)) } case reflect.Slice: if original.IsNil() { return } // Make a new slice and copy each element. cpy.Set(reflect.MakeSlice(original.Type(), original.Len(), original.Cap())) for i := 0; i < original.Len(); i++ { copyRecursive(original.Index(i), cpy.Index(i)) } case reflect.Map: if original.IsNil() { return } cpy.Set(reflect.MakeMap(original.Type())) for _, key := range original.MapKeys() { originalValue := original.MapIndex(key) copyValue := reflect.New(originalValue.Type()).Elem() copyRecursive(originalValue, copyValue) copyKey := Copy(key.Interface()) cpy.SetMapIndex(reflect.ValueOf(copyKey), copyValue) } default: cpy.Set(original) } }
{ "pile_set_name": "Github" }
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. #ifndef IGL_READ_CSV_H #define IGL_READ_CSV_H #include "igl/igl_inline.h" #include <Eigen/Core> #include <string> #include <vector> namespace igl { // read a matrix from a csv file into a Eigen matrix // Templates: // Scalar type for the matrix // Inputs: // str path to .csv file // Outputs: // M eigen matrix template <typename Scalar> IGL_INLINE bool readCSV( const std::string str, Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic>& M); } #ifndef IGL_STATIC_LIBRARY # include "readCSV.cpp" #endif #endif
{ "pile_set_name": "Github" }
// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 00E356F31AD99517003FC87E /* react_native_draftjs_renderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* react_native_draftjs_renderTests.m */; }; 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; 2DCD954D1E0B4F2C00145EB5 /* react_native_draftjs_renderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* react_native_draftjs_renderTests.m */; }; 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; proxyType = 2; remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTActionSheet; }; 00
{ "pile_set_name": "Github" }
/* Indentation functions. Copyright (C) 1985 Richard M. Stallman. This file is part of GNU Emacs. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the GNU Emacs General Public License for full details. Everyone is granted permission to copy, modify and redistribute GNU Emacs, but only under the conditions described in the GNU Emacs General Public License. A copy of this license is supposed to have been given to you along with GNU Emacs so you can know your rights and responsibilities. It should be in a file named COPYING. Among other things, the copyright notice and this notice must be preserved on all copies. */ #include "config.h" #include "lisp.h" #include "buffer.h" #include "indent.h" #include "window.h" #include "termchar.h" #include "termopts.h" #define CR '\015' int indent_tabs_mode; #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) /* These three values memoize the current column to avoid recalculation */ /* Some things in buflow.c set last_known_column_point to -1 to mark the memoized value as invalid */ /* Last value returned by current_column */ int last_known_column; /* Value of point when current_column was called */ int last_known_column_point; /* Value of bf_modified when current_column was called */ int last_known_column_modified; extern int minibuf_prompt_width; DEFSIMPLE ("current-column", Fcurrent_column, Scurrent_column, "Return the horizontal position of point. The left margin is column 0.\n\ Ignores finite width of screen,", Lisp_Int, XSETINT, current_column ()) current_column () { register int col; register unsigned char *ptr, *stop, c; register int tab_seen; register int post_tab; register int tab_width = XINT (bf_cur->tab_width); int ctl_arrow = !NULL (bf_cur->ctl_arrow); if (point == last_known_column_point && bf_modified == last_known_column_modified) return last_known_column; ptr = &CharAt (point - 1) + 1; stop = point <= bf_s1 + 1 ? bf_p1 + 1 : bf_p2 + bf_s1 + 1; if (tab_width <= 0) tab_width = 1; col = 0, tab_seen = 0, post_tab = 0; while (1) { if (ptr == stop) { if (ptr == bf_p1 + 1) break; stop = bf_p1 + 1; ptr = stop + bf_s1; if (!bf_s1) break; } c = *--ptr; if (c >= 040 && c < 0177) { col++; } else if (c == '\n') break; else if (c == '\t') { if (tab_seen) col = ((col + tab_width) / tab_width) * tab_width; post_tab += col; col = 0; tab_seen = 1; } else col += (ctl_arrow && c < 0200) ? 2 : 4; } if (tab_seen) { col = ((col + tab_width) / tab_width) * tab_width; col += post_tab; } last_known_column = col; last_known_column_point = point; last_known_column_modified = bf_modified; return col; } ToCol (col) int col; { register int fromcol = current_column (); register int n; register int tab_width = XINT (bf_cur->tab_width); if (fromcol > col) return; if (tab_width <= 0) tab_width = 1; if (indent_tabs_mode) { n = col / tab_width - fromcol / tab_width; if (n) { while (n-- > 0) InsCStr ("\t", 1); fromcol = (col / tab_width) * tab_width; } } while (fromcol < col) { InsCStr (" ", min (8, col - fromcol)); fromcol += min (8, col - fromcol); } last_known_column = col; last_known_column_point = point; last_known_column_modified = bf_modified; } DEFUN ("indent-to", Findent_to, Sindent_to, 1, 2, "nIndent to column: ", "Indent from point with tabs and spaces until COLUMN is reached.\n\ Always do at least MIN spaces even if that goes past COLUMN;\n\ by default, MIN is zero.") (col, minimum) Lisp_Object col, minimum; { int mincol; CHECK_NUMBER (col, 0); if (NULL (minimum)) XFASTINT (minimum) = 0; CHECK_NUMBER (minimum, 1); mincol = current_column () + XINT (minimum); if (mincol < XINT (col)) mincol = XINT (col); ToCol (mincol); XSETINT (col, mincol); return col; } DEFUN ("current-indentation", Fcurrent_indentation, Scurrent_indentation, 0, 0, 0, "Return the indentation of the current line.\n\ This is the horizontal position of the character\n\ following any initial whitespace.") () { Lisp_Object val; XFASTINT (val) = position_indentation (ScanBf ('\n', point, -1)); return val; } position_indentation (pos) register int pos; { register int col = 0; register int c; register int end = NumCharacters + 1; register int tab_width = XINT (bf_cur->tab_width); if (tab_width <= 0) tab_width = 1; while (pos < end && (c = CharAt (pos), c == '\t' ? (col += tab_width - col % tab_width) : (c == ' ' ? ++col : 0))) pos++; return col; } DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 1, 0, "Move point to column COLUMN in the current line.\n\ Does not change the text, only point.\n\ Ignores finite width of screen.") (column) Lisp_Object column; { register int pos = point; register int col = current_column (); register int goal; register int end = NumCharacters; register int tab_width = XINT (bf_cur->tab_width); register int ctl_arrow = !NULL (bf_cur->ctl_arrow); Lisp_Object val; if (tab_width <= 0) tab_width = 1; CHECK_NUMBER (column, 0); goal = XINT (column); if (col > goal) { pos = ScanBf ('\n', pos, -1); col = 0; } while (col < goal && pos <= end) { char c = CharAt (pos); if (c == '\n') break; pos++; col++; if (c == '\t') { col += tab_width - 1; col = col / tab_width * tab_width; }
{ "pile_set_name": "Github" }
use rocket::http::Status; use rocket::request::Request; use rocket::response::{Responder, Response}; #[derive(Debug, Serialize)] pub struct Empty; impl<'r> Responder<'r> for Empty { fn respond_to(self, _: &Request) -> Result<Response<'r>, Status> { Response::build().ok() } } #[cfg(test)] mod test { use crate::response::empty::Empty; use rocket::http::Status; use crate::response::test_helper::test_route; #[test] fn empty_ok() { let response = test_route(Empty); assert_eq!(response.status(), Status::Ok); } }
{ "pile_set_name": "Github" }
/* Reed Solomon Coding for glyphs * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 * * This software library is licensed under terms of the GNU GENERAL * PUBLIC LICENSE * * RSCODE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * RSCODE 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Rscode. If not, see <http://www.gnu.org/licenses/>. * * Source code is available at http://rscode.sourceforge.net * * Commercial licensing is available under a separate license, please * contact author for details. * */ /**************************************************************** Below is NPAR, the only compile-time parameter you should have to modify. It is the number of parity bytes which will be appended to your data to create a codeword. Note that the maximum codeword size is 255, so the sum of your message length plus parity should be less than or equal to this maximum limit. In practice, you will get slooow error correction and decoding if you use more than a reasonably small number of parity bytes. (say, 10 or 20) ****************************************************************/ /****************************************************************/ #include <openpilot.h> #if !defined(TRUE) && !defined(FALSE) #define TRUE 1 #define FALSE 0 #endif typedef unsigned long BIT32; typedef unsigned short BIT16; /* **************************************************************** */ /* Maximum degree of various polynomials. */ #define MAXDEG (RS_ECC_NPARITY*2) /*************************************/ /* Encoder parity bytes */ extern int pBytes[MAXDEG]; /* Decoder syndrome bytes */ extern int synBytes[MAXDEG]; /* print debugging info */ extern int DEBUG; /* Reed Solomon encode/decode routines */ void initialize_ecc (void); int check_syndrome (void); void decode_data (unsigned char data[], int nbytes); void encode_data (unsigned char msg[], int nbytes, unsigned char dst[]); /* CRC-CCITT checksum generator */ BIT16 crc_ccitt(unsigned char *msg, int len); /* galois arithmetic tables */ extern const int gexp[]; extern const int glog[]; void init_galois_tables (void); int ginv(int elt); int gmult(int a, int b); /* Error location routines */ int correct_errors_erasures (unsigned char codeword[], int csize,int nerasures, int erasures[]); /* polynomial arithmetic */ void add_polys(int dst[], int src[]) ; void scale_poly(int k, int poly[]); void mult_polys(int dst[], int p1[], int p2[]); void copy_poly(int dst[], int src[]); void zero_poly(int poly[]);
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_08) on Tue Jun 03 16:14:38 GMT-05:00 2008 --> <TITLE> AntTask.PhaseOpttag_fieldrw (Soot API) </TITLE> <META NAME="keywords" CONTENT="soot.AntTask.PhaseOpttag_fieldrw class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="AntTask.PhaseOpttag_fieldrw (Soot API)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AntTask.PhaseOpttag_fieldrw.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../soot/AntTask.PhaseOpttag_dep.html" title="class in soot"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../soot/AntTask.PhaseOpttag_ln.html" title="class in soot"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html?soot/AntTask.PhaseOpttag_fieldrw.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="AntTask.PhaseOpttag_fieldrw.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> soot</FONT> <BR> Class AntTask.PhaseOpttag_fieldrw</H2> <PRE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../resources/inherit.gif" ALT="extended by "><B>soot.AntTask.PhaseOpttag_fieldrw</B> </PRE> <DL> <DT><B>Enclosing class:</B><DD><A HREF="../soot/AntTask.html" title="class in soot">AntTask</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>AntTask.PhaseOpttag_fieldrw</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL> </PRE> <P> <HR> <P> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../soot/AntTask.PhaseOpttag_fieldrw.html#AntTask.PhaseOpttag_fieldrw()">AntTask.PhaseOpttag_fieldrw</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../soot/AntTask.PhaseOpttag_fieldrw.html#setenabled(boolean)">setenabled</A></B>(boolean&nbsp;arg)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
{ "pile_set_name": "Github" }
// Grid system // // Generate semantic grid columns with these mixins. // Centered container element @mixin container-fixed($gutter: $grid-gutter-width) { margin-right: auto; margin-left: auto; padding-left: floor(($gutter / 2)); padding-right: ceil(($gutter / 2)); @include clearfix; } // Creates a wrapper for a series of columns @mixin make-row($gutter: $grid-gutter-width) { margin-left: ceil(($gutter / -2)); margin-right: floor(($gutter / -2)); @include clearfix; } // Generate the extra small columns @mixin make-xs-column($columns, $gutter: $grid-gutter-width) { position: relative; float: left; width: percentage(($columns / $grid-columns)); min-height: 1px; padding-left: ($gutter / 2); padding-right: ($gutter / 2); } @mixin make-xs-column-offset($columns) { margin-left: percentage(($columns / $grid-columns)); } @mixin make-xs-column-push($columns) { left: percentage(($columns / $grid-columns)); } @mixin make-xs-column-pull($columns) { right: percentage(($columns / $grid-columns)); } // Generate the small columns @mixin make-sm-column($columns, $gutter: $grid-gutter-width) { position: relative; min-height: 1px; padding-left: ($gutter / 2); padding-right: ($gutter / 2); @media (min-width: $screen-sm-min) { float: left; width: percentage(($columns / $grid-columns)); } } @mixin make-sm-column-offset($columns) { @media (min-width: $screen-sm-min) { margin-left: percentage(($columns / $grid-columns)); } } @mixin make-sm-column-push($columns) { @media (min-width: $screen-sm-min) { left: percentage(($columns / $grid-columns)); } } @mixin make-sm-column-pull($columns) { @media (min-width: $screen-sm-min) { right: percentage(($columns / $grid-columns)); } } // Generate the medium columns @mixin make-md-column($columns, $gutter: $grid-gutter-width) { position: relative; min-height: 1px; padding-left: ($gutter / 2); padding-right: ($gutter / 2); @media (min-width: $screen-md-min) { float: left; width: percentage(($columns / $grid-columns)); } } @mixin make-md-column-offset($columns) { @media (min-width: $screen-md-min) { margin-left: percentage(($columns / $grid-columns)); } } @mixin make-md-column-push($columns) { @media (min-width: $screen-md-min) { left: percentage(($columns / $grid-columns)); } } @mixin make-md-column-pull($columns) { @media (min-width: $screen-md-min) { right: percentage(($columns / $grid-columns)); } } // Generate the large columns @mixin make-lg-column($columns, $gutter: $grid-gutter-width) { position: relative; min-height: 1px; padding-left: ($gutter / 2); padding-right: ($gutter / 2); @media (min-width: $screen-lg-min) { float: left; width: percentage(($columns / $grid-columns)); } } @mixin make-lg-column-offset($columns) { @media (min-width: $screen-lg-min) { margin-left: percentage(($columns / $grid-columns)); } } @mixin make-lg-column-push($columns) { @media (min-width: $screen-lg-min) { left: percentage(($columns / $grid-columns)); } } @mixin make-lg-column-pull($columns) { @media (min-width: $screen-lg-min) { right: percentage(($columns / $grid-columns)); } }
{ "pile_set_name": "Github" }
import { IApi } from '@umijs/types'; export default (api: IApi) => { if (api.userConfig.appType === 'cordova') { api.registerPlugins([require.resolve('@alitajs/cordova')]); } };
{ "pile_set_name": "Github" }
%% -*- mode: erlang; tab-width: 4; indent-tabs-mode: 1; st-rulers: [70] -*- %% vim: ts=4 sw=4 ft=erlang noet %%%------------------------------------------------------------------- %%% @author Andrew Bennett <potatosaladx@gmail.com> %%% @copyright 2014-2015, Andrew Bennett %%% @doc %%% %%% @end %%% Created : 20 Jul 2015 by Andrew Bennett <potatosaladx@gmail.com> %%%------------------------------------------------------------------- -module(jose). %% API -export([chacha20_poly1305_module/0]). -export([chacha20_poly1305_module/1]). -export([crypto_fallback/0]). -export([crypto_fallback/1]). -export([curve25519_module/0]). -export([curve25519_module/1]). -export([curve448_module/0]). -export([curve448_module/1]). -export([decode/1]). -export([encode/1]). -export([json_module/0]). -export([json_module/1]). -export([sha3_module/0]). -export([sha3_module/1]). -export([unsecured_signing/0]). -export([unsecured_signing/1]). -export([xchacha20_poly1305_module/0]). -export([xchacha20_poly1305_module/1]). %% Private API -export([start/0]). -define(TAB, jose_jwa). -define(MAYBE_START_JOSE(F), try F catch _:_ -> _ = jose:start(), F end). %%==================================================================== %% API functions %%==================================================================== chacha20_poly1305_module() -> ?MAYBE_START_JOSE(ets:lookup_element(?TAB, chacha20_poly1305_module, 2)). chacha20_poly1305_module(ChaCha20Poly1305Module) when is_atom(ChaCha20Poly1305Module) -> ?MAYBE_START_JOSE(jose_server:chacha20_poly1305_module(ChaCha20Poly1305Module)). crypto_fallback() -> jose_jwa:crypto_fallback(). crypto_fallback(Boolean) when is_boolean(Boolean) -> jose_jwa:crypto_fallback(Boolean). curve25519_module() -> ?MAYBE_START_JOSE(ets:lookup_element(?TAB, curve25519_module, 2)). curve25519_module(Curve25519Module) when is_atom(Curve25519Module) -> ?MAYBE_START_JOSE(jose_server:curve25519_module(Curve25519Module)). curve448_module() -> ?MAYBE_START_JOSE(ets:lookup_element(?TAB, curve448_module, 2)). curve448_module(Curve448Module) when is_atom(Curve448Module) -> ?MAYBE_START_JOSE(jose_server:curve448_module(Curve448Module)). decode(Binary) -> JSONModule = json_module(), JSONModule:decode(Binary). encode(Term) -> JSONModule = json_module(), JSONModule:encode(Term). json_module() -> ?MAYBE_START_JOSE(ets:lookup_element(?TAB, json_module, 2)). json_module(JSONModule) when is_atom(JSONModule) -> ?MAYBE_START_JOSE(jose_server:json_module(JSONModule)). sha3_module() -> ?MAYBE_START_JOSE(ets:lookup_element(?TAB, sha3_module, 2)). sha3_module(SHA3Module) when is_atom(SHA3Module) -> ?MAYBE_START_JOSE(jose_server:sha3_module(SHA3Module)). unsecured_signing() -> jose_jwa:unsecured_signing(). unsecured_signing(Boolean) when is_boolean(Boolean) -> jose_jwa:unsecured_signing(Boolean). xchacha20_poly1305_module() -> ?MAYBE_START_JOSE(ets:lookup_element(?TAB, xchacha20_poly1305_module, 2)). xchacha20_poly1305_module(XChaCha20Poly1305Module) when is_atom(XChaCha20Poly1305Module) -> ?MAYBE_START_JOSE(jose_server:xchacha20_poly1305_module(XChaCha20Poly1305Module)). %%==================================================================== %% Private API functions %%==================================================================== start() -> case application:ensure_all_started(?MODULE) of {ok, _} -> ok; StartError -> StartError end. %%%------------------------------------------------------------------- %%% Internal functions %%%-------------------------------------------------------------------
{ "pile_set_name": "Github" }
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>DSA_meth_new</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:" /> </head> <body> <ul id="index"> <li><a href="#NAME">NAME</a></li> <li><a href="#SYNOPSIS">SYNOPSIS</a></li> <li><a href="#DESCRIPTION">DESCRIPTION</a></li> <li><a href="#RETURN-VALUES">RETURN VALUES</a></li> <li><a href="#SEE-ALSO">SEE ALSO</a></li> <li><a href="#HISTORY">HISTORY</a></li> <li><a href="#COPYRIGHT">COPYRIGHT</a></li> </ul> <h1 id="NAME">NAME</h1> <p>DSA_meth_new, DSA_meth_free, DSA_meth_dup, DSA_meth_get0_name, DSA_meth_set1_name, DSA_meth_get_flags, DSA_meth_set_flags, DSA_meth_get0_app_data, DSA_meth_set0_app_data, DSA_meth_get_sign, DSA_meth_set_sign, DSA_meth_get_sign_setup, DSA_meth_set_sign_setup, DSA_meth_get_verify, DSA_meth_set_verify, DSA_meth_get_mod_exp, DSA_meth_set_mod_exp, DSA_meth_get_bn_mod_exp, DSA_meth_set_bn_mod_exp, DSA_meth_get_init, DSA_meth_set_init, DSA_meth_get_finish, DSA_meth_set_finish, DSA_meth_get_paramgen, DSA_meth_set_paramgen, DSA_meth_get_keygen, DSA_meth_set_keygen - Routines to build up DSA methods</p> <h1 id="SYNOPSIS">SYNOPSIS</h1> <pre><code> <span class="comment">#include &lt;openssl/dsa.h&gt;</span> <span class="variable">DSA_METHOD</span> <span class="variable">*DSA_meth_new</span><span class="operator">(</span><span class="variable">const</span> <span class="variable">char</span> <span class="variable">*name</span><span class="operator">,</span> <span class="keyword">int</span> <span class="variable">flags</span><span class="operator">);</span> <span class="variable">void</span> <span class="variable">DSA_meth_free</span><span class="operator">(</span><span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">);</span> <span class="variable">DSA_METHOD</span> <span class="variable">*DSA_meth_dup</span><span class="operator">(</span><span class="variable">const</span> <span class="variable">DSA_METHOD</span> <span class="variable">*meth</span><span class="operator">);</span> <span class="variable">const</span> <span class="variable">char</span> <span class="variable">*DSA_meth_get0_name</span><span class="operator">(</span><span class="variable">const</span> <span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">);</span> <span class="keyword">int</span> <span class="variable">DSA_meth_set1_name</span><span class="operator">(</span><span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">,</span> <span class="variable">const</span> <span class="variable">char</span> <span class="variable">*name</span><span class="operator">);</span> <span class="keyword">int</span> <span class="variable">DSA_meth_get_flags</span><span class="operator">(</span><span class="variable">const</span> <span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">);</span> <span class="keyword">int</span> <span class="variable">DSA_meth_set_flags</span><span class="operator">(</span><span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">,</span> <span class="keyword">int</span> <span class="variable">flags</span><span class="operator">);</span> <span class="variable">void</span> <span class="variable">*DSA_meth_get0_app_data</span><span class="operator">(</span><span class="variable">const</span> <span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">);</span> <span class="keyword">int</span> <span class="variable">DSA_meth_set0_app_data</span><span class="operator">(</span><span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">,</span> <span class="variable">void</span> <span class="variable">*app_data</span><span class="operator">);</span> <span class="variable">DSA_SIG</span> <span class="operator">*(</span><span class="variable">*DSA_meth_get_sign</span><span class="operator">(</span><span class="variable">const</span> <span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">))(</span><span class="variable">const</span> <span class="variable">unsigned</span> <span class="variable">char</span> <span class="operator">*,</span> <span class="keyword">int</span><span class="operator">,</span> <span class="variable">DSA</span> <span class="operator">*);</span> <span class="keyword">int</span> <span class="variable">DSA_meth_set_sign</span><span class="operator">(</span><span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">,</span> <span class="variable">DSA_SIG</span> <span class="operator">*(</span><span class="variable">*sign</span><span class="operator">)(</span><span class="variable">const</span> <span class="variable">unsigned</span> <span class="variable">char</span> <span class="operator">*,</span> <span class="keyword">int</span><span class="operator">,</span> <span class="variable">DSA</span> <span class="operator">*));</span> <span class="keyword">int</span> <span class="operator">(</span><span class="variable">*DSA_meth_get_sign_setup</span><span class="operator">(</span><span class="variable">const</span> <span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">))(</span><span class="variable">DSA</span> <span class="operator">*,</span> <span class="variable">BN_CTX</span> <span class="operator">*,$ </span> <span class="variable">BIGNUM</span> <span class="operator">**,</span> <span class="variable">BIGNUM</span> <span class="operator">**);</span> <span class="keyword">int</span> <span class="variable">DSA_meth_set_sign_setup</span><span class="operator">
{ "pile_set_name": "Github" }
// #include <string.h> // #include "freertos/FreeRTOS.h" // #include "freertos/task.h" // #include "freertos/event_groups.h" // #include "esp_system.h" // #include "esp_wifi.h" // #include "esp_event.h" // #include "esp_log.h" // #include "nvs_flash.h" // #include "lwip/err.h" // #include "lwip/sys.h" #include "Blinker.h" // void blinker_test(void) // { // }
{ "pile_set_name": "Github" }
# project PROJECT_TYPE=java # documentation DOCUMENTATION_TYPE=hugo HUGO_SOURCE=docs # publish PUBLISH_TYPE=bintray
{ "pile_set_name": "Github" }
.highlight .hll { background-color: #ffffcc } .highlight { background: #eeffcc; } .highlight .c { color: #408090; font-style: italic } /* Comment */ .highlight .err { border: 1px solid #FF0000 } /* Error */ .highlight .k { color: #007020; font-weight: bold } /* Keyword */ .highlight .o { color: #666666 } /* Operator */ .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ .highlight .cp { color: #007020 } /* Comment.Preproc */ .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #A00000 } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #FF0000 } /* Generic.Error */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .highlight .gi { color: #00A000 } /* Generic.Inserted */ .highlight .go { color: #333333 } /* Generic.Output */ .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ .highlight .gt { color: #0044DD } /* Generic.Traceback */ .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #007020 } /* Keyword.Pseudo */ .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #902000 } /* Keyword.Type */ .highlight .m { color: #208050 } /* Literal.Number */ .highlight .s { color: #4070a0 } /* Literal.String */ .highlight .na { color: #4070a0 } /* Name.Attribute */ .highlight .nb { color: #007020 } /* Name.Builtin */ .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ .highlight .no { color: #60add5 } /* Name.Constant */ .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ .highlight .ne { color: #007020 } /* Name.Exception */ .highlight .nf { color: #06287e } /* Name.Function */ .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #bb60d5 } /* Name.Variable */ .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #208050 } /* Literal.Number.Bin */ .highlight .mf { color: #208050 } /* Literal.Number.Float */ .highlight .mh { color: #208050 } /* Literal.Number.Hex */ .highlight .mi { color: #208050 } /* Literal.Number.Integer */ .highlight .mo { color: #208050 } /* Literal.Number.Oct */ .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ .highlight .sc { color: #4070a0 } /* Literal.String.Char */ .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ .highlight .sx { color: #c65d09 } /* Literal.String.Other */ .highlight .sr { color: #235388 } /* Literal.String.Regex */ .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ .highlight .ss { color: #517918 } /* Literal.String.Symbol */ .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
{ "pile_set_name": "Github" }
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2015-2017 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can * obtain a copy of the License at * https://oss.oracle.com/licenses/CDDL+GPL-1.1 * or LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at LICENSE.txt. * * GPL Classpath Exception: * Oracle designates this particular file as subject to the "Classpath" * exception as provided by Oracle in the GPL Version 2 section of the License * file that accompanied this code. * * Modifications: * If applicable, add the following below the License Header, with the fields * enclosed by brackets [] replaced by your own identifying information: * "Portions Copyright [year] [name of copyright owner]" * * Contributor(s): * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package org.glassfish.jersey.jdk.connector.internal; import java.net.URI; import java.nio.ByteBuffer; import javax.ws.rs.core.HttpHeaders; /** * @author Petr Janouch (petr.janouch at oracle.com) */ class HttpFilter extends Filter<HttpRequest, HttpResponse, ByteBuffer, ByteBuffer> { private final HttpParser httpParser; /** * Constructor. * * @param downstreamFilter downstream filter. Accessible directly as {@link #downstreamFilter} protected field. */ HttpFilter(Filter<ByteBuffer, ByteBuffer, ?, ?> downstreamFilter, int maxHeaderSize, int maxBufferSize) { super(downstreamFilter); this.httpParser = new HttpParser(maxHeaderSize, maxBufferSize); } @Override void write(final HttpRequest httpRequest, final CompletionHandler<HttpRequest> completionHandler) { addTransportHeaders(httpRequest); ByteBuffer header = HttpRequestEncoder.encodeHeader(httpRequest); prepareForReply(httpRequest, completionHandler); downstreamFilter.write(header, new CompletionHandler<ByteBuffer>() { @Override public void failed(Throwable throwable) { completionHandler.failed(throwable); } @Override public void completed(ByteBuffer result) { writeBody(httpRequest, completionHandler); } }); } private void writeBody(final HttpRequest httpRequest, final CompletionHandler<HttpRequest> completionHandler) { switch (httpRequest.getBodyMode()) { case CHUNKED: { ChunkedBodyOutputStream bodyStream = (ChunkedBodyOutputStream) httpRequest.getBodyStream(); bodyStream.open(downstreamFilter); break; } case BUFFERED: { ByteBuffer body = httpRequest.getBufferedBody(); downstreamFilter.write(body, new CompletionHandler<ByteBuffer>() { @Override public void failed(Throwable throwable) { completionHandler.failed(throwable); } }); break; } } } private void prepareForReply(HttpRequest httpRequest, CompletionHandler<HttpRequest> completionHandler) { completionHandler.completed(httpRequest); boolean expectResponseBody = true; if (Constants.HEAD.equals(httpRequest.getMethod()) || Constants.CONNECT.equals(httpRequest.getMethod())) { expectResponseBody = false; } httpParser.reset(expectResponseBody); } @Override boolean processRead(ByteBuffer data) { boolean headerParsed = httpParser.isHeaderParsed(); try { httpParser.parse(data); } catch (ParseException e) { onError(e); } if (!headerParsed && httpParser.isHeaderParsed()) { HttpResponse httpResponse = httpParser.getHttpResponse(); upstreamFilter.onRead(httpResponse); } return false; } private void addTransportHeaders(HttpRequest httpRequest) { if (httpRequest.getBodyMode() == HttpRequest.BodyMode.BUFFERED) { httpRequest.addHeaderIfNotPresent(Constants.CONTENT_LENGTH, Integer.toString(httpRequest.getBodySize())); } URI uri = httpRequest.getUri(); int port = Utils.getPort(uri); httpRequest.addHeaderIfNotPresent(Constants.HOST, uri.getHost() + ":" + port); if (httpRequest.getBodyMode() == HttpRequest.BodyMode.CHUNKED) { httpRequest.addHeaderIfNotPresent(Constants.TRANSFER_ENCODING_HEADER, Constants.TRANSFER_ENCODING_CHUNKED); } if (httpRequest.getBodyMode() == HttpRequest.BodyMode.NONE) { httpRequest.addHeaderIfNotPresent(HttpHeaders.CONTENT_LENGTH, Integer.toString(0)); } } }
{ "pile_set_name": "Github" }
<?php class Swift_KeyCache_SimpleKeyCacheInputStreamTest extends \PHPUnit_Framework_TestCase { private $_nsKey = 'ns1'; public function testStreamWritesToCacheInAppendMode() { $cache = $this->getMockBuilder('Swift_KeyCache')->getMock(); $cache->expects($this->at(0)) ->method('setString') ->with($this->_nsKey, 'foo', 'a', Swift_KeyCache::MODE_APPEND); $cache->expects($this->at(1)) ->method('setString') ->with($this->_nsKey, 'foo', 'b', Swift_KeyCache::MODE_APPEND); $cache->expects($this->at(2)) ->method('setString') ->with($this->_nsKey, 'foo', 'c', Swift_KeyCache::MODE_APPEND); $stream = new Swift_KeyCache_SimpleKeyCacheInputStream(); $stream->setKeyCache($cache); $stream->setNsKey($this->_nsKey); $stream->setItemKey('foo'); $stream->write('a'); $stream->write('b'); $stream->write('c'); } public function testFlushContentClearsKey() { $cache = $this->getMockBuilder('Swift_KeyCache')->getMock(); $cache->expects($this->once()) ->method('clearKey') ->with($this->_nsKey, 'foo'); $stream = new Swift_KeyCache_SimpleKeyCacheInputStream(); $stream->setKeyCache($cache); $stream->setNsKey($this->_nsKey); $stream->setItemKey('foo'); $stream->flushBuffers(); } public function testClonedStreamStillReferencesSameCache() { $cache = $this->getMockBuilder('Swift_KeyCache')->getMock(); $cache->expects($this->at(0)) ->method('setString') ->with($this->_nsKey, 'foo', 'a', Swift_KeyCache::MODE_APPEND); $cache->expects($this->at(1)) ->method('setString') ->with($this->_nsKey, 'foo', 'b', Swift_KeyCache::MODE_APPEND); $cache->expects($this->at(2)) ->method('setString') ->with('test', 'bar', 'x', Swift_KeyCache::MODE_APPEND); $stream = new Swift_KeyCache_SimpleKeyCacheInputStream(); $stream->setKeyCache($cache); $stream->setNsKey($this->_nsKey); $stream->setItemKey('foo'); $stream->write('a'); $stream->write('b'); $newStream = clone $stream; $newStream->setKeyCache($cache); $newStream->setNsKey('test'); $newStream->setItemKey('bar'); $newStream->write('x'); } }
{ "pile_set_name": "Github" }
<div class="section"> <h3> {% if status_messages %} {% if any_generator_still_running %} <form id="gcb-cancel-visualization-{{ visualization }}" action="analytics?action=cancel_visualizations" method="POST"> <input type="hidden" name="r" value="{{ r }}"> <input type="hidden" name="xsrf_token" value="{{ xsrf_token_cancel }}"> <input type="hidden" name="visualization" value="{{ visualization }}"> <button class="gcb-button gcb-icon-button" type="submit"> <span class="icon spinner md md-settings md-spin"></span> <span>Cancel</span> </button> </form> {% else %} <form id="gcb-run-visualization-{{ visualization }}" action="analytics?action=run_visualizations" method="POST"> <input type="hidden" name="r" value="{{ r }}"> <input type="hidden" name="xsrf_token" value="{{ xsrf_token_run }}"> <input type="hidden" name="visualization" value="{{ visualization }}"> <button class="gcb-button gcb-icon-button" type="submit"> <span class="icon md-refresh"></span> <span>Update</span> </button> </form> {% endif %} {% endif %} <span class="title-text">{{title}}</span> </h3> {% for status_message in status_messages %} <p class="status-message">{{ status_message }}</p> {% endfor %} {% if visualization_content %} {{visualization_content}} {% endif %} </div>
{ "pile_set_name": "Github" }
/** * Copyright (c) 2013, FinancialForce.com, inc * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * - Neither the name of the FinancialForce.com, inc nor the names of its contributors * may be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. **/ /** * Controller shared by Apply Discount and Apply Discounts Custom Buttons (and related pages) on the Opportunity * * NOTE: The same service method is called regardless, logic in this controller is thus very light, * focusing on passing paramters in and handling errors and notfications **/ public with sharing class OpportunityApplyDiscountController { public Decimal DiscountPercentage { get; set; } private ApexPages.StandardController standardController = null; private ApexPages.StandardSetController standardSetController = null; public OpportunityApplyDiscountController(ApexPages.StandardController controller) { standardController = controller; } public OpportunityApplyDiscountController(ApexPages.StandardSetController controller) { standardSetController = controller; } public PageReference applyDiscount() { try { // Apply discount entered to the current Opportunity OpportunitiesService.applyDiscounts( new Set<ID> { standardController.getId() }, DiscountPercentage); } catch (Exception e) { ApexPages.addMessages(e); } return ApexPages.hasMessages() ? null : standardController.view(); } public PageReference applyDiscounts() { try { // Selected Opportunity Id's Set<Id> selectedOpportuntyIds = new Map<Id, SObject>(standardSetController.getSelected()).keySet(); // Apply discount entered to the selected Opportunities OpportunitiesService.applyDiscounts( selectedOpportuntyIds, DiscountPercentage); // Confirm submission ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Info, 'Opportunities updated.')); } catch (Exception e) { ApexPages.addMessages(e); } return null; } }
{ "pile_set_name": "Github" }
import 'package:flutter/material.dart'; class FilePopup extends StatelessWidget { final String path; final Function popTap; FilePopup({ Key key, @required this.path, @required this.popTap, }) : super(key: key); @override Widget build(BuildContext context) { return PopupMenuButton<int>( onSelected: popTap, itemBuilder: (context) => [ PopupMenuItem( value: 0, child: Text( "Rename", ), ), PopupMenuItem( value: 1, child: Text( "Delete", ), ), // PopupMenuItem( // value: 2, // child: Text( // "Info", // ), // ), ], icon: Icon( Icons.arrow_drop_down, color: Theme.of(context).textTheme.title.color, ), color: Theme.of(context).scaffoldBackgroundColor, offset: Offset(0, 30), ); } }
{ "pile_set_name": "Github" }
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // <deque> // template <class... Args> iterator emplace(const_iterator p, Args&&... args); // UNSUPPORTED: c++98, c++03 #include <deque> #include <cassert> #include "../../../Emplaceable.h" #include "min_allocator.h" template <class C> C make(int size, int start = 0 ) { const int b = 4096 / sizeof(int); int init = 0; if (start > 0) { init = (start+1) / b + ((start+1) % b != 0); init *= b; --init; } C c(init); for (int i = 0; i < init-start; ++i) c.pop_back(); for (int i = 0; i < size; ++i) c.push_back(Emplaceable()); for (int i = 0; i < start; ++i) c.pop_front(); return c; } template <class C> void test(int P, C& c1) { typedef typename C::const_iterator CI; std::size_t c1_osize = c1.size(); CI i = c1.emplace(c1.begin() + P, Emplaceable(1, 2.5)); assert(i == c1.begin() + P); assert(c1.size() == c1_osize + 1); assert(distance(c1.begin(), c1.end()) == c1.size()); assert(*i == Emplaceable(1, 2.5)); } template <class C> void testN(int start, int N) { for (int i = 0; i <= 3; ++i) { if (0 <= i && i <= N) { C c1 = make<C>(N, start); test(i, c1); } } for (int i = N/2-1; i <= N/2+1; ++i) { if (0 <= i && i <= N) { C c1 = make<C>(N, start); test(i, c1); } } for (int i = N - 3; i <= N; ++i) { if (0 <= i && i <= N) { C c1 = make<C>(N, start); test(i, c1); } } } int main() { { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; const int N = sizeof(rng)/sizeof(rng[0]); for (int i = 0; i < N; ++i) for (int j = 0; j < N; ++j) testN<std::deque<Emplaceable> >(rng[i], rng[j]); } { int rng[] = {0, 1, 2, 3, 1023, 1024, 1025, 2047, 2048, 2049}; const int N = sizeof(rng)/sizeof(rng[0]); for (int i = 0; i < N; ++i) for (int j = 0; j < N; ++j) testN<std::deque<Emplaceable, min_allocator<Emplaceable>> >(rng[i], rng[j]); } }
{ "pile_set_name": "Github" }
// Testing triggers with scopes remembered with closure. function outer { inner(). local start_time is time:seconds. function inner { local delay_time is 3. print "will trigger in " + delay_time + " seconds". // Note the trigger's conditional check can use // local scope vars too: when time:seconds > start_time + delay_time then { print "trigger happened after " + delay_time + " seconds.". return 0. // fire once only. } } local b is 2. // despite being after function 'inner', this should still // be in the same scope as variable 'a'. } outer(). wait 5. print "done".
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIdentifier</key> <string>com.pixolity.ios.cookbook.${PRODUCT_NAME:rfc1034identifier}</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>BNDL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1</string> </dict> </plist>
{ "pile_set_name": "Github" }
package org.openstack4j.api.compute; import java.util.List; import java.util.Map; import org.openstack4j.common.RestService; import org.openstack4j.model.common.ActionResponse; import org.openstack4j.model.compute.HostAggregate; /** * Host aggregate Operations API * * @author liujunpeng */ public interface HostAggregateService extends RestService { /** * List all aggregates (detailed) that the current tenant has access to * * @return list of all aggregates */ List<? extends HostAggregate> list(); /** * Returns list of Aggregates filtered by parameters. * * @param filteringParams map (name, value) of filtering parameters * @return */ List<? extends HostAggregate> list(Map<String, String> filteringParams); /** * Get the specified HostAggregate by ID * * @param hostAggregateId the aggregate identifier * @return the Aggregate or null if not found */ HostAggregate get(String aggregateId); /** * Delete of the aggregate * * @param aggregateId the aggregate identifier * @return the action response */ ActionResponse delete(String aggregateId); /** * Create a hostAggregate * @param name * @param availabilityZone * @return HostAggregate */ HostAggregate create(String name,String availabilityZone); /** * Updates the name, and optionally the availability zone, for a specified aggregate. * @param hostAggregateId the aggregate identifier * @param name * @param availabilityZone * @return HostAggregate */ HostAggregate update(String hostAggregateId,String name,String availabilityZone); /** * Sets metadata for an aggregate. * @param hostAggregateId the aggregate identifier * @param metadata * @return HostAggregate */ HostAggregate setMetadata(String hostAggregateId,Map<String, String> metadata); /** * Add host to aggregate * @param hostAggregateId The ID associated with an aggregate. * @param host Host ID to add to an aggregate, which is a collection of multiple groups of hosts that share common resources like storage and network. * @return HostAggregate */ HostAggregate addHost(String hostAggregateId,String host); /** * remove host from aggregate * @param hostAggregateId The ID associated with an aggregate. * @param host Host ID to add to an aggregate, which is a collection of multiple groups of hosts that share common resources like storage and network. * @return HostAggregate */ HostAggregate removeHost(String hostAggregateId,String host); }
{ "pile_set_name": "Github" }
# Pattern Matching list guarded scan(ls) => [] : [] [x, y, z] : [x + y + z] [x:xs] : scan(xs) + x main -> scan([50,2,3])
{ "pile_set_name": "Github" }
// Copyright 2015 CoreOS, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package capnslog import ( "fmt" "os" ) type PackageLogger struct { pkg string level LogLevel } const calldepth = 2 func (p *PackageLogger) internalLog(depth int, inLevel LogLevel, entries ...interface{}) { logger.Lock() defer logger.Unlock() if inLevel != CRITICAL && p.level < inLevel { return } if logger.formatter != nil { logger.formatter.Format(p.pkg, inLevel, depth+1, entries...) } } // SetLevel allows users to change the current logging level. func (p *PackageLogger) SetLevel(l LogLevel) { logger.Lock() defer logger.Unlock() p.level = l } // LevelAt checks if the given log level will be outputted under current setting. func (p *PackageLogger) LevelAt(l LogLevel) bool { logger.Lock() defer logger.Unlock() return p.level >= l } // Log a formatted string at any level between ERROR and TRACE func (p *PackageLogger) Logf(l LogLevel, format string, args ...interface{}) { p.internalLog(calldepth, l, fmt.Sprintf(format, args...)) } // Log a message at any level between ERROR and TRACE func (p *PackageLogger) Log(l LogLevel, args ...interface{}) { p.internalLog(calldepth, l, fmt.Sprint(args...)) } // log stdlib compatibility func (p *PackageLogger) Println(args ...interface{}) { p.internalLog(calldepth, INFO, fmt.Sprintln(args...)) } func (p *PackageLogger) Printf(format string, args ...interface{}) { p.Logf(INFO, format, args...) } func (p *PackageLogger) Print(args ...interface{}) { p.internalLog(calldepth, INFO, fmt.Sprint(args...)) } // Panic and fatal func (p *PackageLogger) Panicf(format string, args ...interface{}) { s := fmt.Sprintf(format, args...) p.internalLog(calldepth, CRITICAL, s) panic(s) } func (p *PackageLogger) Panic(args ...interface{}) { s := fmt.Sprint(args...) p.internalLog(calldepth, CRITICAL, s) panic(s) } func (p *PackageLogger) Panicln(args ...interface{}) { s := fmt.Sprintln(args...) p.internalLog(calldepth, CRITICAL, s) panic(s) } func (p *PackageLogger) Fatalf(format string, args ...interface{}) { p.Logf(CRITICAL, format, args...) os.Exit(1) } func (p *PackageLogger) Fatal(args ...interface{}) { s := fmt.Sprint(args...) p.internalLog(calldepth, CRITICAL, s) os.Exit(1) } func (p *PackageLogger) Fatalln(args ...interface{}) { s := fmt.Sprintln(args...) p.internalLog(calldepth, CRITICAL, s) os.Exit(1) } // Error Functions func (p *PackageLogger) Errorf(format string, args ...interface{}) { p.Logf(ERROR, format, args...) } func (p *PackageLogger) Error(entries ...interface{}) { p.internalLog(calldepth, ERROR, entries...) } // Warning Functions func (p *PackageLogger) Warningf(format string, args ...interface{}) { p.Logf(WARNING, format, args...) } func (p *PackageLogger) Warning(entries ...interface{}) { p.internalLog(calldepth, WARNING, entries...) } // Notice Functions func (p *PackageLogger) Noticef(format string, args ...interface{}) { p.Logf(NOTICE, format, args...) } func (p *PackageLogger) Notice(entries ...interface{}) { p.internalLog(calldepth, NOTICE, entries...) } // Info Functions func (p *PackageLogger) Infof(format string, args ...interface{}) { p.Logf(INFO, format, args...) } func (p *PackageLogger) Info(entries ...interface{}) { p.internalLog(calldepth, INFO, entries...) } // Debug Functions func (p *PackageLogger) Debugf(format string, args ...interface{}) { if p.level < DEBUG { return } p.Logf(DEBUG, format, args...) } func (p *PackageLogger) Debug(entries ...interface{}) { if p.level < DEBUG { return } p.internalLog(calldepth, DEBUG, entries...) } // Trace Functions func (p *PackageLogger) Tracef(format string, args ...interface{}) { if p.level < TRACE { return } p.Logf(TRACE, format, args...) } func (p *PackageLogger) Trace(entries ...interface{}) { if p.level < TRACE { return } p.internalLog(calldepth, TRACE, entries...) } func (p *PackageLogger) Flush() { logger.Lock() defer logger.Unlock() logger.formatter.Flush() }
{ "pile_set_name": "Github" }
// Copyright 2015 CoreOS, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package raft import ( "errors" "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" pb "github.com/coreos/etcd/raft/raftpb" ) type SnapshotStatus int const ( SnapshotFinish SnapshotStatus = 1 SnapshotFailure SnapshotStatus = 2 ) var ( emptyState = pb.HardState{} // ErrStopped is returned by methods on Nodes that have been stopped. ErrStopped = errors.New("raft: stopped") ) // SoftState provides state that is useful for logging and debugging. // The state is volatile and does not need to be persisted to the WAL. type SoftState struct { Lead uint64 RaftState StateType } func (a *SoftState) equal(b *SoftState) bool { return a.Lead == b.Lead && a.RaftState == b.RaftState } // Ready encapsulates the entries and messages that are ready to read, // be saved to stable storage, committed or sent to other peers. // All fields in Ready are read-only. type Ready struct { // The current volatile state of a Node. // SoftState will be nil if there is no update. // It is not required to consume or store SoftState. *SoftState // The current state of a Node to be saved to stable storage BEFORE // Messages are sent. // HardState will be equal to empty state if there is no update. pb.HardState // Entries specifies entries to be saved to stable storage BEFORE // Messages are sent. Entries []pb.Entry // Snapshot specifies the snapshot to be saved to stable storage. Snapshot pb.Snapshot // CommittedEntries specifies entries to be committed to a // store/state-machine. These have previously been committed to stable // store. CommittedEntries []pb.Entry // Messages specifies outbound messages to be sent AFTER Entries are // committed to stable storage. // If it contains a MsgSnap message, the application MUST report back to raft // when the snapshot has been received or has failed by calling ReportSnapshot. Messages []pb.Message } func isHardStateEqual(a, b pb.HardState) bool { return a.Term == b.Term && a.Vote == b.Vote && a.Commit == b.Commit } // IsEmptyHardState returns true if the given HardState is empty. func IsEmptyHardState(st pb.HardState) bool { return isHardStateEqual(st, emptyState) } // IsEmptySnap returns true if the given Snapshot is empty. func IsEmptySnap(sp pb.Snapshot) bool { return sp.Metadata.Index == 0 } func (rd Ready) containsUpdates() bool { return rd.SoftState != nil || !IsEmptyHardState(rd.HardState) || !IsEmptySnap(rd.Snapshot) || len(rd.Entries) > 0 || len(rd.CommittedEntries) > 0 || len(rd.Messages) > 0 } // Node represents a node in a raft cluster. type Node interface { // Tick increments the internal logical clock for the Node by a single tick. Election // timeouts and heartbeat timeouts are in units of ticks. Tick() // Campaign causes the Node to transition to candidate state and start campaigning to become leader. Campaign(ctx context.Context) error // Propose proposes that data be appended to the log. Propose(ctx context.Context, data []byte) error // ProposeConfChange proposes config change. // At most one ConfChange can be in the process of going through consensus. // Application needs to call ApplyConfChange when applying EntryConfChange type entry. ProposeConfChange(ctx context.Context, cc pb.ConfChange) error // Step advances the state machine using the given message. ctx.Err() will be returned, if any. Step(ctx context.Context, msg pb.Message) error // Ready returns a channel that returns the current point-in-time state // Users of the Node must call Advance after applying the state returned by Ready Ready() <-chan Ready // Advance notifies the Node that the application has applied and saved progress up to the last Ready. // It prepares the node to return the next available Ready. Advance() // ApplyConfChange applies config change to the local node. // Returns an opaque ConfState protobuf which must be recorded // in snapshots. Will never return nil; it returns a pointer only // to match MemoryStorage.Compact. ApplyConfChange(cc pb.ConfChange) *pb.ConfState // Status returns the current status of the raft state machine. Status() Status // Report reports the given node is not reachable for the last send. ReportUnreachable(id uint64) // ReportSnapshot reports the stutus of the sent snapshot. ReportSnapshot(id uint64, status SnapshotStatus) // Stop performs any necessary termination of the Node Stop() } type Peer struct { ID uint64 Context []byte } // StartNode returns a new Node given configuration and a list of raft peers. // It appends a ConfChangeAddNode entry for each given peer to the initial log. func StartNode(c *Config, peers []Peer) Node { r := newRaft(c) // become the follower at term 1 and apply initial configuration // entires of term 1 r.becomeFollower(1, None) for _, peer := range peers { cc := pb.ConfChange{Type: pb.ConfChangeAddNode, NodeID: peer.ID, Context: peer.Context} d, err := cc.Marshal() if err != nil { panic("unexpected marshal error") } e := pb.Entry{Type: pb.EntryConfChange, Term: 1, Index: r.raftLog.lastIndex() + 1, Data: d} r.raftLog.append(e) } // Mark these initial entries as committed. // TODO(bdarnell): These entries are still unstable; do we need to preserve // the invariant that committed < unstable? r.raftLog.committed = r.raftLog.lastIndex() r.Commit = r.raftLog.committed // Now apply them, mainly so that the application can call Campaign // immediately after StartNode in tests. Note that these nodes will // be added to raft twice: here and when the application's Ready // loop calls ApplyConfChange. The calls to addNode must come after // all calls to raftLog.append so progress.next is set after these // bootstrapping entries (it is an error if we try to append these // entries since they have already been committed). // We do not set raftLog.applied so the application will be able // to observe all conf changes via Ready.CommittedEntries. for _, peer := range peers { r.addNode(peer.ID) } n := newNode() go n.run(r) return &n } // RestartNode is similar to StartNode but does not take a list of peers. // The current membership of the cluster will be restored from the Storage. // If the caller has an existing state machine, pass in the last log index that // has been applied to it; otherwise use zero. func RestartNode(c *Config) Node { r := newRaft(c) n := newNode() go n.run(r) return &n } // node is the canonical implementation of the Node interface type node struct { propc chan pb.Message recvc chan pb.Message confc chan pb.ConfChange confstatec chan pb.ConfState
{ "pile_set_name": "Github" }
namespace Stove.Events.Bus.Entities { public class Envelope { public Envelope(IMessage message, Headers headers) { Message = message; Headers = headers; } public Headers Headers { get; } public IMessage Message { get; } } }
{ "pile_set_name": "Github" }
config BR2_PACKAGE_BOOTSTRAP bool "bootstrap" help Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web. http://getbootstrap.com
{ "pile_set_name": "Github" }
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package multiplewindows; /** * * @author dtron */ public class WindowB extends javax.swing.JFrame { /** * Creates new form WindowB */ public WindowB() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setText("Window B"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(181, 181, 181) .addComponent(jLabel1) .addContainerGap(172, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .addComponent(jLabel1) .addGap(135, 135, 135)) ); pack(); }// </editor-fold>//GEN-END:initComponents /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(WindowB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(WindowB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(WindowB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(WindowB.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new WindowB().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabel1; // End of variables declaration//GEN-END:variables }
{ "pile_set_name": "Github" }
/* ============================================================ * * This file is a part of digiKam project * https://www.digikam.org * * Date : 2015-08-08 * Description : DTrash item info container * * Copyright (C) 2015 by Mohamed_Anwer <m_dot_anwer at gmx dot com> * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program 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 General Public License for more details. * * ============================================================ */ #ifndef DIGIKAM_DTRASH_ITEM_INFO_H #define DIGIKAM_DTRASH_ITEM_INFO_H // Qt includes #include <QList> #include <QDateTime> namespace Digikam { class DTrashItemInfo { public: explicit DTrashItemInfo(); bool isNull() const; bool operator==(const DTrashItemInfo& itemInfo) const; public: QString trashPath; QString jsonFilePath; QString collectionPath; QString collectionRelativePath; QDateTime deletionTimestamp; qlonglong imageId; }; typedef QList<DTrashItemInfo> DTrashItemInfoList; //! qDebug() stream operator. Writes property @a info to the debug output in a nicely formatted way. QDebug operator<<(QDebug dbg, const DTrashItemInfo& info); } // namespace Digikam #endif // DIGIKAM_DTRASH_ITEM_INFO_H
{ "pile_set_name": "Github" }
# reduce learning rate after 120 epochs (60000 iters) by factor 0f 10 # then another factor of 10 after 10 more epochs (5000 iters) # The train/test net protocol buffer definition net: "examples/cifar10/cifar10_full_sigmoid_train_test_bn.prototxt" # test_iter specifies how many forward passes the test should carry out. # In the case of CIFAR10, we have test batch size 100 and 100 test iterations, # covering the full 10,000 testing images. test_iter: 10 # Carry out testing every 1000 training iterations. test_interval: 1000 # The base learning rate, momentum and the weight decay of the network. base_lr: 0.001 momentum: 0.9 #weight_decay: 0.004 # The learning rate policy lr_policy: "step" gamma: 1 stepsize: 5000 # Display every 200 iterations display: 100 # The maximum number of iterations max_iter: 60000 # snapshot intermediate results snapshot: 10000 snapshot_prefix: "examples/cifar10_full_sigmoid_bn" # solver mode: CPU or GPU solver_mode: GPU
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2004, 2007, 2011 Freescale Semiconductor. * Srikanth Srinivasan <srikanth.srinivaan@freescale.com> */ /* U-Boot - Startup Code for 86xx PowerPC based Embedded Boards * * * The processor starts at 0xfff00100 and the code is executed * from flash. The code is organized to be at an other address * in memory, but as long we don't jump around before relocating. * board_init lies at a quite high address and when the cpu has * jumped there, everything is ok. */ #include <asm-offsets.h> #include <config.h> #include <mpc86xx.h> #include <version.h> #include <ppc_asm.tmpl> #include <ppc_defs.h> #include <asm/cache.h> #include <asm/mmu.h> #include <asm/u-boot.h> /* * Need MSR_DR | MSR_IR enabled to access I/O (printf) in exceptions */ /* * Set up GOT: Global Offset Table * * Use r12 to access the GOT */ START_GOT GOT_ENTRY(_GOT2_TABLE_) GOT_ENTRY(_FIXUP_TABLE_) GOT_ENTRY(_start) GOT_ENTRY(_start_of_vectors) GOT_ENTRY(_end_of_vectors) GOT_ENTRY(transfer_to_handler) GOT_ENTRY(__init_end) GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) END_GOT /* * r3 - 1st arg to board_init(): IMMP pointer * r4 - 2nd arg to board_init(): boot flag */ .text .long 0x27051956 /* U-Boot Magic Number */ .globl version_string version_string: .ascii U_BOOT_VERSION_STRING, "\0" . = EXC_OFF_SYS_RESET .globl _start _start: b boot_cold /* the boot code is located below the exception table */ .globl _start_of_vectors _start_of_vectors: /* Machine check */ STD_EXCEPTION(0x200, MachineCheck, MachineCheckException) /* Data Storage exception. */ STD_EXCEPTION(0x300, DataStorage, UnknownException) /* Instruction Storage exception. */ STD_EXCEPTION(0x400, InstStorage, UnknownException) /* External Interrupt exception. */ STD_EXCEPTION(0x500, ExtInterrupt, external_interrupt) /* Alignment exception. */ . = 0x600 Alignment: EXCEPTION_PROLOG(SRR0, SRR1) mfspr r4,DAR stw r4,_DAR(r21) mfspr r5,DSISR stw r5,_DSISR(r21) addi r3,r1,STACK_FRAME_OVERHEAD EXC_XFER_TEMPLATE(Alignment, AlignmentException, MSR_KERNEL, COPY_EE) /* Program check exception */ . = 0x700 ProgramCheck: EXCEPTION_PROLOG(SRR0, SRR1) addi r3,r1,STACK_FRAME_OVERHEAD EXC_XFER_TEMPLATE(ProgramCheck, ProgramCheckException, MSR_KERNEL, COPY_EE) STD_EXCEPTION(0x800, FPUnavailable, UnknownException) /* I guess we could implement decrementer, and may have * to someday for timekeeping. */ STD_EXCEPTION(0x900, Decrementer, timer_interrupt) STD_EXCEPTION(0xa00, Trap_0a, UnknownException) STD_EXCEPTION(0xb00, Trap_0b, UnknownException) STD_EXCEPTION(0xc00, SystemCall, UnknownException) STD_EXCEPTION(0xd00, SingleStep, UnknownException) STD_EXCEPTION(0xe00, Trap_0e, UnknownException) STD_EXCEPTION(0xf00, Trap_0f, UnknownException) STD_EXCEPTION(0x1000, SoftEmu, SoftEmuException) STD_EXCEPTION(0x1100, InstructionTLBMiss, UnknownException) STD_EXCEPTION(0x1200, DataTLBMiss, UnknownException) STD_EXCEPTION(0x1300, InstructionTLBError, UnknownException) STD_EXCEPTION(0x1400, DataTLBError, UnknownException) STD_EXCEPTION(0x1500, Reserved5, UnknownException) STD_EXCEPTION(0x1600, Reserved6, UnknownException) STD_EXCEPTION(0x1700, Reserved7, UnknownException) STD_EXCEPTION(0x1800, Reserved8, UnknownException) STD_EXCEPTION(0x1900, Reserved9, UnknownException) STD_EXCEPTION(0x1a00, ReservedA, UnknownException) STD_EXCEPTION(0x1b00, ReservedB, UnknownException) STD_EXCEPTION(0x1c00, DataBreakpoint, UnknownException) STD_EXCEPTION(0x1d00, InstructionBreakpoint, UnknownException) STD_EXCEPTION(0x1e00, PeripheralBreakpoint, UnknownException) STD_EXCEPTION(0x1f00, DevPortBreakpoint, UnknownException) .globl _end_of_vectors _end_of_vectors: . = 0x2000 boot_cold: /* * NOTE: Only Cpu 0 will ever come here. Other cores go to an * address specified by the BPTR */ 1: #ifdef CONFIG_SYS_RAMBOOT /* disable everything */ li r0, 0 mtspr HID0, r0 sync mtmsr 0 #endif /* Invalidate BATs */ bl invalidate_bats sync /* Invalidate all of TLB before MMU turn on */ bl clear_tlbs sync #ifdef CONFIG_SYS_L2 /* init the L2 cache */ lis r3, L2_INIT@h ori r3, r3, L2_INIT@l mtspr l2cr, r3 /* invalidate the L2 cache */ bl l2cache_invalidate sync #endif /* * Calculate absolute address in FLASH and jump there *------------------------------------------------------*/ lis r3, CONFIG_SYS_MONITOR_BASE_EARLY@h ori r3, r3, CONFIG_SYS_MONITOR_BASE_EARLY@l addi r3, r3, in_flash - _start + EXC_OFF_SYS_RESET mtlr r3 blr in_flash: /* let the C-code set up the rest */ /* */ /* Be careful to keep code relocatable ! */ /*------------------------------------------------------*/ /* perform low-level init */ /* enable extended addressing */ bl enable_ext_addr /* setup the bats */ bl early_bats /* * Cache must be enabled here for stack-in-cache trick. * This means we need to enable the BATS. * Cache should be turned on after BATs, since by default * everything is write-through. */ /* enable address translation */ mfmsr r5 ori r5, r5, (MSR_IR | MSR_DR) lis r3,addr_trans_enabled@h ori r3, r3, addr_trans_enabled@l mtspr SPRN_SRR0,r3 mtspr SPRN_SRR1,r5 rfi addr_trans_enabled: /* enable and invalidate the data cache */ /* bl l1dcache_enable */ bl dcache_enable sync #if 1 bl icache_enable #endif #ifdef CONFIG_SYS_INIT_RAM_LOCK bl
{ "pile_set_name": "Github" }
import { IAudioParam, IAudioParamRenderer, IMinimalOfflineAudioContext, IOfflineAudioContext } from '../interfaces'; import { TContext } from './context'; export type TAddAudioParamConnectionsFunction = <T extends TContext>( audioParam: IAudioParam, audioParamRenderer: T extends IMinimalOfflineAudioContext | IOfflineAudioContext ? IAudioParamRenderer : null ) => void;
{ "pile_set_name": "Github" }
// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !amd64,!ppc64le,!s390x gccgo purego package poly1305 type mac struct{ macGeneric }
{ "pile_set_name": "Github" }
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. package v1beta1 import ( rest "k8s.io/client-go/rest" ) // ScalesGetter has a method to return a ScaleInterface. // A group's client should implement this interface. type ScalesGetter interface { Scales(namespace string) ScaleInterface } // ScaleInterface has methods to work with Scale resources. type ScaleInterface interface { ScaleExpansion } // scales implements ScaleInterface type scales struct { client rest.Interface ns string } // newScales returns a Scales func newScales(c *ExtensionsV1beta1Client, namespace string) *scales { return &scales{ client: c.RESTClient(), ns: namespace, } }
{ "pile_set_name": "Github" }
#ifndef BOOST_MPL_LIMITS_STRING_HPP_INCLUDED #define BOOST_MPL_LIMITS_STRING_HPP_INCLUDED // Copyright Eric Niebler 2009 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: string.hpp 49239 2009-04-01 09:10:26Z eric_niebler $ // $Date: 2009-04-01 02:10:26 -0700 (Wed, 1 Apr 2009) $ // $Revision: 49239 $ #if !defined(BOOST_MPL_LIMIT_STRING_SIZE) # define BOOST_MPL_LIMIT_STRING_SIZE 32 #endif #endif // BOOST_MPL_LIMITS_STRING_HPP_INCLUDED
{ "pile_set_name": "Github" }
package cm.aptoide.pt.view.settings; import android.content.SharedPreferences; import androidx.annotation.VisibleForTesting; import cm.aptoide.accountmanager.Account; import cm.aptoide.accountmanager.AptoideAccountManager; import cm.aptoide.pt.account.AccountAnalytics; import cm.aptoide.pt.crashreports.CrashReport; import cm.aptoide.pt.presenter.Presenter; import cm.aptoide.pt.presenter.View; import rx.Observable; import rx.Scheduler; /** * Created by franciscocalado on 13/03/18. */ public class MyAccountPresenter implements Presenter { private static final int EDIT_STORE_REQUEST_CODE = 1230; private final MyAccountView view; private final AptoideAccountManager accountManager; private final CrashReport crashReport; private final SharedPreferences sharedPreferences; private final Scheduler scheduler; private final MyAccountNavigator myAccountNavigator; private final AccountAnalytics accountAnalytics; public MyAccountPresenter(MyAccountView view, AptoideAccountManager accountManager, CrashReport crashReport, SharedPreferences sharedPreferences, Scheduler scheduler, MyAccountNavigator myAccountNavigator, AccountAnalytics accountAnalytics) { this.view = view; this.accountManager = accountManager; this.crashReport = crashReport; this.sharedPreferences = sharedPreferences; this.scheduler = scheduler; this.myAccountNavigator = myAccountNavigator; this.accountAnalytics = accountAnalytics; } @Override public void present() { populateAccountViews(); checkIfStoreIsInvalidAndRefresh(); handleLoginClick(); handleLogOutClick(); handleCreateStoreClick(); handleStoreEditClick(); handleStoreEditResult(); handleStoreDisplayableClick(); handleProfileEditClick(); handleProfileDisplayableClick(); handleSettingsClicked(); handleAptoideTvCardViewClick(); handleAptoideUploaderCardViewClick(); handleAptoideBackupCardViewClick(); } @VisibleForTesting public void handleLoginClick() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(__ -> view.loginClick()) .doOnNext(loginClicked -> myAccountNavigator.navigateToLoginView( AccountAnalytics.AccountOrigins.MY_ACCOUNT)) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(__ -> { }, throwable -> crashReport.log(throwable)); } @VisibleForTesting public void populateAccountViews() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(resumed -> accountManager.accountStatus()) .observeOn(scheduler) .doOnNext(account -> view.showAccount(account)) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(__ -> { }, throwable -> crashReport.log(throwable)); } @VisibleForTesting public void handleProfileDisplayableClick() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(__ -> view.userClick()) .flatMap(click -> accountManager.accountStatus() .first()) .doOnNext(account -> myAccountNavigator.navigateToUserView(account.getId(), account.getStore() .getTheme())) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(account -> { }, throwable -> crashReport.log(throwable)); } @VisibleForTesting public void handleProfileEditClick() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(viewCreated -> view.editUserProfileClick() .flatMap(click -> accountManager.accountStatus() .first()) .doOnNext(account -> myAccountNavigator.navigateToEditProfileView())) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(account -> { }, throwable -> crashReport.log(throwable)); } @VisibleForTesting public void handleStoreDisplayableClick() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(__ -> view.storeClick()) .flatMap(click -> accountManager.accountStatus() .first()) .doOnNext(account -> myAccountNavigator.navigateToStoreView(account.getStore() .getName(), account.getStore() .getTheme())) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(account -> { }, throwable -> crashReport.log(throwable)); } @VisibleForTesting public void handleStoreEditClick() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(click -> view.editStoreClick() .flatMap(response -> view.getStore()) .map(getStore -> getStore.getNodes() .getMeta() .getData())) .observeOn(scheduler) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe( store -> myAccountNavigator.navigateToEditStoreView(store, EDIT_STORE_REQUEST_CODE), throwable -> crashReport.log(throwable)); } @VisibleForTesting public void handleStoreEditResult() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .flatMap(__ -> myAccountNavigator.editStoreResult(EDIT_STORE_REQUEST_CODE)) .flatMap(__ -> accountManager.accountStatus() .first()) .observeOn(scheduler) .doOnNext(account -> view.showAccount(account)) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(notification -> { }, throwable -> crashReport.log(throwable)); } @VisibleForTesting public void handleCreateStoreClick() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(__ -> view.createStoreClick()) .doOnNext(__ -> myAccountNavigator.navigateToCreateStore()) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(notification -> { }, throwable -> crashReport.log(throwable)); } @VisibleForTesting public void checkIfStoreIsInvalidAndRefresh() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(lifecycleEvent -> accountManager.accountStatus()) .filter(account -> !storeExistsInAccount(account) && account.hasStore()) .flatMap(account -> view.getStore() .map(store -> store.getNodes() .getMeta() .getData()) .observeOn(scheduler) .doOnNext(store -> view.refreshUI(store))) .flatMap(__ -> accountManager.updateAccount() .toObservable()) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(account -> { }, throwable -> CrashReport.getInstance() .log(throwable)); } @VisibleForTesting public void handleLogOutClick() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(resumed -> signOutClick()) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(signOutClick -> { }, throwable
{ "pile_set_name": "Github" }
package com.ogulcan.android.mvp.app.util import android.content.Context import android.graphics.Canvas import android.graphics.Color import android.graphics.drawable.ColorDrawable import android.support.v4.content.ContextCompat import android.support.v7.widget.RecyclerView import android.support.v7.widget.helper.ItemTouchHelper import com.ogulcan.android.mvp.app.R /** * Created by ogulcan on 08/02/2018. */ abstract class SwipeToDelete(context: Context): ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT) { private val deleteIcon = ContextCompat.getDrawable(context, R.drawable.ic_delete24) private val intrinsicWidth = deleteIcon.intrinsicWidth private val intrinsicHeight = deleteIcon.intrinsicHeight override fun onMove(recyclerView: RecyclerView?, viewHolder: RecyclerView.ViewHolder?, target: RecyclerView.ViewHolder?): Boolean { return false // No need to implement drag & drop } override fun onChildDraw(c: Canvas?, recyclerView: RecyclerView?, viewHolder: RecyclerView.ViewHolder?, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean) { val itemView = viewHolder!!.itemView val itemHeight = itemView.bottom - itemView.top val background = ColorDrawable() background.color = Color.parseColor("#801515") background.setBounds(itemView.right + dX.toInt(), itemView.top, itemView.right, itemView.bottom) background.draw(c) val deleteIconTop = itemView.top + (itemHeight - intrinsicHeight) / 2 val deleteIconMargin = (itemHeight - intrinsicHeight) / 2 val deleteIconLeft = itemView.right - deleteIconMargin - intrinsicWidth val deleteIconRight = itemView.right - deleteIconMargin val deleteIconBottom = deleteIconTop + intrinsicHeight deleteIcon.setBounds(deleteIconLeft, deleteIconTop, deleteIconRight, deleteIconBottom) deleteIcon.draw(c) super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive) } }
{ "pile_set_name": "Github" }
{ "nome": "Rivoli", "codice": "001219", "zona": { "codice": "1", "nome": "Nord-ovest" }, "regione": { "codice": "01", "nome": "Piemonte" }, "provincia": { "codice": "001", "nome": "Torino" }, "sigla": "TO", "codiceCatastale": "H355", "cap": [ "10098" ], "popolazione": 48632 }
{ "pile_set_name": "Github" }
/* * Copyright (C) 2004-2008 Jive Software. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jivesoftware.database; import java.io.File; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.MissingResourceException; import org.jivesoftware.util.ClassUtils; import org.jivesoftware.util.JiveGlobals; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Central manager of database connections. All methods are static so that they * can be easily accessed throughout the classes in the database package.<p> * * This class also provides a set of utility methods that abstract out * operations that may not work on all databases such as setting the max number * or rows that a query should return. * * @author Jive Software * @see ConnectionProvider */ public class DbConnectionManager { private static final Logger Log = LoggerFactory.getLogger(DbConnectionManager.class); private static ConnectionProvider connectionProvider; private static final Object providerLock = new Object(); // True if connection profiling is turned on. Always false by default. private static boolean profilingEnabled = false; // True if the database support transactions. private static boolean transactionsSupported; // True if the database requires large text fields to be streamed. private static boolean streamTextRequired; /** True if the database supports the Statement.setMaxRows() method. */ private static boolean maxRowsSupported; /** True if the database supports the rs.setFetchSize() method. */ private static boolean fetchSizeSupported; // True if the database supports correlated subqueries. private static boolean subqueriesSupported; // True if the database supports scroll-insensitive results. private static boolean scrollResultsSupported; // True if the database supports batch updates. private static boolean batchUpdatesSupported; /** True if the database supports the Statement.setFetchSize()) method. */ private static boolean pstmt_fetchSizeSupported = true; /** The char used to quote identifiers */ private static String identifierQuoteString; private static final String SETTING_DATABASE_MAX_RETRIES = "database.maxRetries"; private static final String SETTING_DATABASE_RETRY_DELAY = "database.retryDelay"; private static DatabaseType databaseType = DatabaseType.unknown; private static SchemaManager schemaManager = new SchemaManager(); /** * Ensures that the connection provider exists and is set */ private static void ensureConnectionProvider() { if (connectionProvider != null) return; synchronized (providerLock) { if (connectionProvider != null) return; // Attempt to load the connection provider classname as a Jive property. String className = JiveGlobals.getXMLProperty("connectionProvider.className"); if (className != null) { // Attempt to load the class. try { Class conClass = ClassUtils.forName(className); setConnectionProvider((ConnectionProvider)conClass.newInstance()); } catch (Exception e) { Log.warn("Failed to create the " + "connection provider specified by connection" + "Provider.className. Using the default pool.", e); setConnectionProvider(new DefaultConnectionProvider()); } } else { setConnectionProvider(new DefaultConnectionProvider()); } } } /** * Attempts to create a connection to the database and execute a query. * * @param errors A map populated with errors if they occur. * @return true if the test was successful, otherwise false. */ public static boolean testConnection( Map<String,String> errors ) { boolean success = true; try ( final Connection con = DbConnectionManager.getConnection() ) { // See if the Jive db schema is installed. try { Statement stmt = con.createStatement(); // Pick an arbitrary table to see if it's there. stmt.executeQuery( "SELECT * FROM ofID" ); stmt.close(); } catch ( SQLException sqle ) { success = false; Log.error( "The Openfire database schema does not appear to be installed.", sqle ); errors.put( "general", "The Openfire database schema does not " + "appear to be installed. Follow the installation guide to " + "fix this error." ); } } catch ( SQLException exception ) { success = false; Log.error( "Unable to connect to the database.", exception ); errors.put( "general", "A connection to the database could not be " + "made. View the error message by opening the " + "\"" + File.separator + "logs" + File.separator + "error.log\" log " + "file, then go back to fix the problem." ); } return success; } /** * Returns a database connection from the currently active connection * provider. An exception will be thrown if no connection was found. * (auto commit is set to true). * * @return a connection. * @throws SQLException if a SQL exception occurs or no connection was found. */ public static Connection getConnection() throws SQLException { ensureConnectionProvider(); Integer currentRetryCount = 0; Integer maxRetries = JiveGlobals.getXMLProperty(SETTING_DATABASE_MAX_RETRIES, 10); Integer retryWait = JiveGlobals.getXMLProperty(SETTING_DATABASE_RETRY_DELAY, 250); // milliseconds SQLException lastException = null; boolean loopIfNoConnection = false; do { try { Connection con = connectionProvider.getConnection(); if (con != null) { // Got one, lets hand it off. // Usually profiling is not enabled. So we return a normal // connection unless profiling is enabled. If yes, wrap the // connection with a profiled connection. if (!profilingEnabled) { return con; } else { return new ProfiledConnection(con); } } } catch (SQLException e) { // TODO distinguish recoverable from non-recoverable exceptions. lastException = e; Log.info("Unable to get a connection from the database pool " + "(attempt " + currentRetryCount + " out of " + maxRetries + ").", e); } currentRetryCount++; loopIfNoConnection = currentRetryCount <= maxRetries; if (loopIfNoConnection) { try { Thread.sleep(retryWait); } catch (InterruptedException ex) { String msg = "Interrupted waiting for DB connection"; Log.info(msg,ex); Thread.currentThread().interrupt(); throw new SQLException(msg,ex); } } } while (loopIfNoConnection); throw new SQLException("ConnectionManager.getConnection() " + "failed to obtain a connection after " + currentRetryCount + " retries. " + "The exception from the last attempt is as follows: " + lastException); } /** * Returns a Connection from the currently active connection provider that * is ready to participate in transactions (auto commit is set to false). * * @return a connection with transactions enabled. * @throws SQLException if a SQL exception occurs. */ public static Connection getTransactionConnection() throws SQLException {
{ "pile_set_name": "Github" }
$! $! Makefile.com - builds GNU Make for VMS $! $! P1 is non-empty if you want to link with the VAXCRTL library instead $! of the shareable executable $! P2 = DEBUG will build an image with debug information $! P3 = WALL will enable all warning messages (some are suppressed since $! one macro intentionally causes an error condition) $! $! In case of problems with the install you might contact me at $! zinser@decus.de (preferred) or zinser@sysdev.deutsche-boerse.com $ $! hb $! But don't ask Martin Zinser about the lines, I added/changed. $! In case of an error do some cleanup $ on error then $ goto cleanup $! in case somebody set up her/his own symbol for cc $ set symbol/scope=(nolocal,noglobal) $! $! Just some general constants... $! $ true = 1 $ false = 0 $ tmpnam = "temp_" + f$getjpi("","pid") $ tt = tmpnam + ".txt" $ tc = tmpnam + ".c" $! $! Look for the compiler used $! $ lval = "" $ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" $ then $ if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library: $ ccopt = "" $ else $ ccopt = "/decc/prefix=(all,except=(globfree,glob))" $ if f$trnlnm("SYS").eqs."" $ then $ if f$trnlnm("DECC$LIBRARY_INCLUDE").nes."" $ then $ define sys decc$library_include: $ else $ if f$search("SYS$COMMON:[DECC$LIB.REFERENCE]DECC$RTLDEF.DIR").nes."" - then lval = "SYS$COMMON:[DECC$LIB.REFERENCE.DECC$RTLDEF]," $ if f$search("SYS$COMMON:[DECC$LIB.REFERENCE]SYS$STARLET_C.DIR").nes."" - then lval = lval+"SYS$COMMON:[DECC$LIB.REFERENCE.SYS$STARLET_C]," $ lval=lval+"SYS$LIBRARY:" $ define sys 'lval $ endif $ endif $ endif $! $! Should we build a debug image $! $ if (p2.eqs."DEBUG") $ then $ ccopt = ccopt + "/noopt/debug" $ lopt = "/debug" $ else $ lopt = "" $ endif $! $! Do we want to see all warnings $! $ if (p3.nes."WALL") $ then $ gosub check_cc_qual $ endif $ filelist = "alloca ar arscan commands default dir expand file function " + - "hash implicit job main misc read remake remote-stub rule " + - "signame variable version vmsfunctions vmsify vpath " + - "[.glob]glob [.glob]fnmatch getopt1 getopt strcache" $ copy config.h-vms config.h $ n=0 $ open/write optf make.opt $ loop: $ cfile = f$elem(n," ",filelist) $ if cfile .eqs. " " then goto linkit $ write sys$output "Compiling ''cfile'..." $ call compileit 'cfile' 'p1' $ n = n + 1 $ goto loop $ linkit: $ close optf $ if p1 .nes. "" then goto link_using_library $ link/exe=make make.opt/opt'lopt $ goto cleanup $ $ link_using_library: $ link/exe=make make.opt/opt,sys$library:vaxcrtl/lib'lopt $ $ cleanup: $ if f$trnlnm("SYS").nes."" then $ deassign sys $ if f$trnlnm("OPTF").nes."" then $ close optf $ if f$search("make.opt").nes."" then $ del make.opt;* $ exit $! $!----------------------------------------------------------------------------- $! $! Check if this is a define relating to the properties of the C/C++ $! compiler $! $CHECK_CC_QUAL: $ open/write tmpc 'tc $ ccqual = "/warn=(disable=questcompare)" $ write tmpc "#include <stdio.h>" $ write tmpc "unsigned int i = 1;" $ write tmpc "int main(){" $ write tmpc "if (i < 0){printf(""Mission impossible\n"");}}" $ close tmpc $ gosub cc_qual_check $ return $! $!----------------------------------------------------------------------------- $! $! Check for properties of C/C++ compiler $! $CC_QUAL_CHECK: $ cc_qual = false $ set message/nofac/noident/nosever/notext $ cc 'ccqual' 'tmpnam' $ if $status then cc_qual = true $ set message/fac/ident/sever/text $ delete/nolog 'tmpnam'.*;* $ if cc_qual then ccopt = ccopt + ccqual $ return $!----------------------------------------------------------------------------- $! $ compileit : subroutine $ ploc = f$locate("]",p1) $ filnam = p1 $ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1) $ write optf "''filnam'" $ cc'ccopt'/include=([],[.glob]) - /define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") - 'p1' $ exit $ endsubroutine : compileit $! $!----------------------------------------------------------------------------- $!Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, $!2006 Free Software Foundation, Inc. $!This file is part of GNU Make. $! $!GNU Make is free software; you can redistribute it and/or modify it under the $!terms of the GNU General Public License as published by the Free Software $!Foundation; either version 2, or (at your option) any later version. $! $!GNU Make 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 General Public License for more details. $! $!You should have received a copy of the GNU General Public License along with $!GNU Make; see the file COPYING. If not, write to the Free Software $!Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
{ "pile_set_name": "Github" }
ๅฎžๆˆ˜๏ผšๅˆๅง‹ๅŒ–Mysqlๆ•ฐๆฎๅบ“ๅนถๅปบ็ซ‹่ฟžๆŽฅ
{ "pile_set_name": "Github" }
# -*- shell-script -*- # # Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana # University Research and Technology # Corporation. All rights reserved. # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. # Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2008-2012 University of Houston. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow # # $HEADER$ # # MCA_fs_gpfs_CONFIG(action-if-can-compile, # [action-if-cant-compile]) # ------------------------------------------------ AC_DEFUN([MCA_ompi_fs_gpfs_CONFIG],[ AC_CONFIG_FILES([ompi/mca/fs/gpfs/Makefile]) OMPI_CHECK_GPFS([fs_gpfs], [fs_gpfs_happy="yes"], [fs_gpfs_happy="no"]) AS_IF([test "$fs_gpfs_happy" = "yes"], [fs_gpfs_WRAPPER_EXTRA_LDFLAGS="$fs_gpfs_LDFLAGS" fs_gpfs_WRAPPER_EXTRA_LIBS="$fs_gpfs_LIBS" $1], [$2]) OPAL_SUMMARY_ADD([[OMPIO File Systems]],[[IBM Spectrum Scale/GPFS]],[$1],[$fs_gpfs_happy]) # substitute in the things needed to build gpfs AC_SUBST([fs_gpfs_CPPFLAGS]) AC_SUBST([fs_gpfs_LDFLAGS]) AC_SUBST([fs_gpfs_LIBS]) ])dnl
{ "pile_set_name": "Github" }
/* * LibrePCB - Professional EDA for everyone! * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors. * https://librepcb.org/ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /******************************************************************************* * Includes ******************************************************************************/ #include "packagecheck.h" #include "msg/msgduplicatepadname.h" #include "msg/msgmissingfootprint.h" #include "msg/msgmissingfootprintname.h" #include "msg/msgmissingfootprintvalue.h" #include "msg/msgpadoverlapswithplacement.h" #include "msg/msgwrongfootprinttextlayer.h" #include "package.h" #include <librepcb/common/graphics/graphicslayer.h> #include <librepcb/common/toolbox.h> #include <QtCore> /******************************************************************************* * Namespace ******************************************************************************/ namespace librepcb { namespace library { /******************************************************************************* * Constructors / Destructor ******************************************************************************/ PackageCheck::PackageCheck(const Package& package) noexcept : LibraryElementCheck(package), mPackage(package) { } PackageCheck::~PackageCheck() noexcept { } /******************************************************************************* * General Methods ******************************************************************************/ LibraryElementCheckMessageList PackageCheck::runChecks() const { LibraryElementCheckMessageList msgs = LibraryElementCheck::runChecks(); checkDuplicatePadNames(msgs); checkMissingFootprint(msgs); checkMissingTexts(msgs); checkWrongTextLayers(msgs); checkPadsOverlapWithPlacement(msgs); return msgs; } /******************************************************************************* * Protected Methods ******************************************************************************/ void PackageCheck::checkDuplicatePadNames(MsgList& msgs) const { QSet<CircuitIdentifier> padNames; for (const PackagePad& pad : mPackage.getPads()) { if (padNames.contains(pad.getName())) { msgs.append(std::make_shared<MsgDuplicatePadName>(pad)); } else { padNames.insert(pad.getName()); } } } void PackageCheck::checkMissingFootprint(MsgList& msgs) const { if (mPackage.getFootprints().isEmpty()) { msgs.append(std::make_shared<MsgMissingFootprint>()); } } void PackageCheck::checkMissingTexts(MsgList& msgs) const { for (auto itFtp = mPackage.getFootprints().begin(); itFtp != mPackage.getFootprints().end(); ++itFtp) { QHash<QString, QVector<std::shared_ptr<const StrokeText>>> texts; for (auto it = (*itFtp).getStrokeTexts().begin(); it != (*itFtp).getStrokeTexts().end(); ++it) { texts[(*it).getText()].append(it.ptr()); } if (texts.value("{{NAME}}").isEmpty()) { msgs.append(std::make_shared<MsgMissingFootprintName>(itFtp.ptr())); } if (texts.value("{{VALUE}}").isEmpty()) { msgs.append(std::make_shared<MsgMissingFootprintValue>(itFtp.ptr())); } } } void PackageCheck::checkWrongTextLayers(MsgList& msgs) const { QHash<QString, QString> textLayers = { std::make_pair("{{NAME}}", QString(GraphicsLayer::sTopNames)), std::make_pair("{{VALUE}}", QString(GraphicsLayer::sTopValues)), }; for (auto itFtp = mPackage.getFootprints().begin(); itFtp != mPackage.getFootprints().end(); ++itFtp) { for (auto it = (*itFtp).getStrokeTexts().begin(); it != (*itFtp).getStrokeTexts().end(); ++it) { QString expectedLayer = textLayers.value((*it).getText()); if ((!expectedLayer.isEmpty()) && ((*it).getLayerName() != expectedLayer)) { msgs.append(std::make_shared<MsgWrongFootprintTextLayer>( itFtp.ptr(), it.ptr(), expectedLayer)); } } } } void PackageCheck::checkPadsOverlapWithPlacement(MsgList& msgs) const { for (auto itFtp = mPackage.getFootprints().begin(); itFtp != mPackage.getFootprints().end(); ++itFtp) { std::shared_ptr<const Footprint> footprint = itFtp.ptr(); QPainterPath topPlacement; QPainterPath botPlacement; for (const Polygon& polygon : footprint->getPolygons()) { QPen pen(Qt::NoPen); if (polygon.getLineWidth() > 0) { pen.setStyle(Qt::SolidLine); pen.setWidthF(polygon.getLineWidth()->toPx()); } QBrush brush(Qt::NoBrush); if (polygon.isFilled() && polygon.getPath().isClosed()) { brush.setStyle(Qt::SolidPattern); } QPainterPath area = Toolbox::shapeFromPath( polygon.getPath().toQPainterPathPx(), pen, brush); if (polygon.getLayerName() == GraphicsLayer::sTopPlacement) { topPlacement.addPath(area); } else if (polygon.getLayerName() == GraphicsLayer::sBotPlacement) { botPlacement.addPath(area); } } for (auto it = (*itFtp).getPads().begin(); it != (*itFtp).getPads().end(); ++it) { std::shared_ptr<const FootprintPad> pad = it.ptr(); std::shared_ptr<const PackagePad> pkgPad = mPackage.getPads().find(pad->getUuid()); Length clearance(150000); // 150 ยตm Length tolerance(10); // 0.01 ยตm, to avoid rounding issues Path stopMaskPath = pad->getOutline(clearance - tolerance); stopMaskPath.rotate(pad->getRotation()).translate(pad->getPosition()); QPainterPath stopMask = stopMaskPath.toQPainterPathPx(); if (pad->isOnLayer(GraphicsLayer::sTopCopper) && stopMask.intersects(topPlacement)) { msgs.append(std::make_shared<MsgPadOverlapsWithPlacement>( footprint, pad, pkgPad ? *pkgPad->getName() : QString(), clearance)); } else if (pad->isOnLayer(GraphicsLayer::sBotCopper) && stopMask.intersects(botPlacement)) { msgs.append(std::make_shared<MsgPadOverlapsWithPlacement>( footprint, pad, pkgPad ? *pkgPad->getName() : QString(), clearance)); } } } } /******************************************************************************* * End of File ******************************************************************************/ } // namespace library } // namespace librepcb
{ "pile_set_name": "Github" }
@import url(//fonts.googleapis.com/css?family=Roboto+Slab:400,700|Roboto:400,700,700italic,400italic); @font-face { font-family: 'Material Icons'; font-style: normal; font-weight: 400; src: url(../<%- computedPaths.appToBower %>/bower_components/material-design-iconfont/iconfont/MaterialIcons-Regular.eot); /* For IE6-8 */ src: local('Material Icons'), local('MaterialIcons-Regular'), url(../<%- computedPaths.appToBower %>/bower_components/material-design-iconfont/iconfont/MaterialIcons-Regular.woff2) format('woff2'), url(../<%- computedPaths.appToBower %>/bower_components/material-design-iconfont/iconfont/MaterialIcons-Regular.woff) format('woff'), url(../<%- computedPaths.appToBower %>/bower_components/material-design-iconfont/iconfont/MaterialIcons-Regular.ttf) format('truetype'); } .material-icons { font-family: 'Material Icons'; font-weight: normal; font-style: normal; font-size: 24px; /* Preferred icon size */ display: inline-block; width: 1em; height: 1em; line-height: 1; text-transform: none; letter-spacing: normal; word-wrap: normal; /* Support for all WebKit browsers. */ -webkit-font-smoothing: antialiased; /* Support for Safari and Chrome. */ text-rendering: optimizeLegibility; /* Support for Firefox. */ -moz-osx-font-smoothing: grayscale; /* Support for IE. */ font-feature-settings: 'liga'; } html { font-family: 'Roboto Slab', serif; } [layout=row] { flex-direction: row; } .browsehappy { margin: 0.2em 0; background: #ccc; color: #000; padding: 0.2em 0; } md-toolbar.md-default-theme { background-color: black; } section.jumbotron { margin-bottom: 30px; padding: 1px 30px; background-color: #5aadbb; text-align: center; color: white; } section.jumbotron h1 { font-size: 3em; } .techs { display: flex; flex-flow: row wrap; } .techs md-card { width: 30%; } .techs md-card img.pull-right { float: right; width: 100px; }
{ "pile_set_name": "Github" }
๏ปฟ// ยฉ 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html#License en_IM{ %%Parent{"en_001"} Version{"2.1.47.69"} }
{ "pile_set_name": "Github" }
้ฑฃ
{ "pile_set_name": "Github" }
/* zconf.h -- configuration of the zlib compression library * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ #ifndef ZCONF_H #define ZCONF_H /* * If you *really* need a unique prefix for all types and library functions, * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. * Even better than compiling with -DZ_PREFIX would be to use configure to set * this permanently in zconf.h using "./configure --zprefix". */ #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ # define Z_PREFIX_SET /* all linked symbols and init macros */ # define _dist_code z__dist_code # define _length_code z__length_code # define _tr_align z__tr_align # define _tr_flush_bits z__tr_flush_bits # define _tr_flush_block z__tr_flush_block # define _tr_init z__tr_init # define _tr_stored_block z__tr_stored_block # define _tr_tally z__tr_tally # define adler32 z_adler32 # define adler32_combine z_adler32_combine # define adler32_combine64 z_adler32_combine64 # define adler32_z z_adler32_z # ifndef Z_SOLO # define compress z_compress # define compress2 z_compress2 # define compressBound z_compressBound # endif # define crc32 z_crc32 # define crc32_combine z_crc32_combine # define crc32_combine64 z_crc32_combine64 # define crc32_z z_crc32_z # define deflate z_deflate # define deflateBound z_deflateBound # define deflateCopy z_deflateCopy # define deflateEnd z_deflateEnd # define deflateGetDictionary z_deflateGetDictionary # define deflateInit z_deflateInit # define deflateInit2 z_deflateInit2 # define deflateInit2_ z_deflateInit2_ # define deflateInit_ z_deflateInit_ # define deflateParams z_deflateParams # define deflatePending z_deflatePending # define deflatePrime z_deflatePrime # define deflateReset z_deflateReset # define deflateResetKeep z_deflateResetKeep # define deflateSetDictionary z_deflateSetDictionary # define deflateSetHeader z_deflateSetHeader # define deflateTune z_deflateTune # define deflate_copyright z_deflate_copyright # define get_crc_table z_get_crc_table # ifndef Z_SOLO # define gz_error z_gz_error # define gz_intmax z_gz_intmax # define gz_strwinerror z_gz_strwinerror # define gzbuffer z_gzbuffer # define gzclearerr z_gzclearerr # define gzclose z_gzclose # define gzclose_r z_gzclose_r # define gzclose_w z_gzclose_w # define gzdirect z_gzdirect # define gzdopen z_gzdopen # define gzeof z_gzeof # define gzerror z_gzerror # define gzflush z_gzflush # define gzfread z_gzfread # define gzfwrite z_gzfwrite # define gzgetc z_gzgetc # define gzgetc_ z_gzgetc_ # define gzgets z_gzgets # define gzoffset z_gzoffset # define gzoffset64 z_gzoffset64 # define gzopen z_gzopen # define gzopen64 z_gzopen64 # ifdef _WIN32 # define gzopen_w z_gzopen_w # endif # define gzprintf z_gzprintf # define gzputc z_gzputc # define gzputs z_gzputs # define gzread z_gzread # define gzrewind z_gzrewind # define gzseek z_gzseek # define gzseek64 z_gzseek64 # define gzsetparams z_gzsetparams # define gztell z_gztell # define gztell64 z_gztell64 # define gzungetc z_gzungetc # define gzvprintf z_gzvprintf # define gzwrite z_gzwrite # endif # define inflate z_inflate # define inflateBack z_inflateBack # define inflateBackEnd z_inflateBackEnd # define inflateBackInit z_inflateBackInit # define inflateBackInit_ z_inflateBackInit_ # define inflateCodesUsed z_inflateCodesUsed # define inflateCopy z_inflateCopy # define inflateEnd z_inflateEnd # define inflateGetDictionary z_inflateGetDictionary # define inflateGetHeader z_inflateGetHeader # define inflateInit z_inflateInit # define inflateInit2 z_inflateInit2 # define inflateInit2_ z_inflateInit2_ # define inflateInit_ z_inflateInit_ # define inflateMark z_inflateMark # define inflatePrime z_inflatePrime # define inflateReset z_inflateReset # define inflateReset2 z_inflateReset2 # define inflateResetKeep z_inflateResetKeep # define inflateSetDictionary z_inflateSetDictionary # define inflateSync z_inflateSync # define inflateSyncPoint z_inflateSyncPoint # define inflateUndermine z_inflateUndermine # define inflateValidate z_inflateValidate # define inflate_copyright z_inflate_copyright # define inflate_fast z_inflate_fast # define inflate_table z_inflate_table # ifndef Z_SOLO # define uncompress z_uncompress # define uncompress2 z_uncompress2 # endif # define zError z_zError # ifndef Z_SOLO # define zcalloc z_zcalloc # define zcfree z_zcfree # endif # define zlibCompileFlags z_zlibCompileFlags # define zlibVersion z_zlibVersion /* all zlib typedefs in zlib.h and zconf.h */ # define Byte z_Byte # define Bytef z_Bytef # define alloc_func z_alloc_func # define charf z_charf # define free_func z_free_func # ifndef Z_SOLO # define gzFile z_gzFile # endif # define gz_header z_gz_header # define gz_headerp z_gz_headerp # define in_func z_in_func # define intf z_intf # define out_func z_out_func # define uInt z_uInt # define uIntf z_uIntf # define uLong z_uLong # define uLongf z_uLongf # define voidp z_voidp # define
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!-- B85-ZK-3843-mylistbox.zul Purpose: Description: History: Wed Jun 06 12:28:57 CST 2018, Created by klyve Copyright (C) 2018 Potix Corporation. All Rights Reserved. --> <zk> <zscript><![CDATA[ import java.util.*; ListModelList model = new ListModelList(); model.add("test"); ]]></zscript> <listbox id="listbox1" model="${model}" rows="1"> <template name="model"> <listitem label="${each}" ></listitem> </template> </listbox> <listbox id="listbox2"> <listitem label="111"/> </listbox> </zk>
{ "pile_set_name": "Github" }
<section> <section> <title>Properties</title> <table> <thead> <tr> <td>Name</td> </tr> </thead> </table> </section> <section> <title>Methods</title> <table> <thead> <tr> <td>Name</td> </tr> </thead> <tr> <td>inferScalaClasspath</td> </tr> <tr> <td>findScalaJar</td> </tr> <tr> <td>getScalaVersion</td> </tr> </table> </section> </section>
{ "pile_set_name": "Github" }
#include "sp/sp.h" #include "FontManager.h" #include "sp/embedded/Embedded.h" namespace sp { namespace graphics { std::vector<Font*> FontManager::s_Fonts; maths::vec2 FontManager::s_Scale = maths::vec2(1, 1); void FontManager::SetScale(const maths::vec2& scale) { s_Scale = scale; } void FontManager::Add(Font* font) { font->SetScale(s_Scale); s_Fonts.push_back(font); } Font* FontManager::Get() { return s_Fonts[0]; } Font* FontManager::Get(const String& name) { for (Font* font : s_Fonts) { if (font->GetName() == name) return font; } // TODO: Maybe return a default font instead? return nullptr; } Font* FontManager::Get(uint size) { for (Font* font : s_Fonts) { if (font->GetFontSize() == size) return font; } Font* result = new Font("SourceSansPro", internal::DEFAULT_FONT, internal::DEFAULT_FONT_SIZE, (float)size); result->SetScale(s_Scale); Add(result); return result; } Font* FontManager::Get(const String& name, uint size) { for (Font* font : s_Fonts) { if (font->GetFontSize() == size && font->GetName() == name) return font; } // TODO: Maybe return a default font instead? return nullptr; } void FontManager::Clean() { for (uint i = 0; i < s_Fonts.size(); i++) delete s_Fonts[i]; } } }
{ "pile_set_name": "Github" }
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. package v1beta1 import ( v1beta1 "k8s.io/api/policy/v1beta1" serializer "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) type PolicyV1beta1Interface interface { RESTClient() rest.Interface EvictionsGetter PodDisruptionBudgetsGetter PodSecurityPoliciesGetter } // PolicyV1beta1Client is used to interact with features provided by the policy group. type PolicyV1beta1Client struct { restClient rest.Interface } func (c *PolicyV1beta1Client) Evictions(namespace string) EvictionInterface { return newEvictions(c, namespace) } func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisruptionBudgetInterface { return newPodDisruptionBudgets(c, namespace) } func (c *PolicyV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface { return newPodSecurityPolicies(c) } // NewForConfig creates a new PolicyV1beta1Client for the given config. func NewForConfig(c *rest.Config) (*PolicyV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } client, err := rest.RESTClientFor(&config) if err != nil { return nil, err } return &PolicyV1beta1Client{client}, nil } // NewForConfigOrDie creates a new PolicyV1beta1Client for the given config and // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *PolicyV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) } return client } // New creates a new PolicyV1beta1Client for the given RESTClient. func New(c rest.Interface) *PolicyV1beta1Client { return &PolicyV1beta1Client{c} } func setConfigDefaults(config *rest.Config) error { gv := v1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } return nil } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *PolicyV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } return c.restClient }
{ "pile_set_name": "Github" }
op { graph_op_name: "StridedSlice" }
{ "pile_set_name": "Github" }
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>biz.aQute.bnd-test</groupId> <artifactId>test</artifactId> <version>1.0.1</version> </parent> <groupId>biz.aQute.bnd-test</groupId> <artifactId>valid-with-provider-no-bundle-version-change</artifactId> <version>1.0.1</version> <packaging>jar</packaging> <dependencies> <dependency> <groupId>org.osgi</groupId> <artifactId>osgi.annotation</artifactId> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>biz.aQute.bnd</groupId> <artifactId>bnd-baseline-maven-plugin</artifactId> <configuration> <base> <artifactId>valid-no-previous</artifactId> <version>1.0.1</version> </base> <includeDistributionManagement>true</includeDistributionManagement> <fullReport>true</fullReport> <!-- do not request bundle version changes --> <diffignores> <diffignore>Bundle-Version</diffignore> </diffignores> </configuration> </plugin> <plugin> <groupId>biz.aQute.bnd</groupId> <artifactId>bnd-maven-plugin</artifactId> <configuration> <!-- same BSN as valid-no-previous --> <bnd><![CDATA[ Bundle-SymbolicName: valid-no-previous ]]></bnd> </configuration> </plugin> </plugins> </build> </project>
{ "pile_set_name": "Github" }
<!--- This file is automatically generated by make gen-cli-docs; changes should be made in the go CLI command code (under cmd/kops) --> ## kops get instancegroups Get one or many instancegroups ### Synopsis Display one or many instancegroup resources. ``` kops get instancegroups [flags] ``` ### Examples ``` # Get all instancegroups in a state store kops get ig # Get a cluster's instancegroup kops get ig --name k8s-cluster.example.com nodes # Save a cluster's instancegroups desired configuration to YAML file kops get ig --name k8s-cluster.example.com -o yaml > instancegroups-desired-config.yaml ``` ### Options ``` -h, --help help for instancegroups ``` ### Options inherited from parent commands ``` --add_dir_header If true, adds the file directory to the header of the log messages --alsologtostderr log to standard error as well as files --config string yaml config file (default is $HOME/.kops.yaml) --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0) --log_dir string If non-empty, write log files in this directory --log_file string If non-empty, use this log file --log_file_max_size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800) --logtostderr log to standard error instead of files (default true) --name string Name of cluster. Overrides KOPS_CLUSTER_NAME environment variable -o, --output string output format. One of: table, yaml, json (default "table") --skip_headers If true, avoid header prefixes in the log messages --skip_log_headers If true, avoid headers when opening log files --state string Location of state storage (kops 'config' file). Overrides KOPS_STATE_STORE environment variable --stderrthreshold severity logs at or above this threshold go to stderr (default 2) -v, --v Level number for the log level verbosity --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging ``` ### SEE ALSO * [kops get](kops_get.md) - Get one or many resources.
{ "pile_set_name": "Github" }
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PySpefile(PythonPackage): """Reader for SPE files part of pyspec a set of python routines for data analysis of x-ray scattering experiments""" homepage = "https://github.com/conda-forge/spefile-feedstock" git = "https://github.com/conda-forge/spefile-feedstock.git" import_modules = ['spefile'] version('1.6', commit='24394e066da8dee5e7608f556ca0203c9db217f9') depends_on('py-setuptools', type='build') depends_on('py-numpy', type=('build', 'run')) build_directory = 'recipe/src'
{ "pile_set_name": "Github" }
// moment.js locale configuration // locale : Luxembourgish (lb) // author : mweimerskirch : https://github.com/mweimerskirch, David Raison : https://github.com/kwisatz // Note: Luxembourgish has a very particular phonological rule ('Eifeler Regel') that causes the // deletion of the final 'n' in certain contexts. That's what the 'eifelerRegelAppliesToWeekday' // and 'eifelerRegelAppliesToNumber' methods are meant for (function (factory) { if (typeof define === 'function' && define.amd) { define(['moment'], factory); // AMD } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { factory((typeof global !== 'undefined' ? global : this).moment); // node or other global } }(function (moment) { function processRelativeTime(number, withoutSuffix, key, isFuture) { var format = { 'm': ['eng Minutt', 'enger Minutt'], 'h': ['eng Stonn', 'enger Stonn'], 'd': ['een Dag', 'engem Dag'], 'M': ['ee Mount', 'engem Mount'], 'y': ['ee Joer', 'engem Joer'] }; return withoutSuffix ? format[key][0] : format[key][1]; } function processFutureTime(string) { var number = string.substr(0, string.indexOf(' ')); if (eifelerRegelAppliesToNumber(number)) { return 'a ' + string; } return 'an ' + string; } function processPastTime(string) { var number = string.substr(0, string.indexOf(' ')); if (eifelerRegelAppliesToNumber(number)) { return 'viru ' + string; } return 'virun ' + string; } /** * Returns true if the word before the given number loses the '-n' ending. * e.g. 'an 10 Deeg' but 'a 5 Deeg' * * @param number {integer} * @returns {boolean} */ function eifelerRegelAppliesToNumber(number) { number = parseInt(number, 10); if (isNaN(number)) { return false; } if (number < 0) { // Negative Number --> always true return true; } else if (number < 10) { // Only 1 digit if (4 <= number && number <= 7) { return true; } return false; } else if (number < 100) { // 2 digits var lastDigit = number % 10, firstDigit = number / 10; if (lastDigit === 0) { return eifelerRegelAppliesToNumber(firstDigit); } return eifelerRegelAppliesToNumber(lastDigit); } else if (number < 10000) { // 3 or 4 digits --> recursively check first digit while (number >= 10) { number = number / 10; } return eifelerRegelAppliesToNumber(number); } else { // Anything larger than 4 digits: recursively check first n-3 digits number = number / 1000; return eifelerRegelAppliesToNumber(number); } } return moment.defineLocale('lb', { months: 'Januar_Februar_Mรคerz_Abrรซll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), weekdays: 'Sonndeg_Mรฉindeg_Dรซnschdeg_Mรซttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), weekdaysShort: 'So._Mรฉ._Dรซ._Mรซ._Do._Fr._Sa.'.split('_'), weekdaysMin: 'So_Mรฉ_Dรซ_Mรซ_Do_Fr_Sa'.split('_'), longDateFormat: { LT: 'H:mm [Auer]', LTS: 'H:mm:ss [Auer]', L: 'DD.MM.YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY LT', LLLL: 'dddd, D. MMMM YYYY LT' }, calendar: { sameDay: '[Haut um] LT', sameElse: 'L', nextDay: '[Muer um] LT', nextWeek: 'dddd [um] LT', lastDay: '[Gรซschter um] LT', lastWeek: function () { // Different date string for 'Dรซnschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule switch (this.day()) { case 2: case 4: return '[Leschten] dddd [um] LT'; default: return '[Leschte] dddd [um] LT'; } } }, relativeTime : { future : processFutureTime, past : processPastTime, s : 'e puer Sekonnen', m : processRelativeTime, mm : '%d Minutten', h : processRelativeTime, hh : '%d Stonnen', d : processRelativeTime, dd : '%d Deeg', M : processRelativeTime, MM : '%d Mรฉint', y : processRelativeTime, yy : '%d Joer' }, ordinalParse: /\d{1,2}\./, ordinal: '%d.', week: { dow: 1, // Monday is the first day of the week. doy: 4 // The week that contains Jan 4th is the first week of the year. } }); }));
{ "pile_set_name": "Github" }
parameters: level: max paths: - src ignoreErrors: - '#Call to an undefined method Mockery\\ExpectationInterface#' - '#Mockery\\(?:Legacy)?MockInterface#'
{ "pile_set_name": "Github" }
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.i18n.client.constants; import com.google.gwt.i18n.client.Constants; /** * DateTimeConstantsImpl class encapsulate a collection of DateTime formatting * symbols for use with DateTime format and parse services. This class extends * GWT's Constants class. The actual symbol collections are defined in a set of * property files named like "DateTimeConstants_xx.properties". GWT will will * perform late binding to the property file that specific to user's locale. */ public interface DateTimeConstantsImpl extends Constants, DateTimeConstants { String[] ampms(); String[] dateFormats(); String[] eraNames(); String[] eras(); String firstDayOfTheWeek(); String[] months(); String[] narrowMonths(); String[] narrowWeekdays(); String[] quarters(); String[] shortMonths(); String[] shortQuarters(); String[] shortWeekdays(); String[] standaloneMonths(); String[] standaloneNarrowMonths(); String[] standaloneNarrowWeekdays(); String[] standaloneShortMonths(); String[] standaloneShortWeekdays(); String[] standaloneWeekdays(); String[] timeFormats(); String[] weekdays(); String[] weekendRange(); }
{ "pile_set_name": "Github" }
import yadda from 'npm:yadda'; export default yadda;
{ "pile_set_name": "Github" }
define( [ 'dojo/query', 'dojox/charting/Chart', 'dojox/charting/axis2d/Default', 'dojox/charting/plot2d/Bubble', 'dojo/NodeList-dom', 'dojo/number' ], function( query, Chart ) { /** * Ruler, with ticks and numbers, drawn with HTML elements. Can be * stretched to any length. * * @class * @constructor * * @param {Number} args.min * @param {Number} args.max * @param {String} [args.direction="up"] The direction of increasing numbers. * Either "up" or "down". * @param {Boolean} args.leftBottom=true Should the ticks and labels be on the right * or the left. * */ function Ruler(args) { dojo.mixin( this, args ); }; Ruler.prototype.render_to = function( target_div ) { if( typeof target_div == 'string' ) target_div = dojo.byId( target_div ); var target_dims = dojo.position( target_div ); // make an inner container that's styled to compensate for the // 12px edge-padding that dojox.charting has builtin that we can't // change, making the tick marks align correctly with the images var label_digits = Math.floor( Math.log(this.max+1)/Math.log(10))+1; var container = dojo.create( 'div', { style: { position: 'absolute', left: "-9px", bottom: "-9px", width: '10px', height: (target_dims.h+18)+"px" } }, target_div ); try { var chart1 = new Chart( container, {fill: 'transparent'} ); chart1.addAxis( "y", { vertical: true, fill: 'transparent', min: this.min, max: this.max, fixLower: this.fixBounds ? (typeof this.fixBounds=='string' ? this.fixBounds : 'major') : 'none', fixUpper: this.fixBounds ? (typeof this.fixBounds=='string' ? this.fixBounds : 'major') : 'none', leftBottom: this.leftBottom // minorTickStep: 0.5, // majorTickStep: 1 //labels: [{value: 1, text: "One"}, {value: 3, text: "Ten"}] }); chart1.addPlot("default", {type: "Bubble", fill: 'transparent'}); chart1.render(); // hack to remove undesirable opaque white rectangles. do // this a little bit later query('svg rect', chart1.domNode ).orphan(); this.scaler = chart1.axes.y.scaler; } catch (x) { console.error(x+''); console.error("Failed to draw Ruler with SVG, your browser may not support the necessary technology."); target_div.removeChild( container ); } }; return Ruler; });
{ "pile_set_name": "Github" }
#hall-living_room-veranda you are in the hall to the east there is the corridor to the north there is the library to the west there is the living_room to the south there is the garden ? what do you want to do go to the veranda .cx >>> End context you are in the living_room to the east there is the hall to the north there is the kitchen to the west there is the veranda ? what do you want to do .x -> west . west >>> End context
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:scrollbars="none"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="50dp" android:background="#f5f6f7" android:gravity="center_vertical" android:paddingLeft="16dp" android:text="@string/dk_network_detail_title_body" android:textColor="#337cc4" android:textSize="@dimen/dk_font_size_16" /> <View style="@style/DK.Divider" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="50dp" android:layout_alignParentLeft="true" android:gravity="center_vertical" android:paddingLeft="16dp" android:text="@string/dk_network_detail_title_size" android:textColor="#333333" android:textSize="@dimen/dk_font_size_16" /> <TextView android:id="@+id/tv_data_size" android:layout_width="wrap_content" android:layout_height="50dp" android:layout_alignParentRight="true" android:gravity="center_vertical" android:paddingRight="16dp" android:textColor="#666666" android:textSize="@dimen/dk_font_size_16" /> </RelativeLayout> <View style="@style/DK.Divider" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="50dp" android:layout_alignParentLeft="true" android:gravity="center_vertical" android:paddingLeft="16dp" android:text="@string/dk_network_method" android:textColor="#333333" android:textSize="@dimen/dk_font_size_16" /> <TextView android:id="@+id/tv_method" android:layout_width="wrap_content" android:layout_height="50dp" android:layout_alignParentRight="true" android:gravity="center_vertical" android:paddingRight="16dp" android:textColor="#666666" android:textSize="@dimen/dk_font_size_16" /> </RelativeLayout> <View style="@style/DK.Divider" /> <TextView android:layout_width="match_parent" android:layout_height="50dp" android:background="#f5f6f7" android:gravity="center_vertical" android:paddingLeft="16dp" android:text="@string/dk_network_detail_title_url" android:textColor="#337cc4" android:textSize="@dimen/dk_font_size_16" /> <View style="@style/DK.Divider" /> <TextView android:id="@+id/tv_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:minHeight="50dp" android:paddingLeft="16dp" android:paddingTop="10dp" android:paddingRight="16dp" android:paddingBottom="10dp" android:textColor="#333333" android:textIsSelectable="true" android:textSize="@dimen/dk_font_size_16" /> <View style="@style/DK.Divider" /> <TextView android:id="@+id/diver_time" android:layout_width="match_parent" android:layout_height="50dp" android:background="#f5f6f7" android:gravity="center_vertical" android:paddingLeft="16dp" android:text="@string/dk_network_detail_title_request_time" android:textColor="#337cc4" android:textSize="@dimen/dk_font_size_16" /> <View style="@style/DK.Divider" /> <TextView android:id="@+id/tv_time" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:minHeight="50dp" android:paddingLeft="16dp" android:paddingTop="10dp" android:paddingRight="16dp" android:paddingBottom="10dp" android:textColor="#333333" android:textSize="@dimen/dk_font_size_16" /> <View style="@style/DK.Divider" /> <TextView android:id="@+id/diver_header" android:layout_width="match_parent" android:layout_height="50dp" android:background="#f5f6f7" android:gravity="center_vertical" android:paddingLeft="16dp" android:text="@string/dk_network_detail_title_request_header" android:textColor="#337cc4" android:textSize="@dimen/dk_font_size_16" /> <View style="@style/DK.Divider" /> <TextView android:id="@+id/tv_header" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:minHeight="50dp" android:paddingLeft="16dp" android:paddingTop="10dp" android:paddingRight="16dp" android:paddingBottom="10dp" android:textColor="#333333" android:textIsSelectable="true" android:textSize="@dimen/dk_font_size_16" /> <View style="@style/DK.Divider" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="50dp" android:background="#f5f6f7"> <TextView android:id="@+id/diver_body" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignParentLeft="true" android:layout_marginLeft="16dp" android:gravity="center_vertical" android:text="@string/dk_network_detail_title_request_body" android:textColor="#337cc4" android:textSize="@dimen/dk_font_size_16" /> <TextView android:id="@+id/diver_format" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignParentRight="true" android:layout_marginRight="16dp" android:gravity="center_vertical" android:text="ๆ ผๅผๅŒ–" android:textColor="#337cc4" android:textSize="@dimen/dk_font_size_16" /> </RelativeLayout> <View style="@style/DK.Divider" /> <TextView android:id="@+id/tv_body" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:minHeight="50dp" android:paddingLeft="16dp" android:paddingTop="14dp" android:paddingRight="16dp" android:paddingBottom="14dp" android:textColor="#333333" android:textIsSelectable="true" android:textSize="@dimen/dk_font_size_16" /> <com.didichuxing.
{ "pile_set_name": "Github" }
package net.thisptr.jackson.jq.internal.tree; import java.util.List; import java.util.Stack; import com.fasterxml.jackson.databind.JsonNode; import net.thisptr.jackson.jq.Expression; import net.thisptr.jackson.jq.PathOutput; import net.thisptr.jackson.jq.Scope; import net.thisptr.jackson.jq.exception.JsonQueryException; import net.thisptr.jackson.jq.internal.tree.matcher.PatternMatcher; import net.thisptr.jackson.jq.internal.tree.matcher.PatternMatcher.MatchWithPath; import net.thisptr.jackson.jq.path.Path; public class ForeachExpression implements Expression { private Expression iterExpr; private Expression updateExpr; private Expression initExpr; private Expression extractExpr; private PatternMatcher matcher; public ForeachExpression(final PatternMatcher matcher, final Expression initExpr, final Expression updateExpr, final Expression extractExpr, final Expression iterExpr) { this.matcher = matcher; this.initExpr = initExpr; this.updateExpr = updateExpr; this.extractExpr = extractExpr; this.iterExpr = iterExpr; } @Override public void apply(final Scope scope, final JsonNode in, final Path ipath, final PathOutput output, final boolean requirePath) throws JsonQueryException { initExpr.apply(scope, in, ipath, (accumulator, accumulatorPath) -> { // Wrap in array to allow mutation inside lambda final JsonNode[] accumulators = new JsonNode[] { accumulator }; final Path[] accumulatorPaths = new Path[] { accumulatorPath }; final Scope childScope = Scope.newChildScope(scope); iterExpr.apply(scope, in, ipath, (item, itemPath) -> { final Stack<MatchWithPath> stack = new Stack<>(); matcher.matchWithPath(scope, item, itemPath, (final List<MatchWithPath> vars) -> { for (int i = vars.size() - 1; i >= 0; --i) { final MatchWithPath var = vars.get(i); childScope.setValueWithPath(var.name, var.value, var.path); } updateExpr.apply(childScope, accumulators[0], accumulatorPaths[0], (newaccumulator, newaccumulatorPath) -> { if (extractExpr != null) { extractExpr.apply(childScope, newaccumulator, newaccumulatorPath, output, requirePath); } else { output.emit(newaccumulator, newaccumulatorPath); } accumulators[0] = newaccumulator; accumulatorPaths[0] = newaccumulatorPath; }, extractExpr != null ? false : requirePath); }, stack, true); }, requirePath); }, false); } @Override public String toString() { if (extractExpr == null) { return String.format("(foreach %s as %s (%s; %s))", iterExpr, matcher, initExpr, updateExpr); } else { return String.format("(foreach %s as %s (%s; %s; %s))", iterExpr, matcher, initExpr, updateExpr, extractExpr); } } }
{ "pile_set_name": "Github" }
3 3 1 2 1 3 2 3 3 1 2 1 2 1 2 1 1 1
{ "pile_set_name": "Github" }
// // Created by Matt Greenfield on 24/05/12. // http://bigpaua.com/ // #import "MGLayoutBox.h" typedef enum { MGBorderNone = 0, MGBorderEtchedTop = 1 << 1, MGBorderEtchedBottom = 1 << 2, MGBorderEtchedLeft = 1 << 3, MGBorderEtchedRight = 1 << 4, MGBorderEtchedAll = (MGBorderEtchedTop | MGBorderEtchedBottom | MGBorderEtchedLeft | MGBorderEtchedRight) } MGBorderStyle; @interface MGBox : UIView <MGLayoutBox, UIGestureRecognizerDelegate> // init methods + (id)box; + (id)boxWithSize:(CGSize)size; - (void)setup; // layout - (void)layoutWithSpeed:(NSTimeInterval)speed completion:(Block)completion; // performance @property (nonatomic, assign) BOOL rasterize; // borders @property (nonatomic, assign) MGBorderStyle borderStyle; @property (nonatomic, retain) UIColor *topBorderColor; @property (nonatomic, retain) UIColor *bottomBorderColor; @property (nonatomic, retain) UIColor *leftBorderColor; @property (nonatomic, retain) UIColor *rightBorderColor; @property (nonatomic, retain) UIView *topBorder; @property (nonatomic, retain) UIView *bottomBorder; @property (nonatomic, retain) UIView *leftBorder; @property (nonatomic, retain) UIView *rightBorder; - (void)setBorderColors:(id)colors; // sugar - (UIImage *)screenshot:(float)scale; @end
{ "pile_set_name": "Github" }
/** * Copyright (c) 2012-2015, Christopher Jeffrey, Peter Sunde (MIT License) * Copyright (c) 2016, Daniel Imms (MIT License). * Copyright (c) 2018, Microsoft Corporation (MIT License). */ import { ITerminal, IPtyOpenOptions, IPtyForkOptions, IWindowsPtyForkOptions } from './interfaces'; import { ArgvOrCommandLine } from './types'; let terminalCtor: any; if (process.platform === 'win32') { terminalCtor = require('./windowsTerminal').WindowsTerminal; } else { terminalCtor = require('./unixTerminal').UnixTerminal; } /** * Forks a process as a pseudoterminal. * @param file The file to launch. * @param args The file's arguments as argv (string[]) or in a pre-escaped * CommandLine format (string). Note that the CommandLine option is only * available on Windows and is expected to be escaped properly. * @param options The options of the terminal. * @throws When the file passed to spawn with does not exists. * @see CommandLineToArgvW https://msdn.microsoft.com/en-us/library/windows/desktop/bb776391(v=vs.85).aspx * @see Parsing C++ Comamnd-Line Arguments https://msdn.microsoft.com/en-us/library/17w5ykft.aspx * @see GetCommandLine https://msdn.microsoft.com/en-us/library/windows/desktop/ms683156.aspx */ export function spawn(file?: string, args?: ArgvOrCommandLine, opt?: IPtyForkOptions | IWindowsPtyForkOptions): ITerminal { return new terminalCtor(file, args, opt); } /** @deprecated */ export function fork(file?: string, args?: ArgvOrCommandLine, opt?: IPtyForkOptions | IWindowsPtyForkOptions): ITerminal { return new terminalCtor(file, args, opt); } /** @deprecated */ export function createTerminal(file?: string, args?: ArgvOrCommandLine, opt?: IPtyForkOptions | IWindowsPtyForkOptions): ITerminal { return new terminalCtor(file, args, opt); } export function open(options: IPtyOpenOptions): ITerminal { return terminalCtor.open(options); } /** * Expose the native API when not Windows, note that this is not public API and * could be removed at any time. */ export const native = (process.platform !== 'win32' ? require('../build/Release/pty.node') : null);
{ "pile_set_name": "Github" }
require 'pact_broker/matrix/quick_row' require 'pact_broker/matrix/resolved_selector' module PactBroker module Matrix describe QuickRow do describe "the interface" do before do td.create_pact_with_hierarchy("A", "1", "B") .create_verification(provider_version: '1', success: false) .create_verification(provider_version: '1', number: 2, success: true) .create_verification(provider_version: '2', number: 3, success: true) .create_provider("C") .create_pact .create_verification(provider_version: '1') .create_consumer_version("2") .create_pact .create_verification(provider_version: '3') .use_provider("B") .create_pact end it "behaves like a Row, except quicker" do a_id = QuickRow.db[:pacticipants].where(name: "A").select(:id).single_record[:id] rows = QuickRow.default_scope.where(consumer_id: a_id).eager(:consumer).eager(:verification).all expect(rows.first.consumer).to be rows.last.consumer expect(rows.first.verification).to_not be nil expect(rows.first.consumer_name).to_not be nil expect(rows.first.provider_name).to_not be nil end end describe "order_by_last_action_date" do subject { QuickRow.default_scope.order_by_last_action_date } context "when there are two pacts verified at the same time" do before do td.create_consumer("Foo") .create_provider("Bar") .create_consumer_version("10") .create_pact(created_at: day_1) .create_verification(provider_version: "2", created_at: day_3) .create_consumer_version("3") .create_pact(created_at: day_2) .create_verification(provider_version: "2", created_at: day_3) end let(:day_1) { DateTime.now + 1 } let(:day_2) { DateTime.now + 2 } let(:day_3) { DateTime.now + 3 } it "orders by the pact publication id desc" do expect(subject.first.last_action_date).to eq subject.last.last_action_date expect(subject.first.consumer_version_number).to eq "3" expect(subject.last.consumer_version_number).to eq "10" end end context "when a pact has been published after a pact has been verified" do before do td.create_pact_with_verification("Foo", "1", "Bar", "2") .create_pact_with_hierarchy("Foo", "2", "Bar") end it "puts the unverified pact before the verification" do expect(subject.first.consumer_version_number).to eq "2" expect(subject.last.consumer_version_number).to eq "1" end end end end end end
{ "pile_set_name": "Github" }
<template> <el-popover placement="top-start" trigger="hover" :content="`็”ต้‡๏ผš${leftVal}%`"> <span class="battery-content" :class="color" slot="reference"> <!-- ๅฐไบŽ20ๆ˜ฏ็บข่‰ฒ๏ผŒ20ๅˆฐ80ไธบ้ป„่‰ฒ๏ผŒๅคงไบŽ80ไธบ็ปฟ่‰ฒ --> <progress id="pg" max="100" :value="leftVal" class="battery-progress"></progress> </span> </el-popover> </template> <script> export default { name: 'Battery', data() { return {}; }, computed: { color () { let val = this.leftVal / 1 if (val <= 20) { return 'little' } if (val < 80) { return 'medium' } return 'full' } }, props: [ 'leftVal' ] }; </script> <style lang="scss" scoped> .battery-content { width: 25px; height: 12px; display: inline-block; } .battery-progress { width: 100%; height: 100%; border: 1px solid black; border-radius: 0.1rem; } /* ่กจ็คบๆ€ป้•ฟๅบฆ่ƒŒๆ™ฏ่‰ฒ */ .battery-progress::-webkit-progress-bar { background-color: white; } .little { .battery-progress { border: 1px solid red; } .battery-progress::-webkit-progress-value { background: red; } } .medium { .battery-progress { border: 1px solid rgb(243, 141, 7); } .battery-progress::-webkit-progress-value { background: rgb(243, 141, 7); } } .full { .battery-progress { border: 1px solid rgb(29, 196, 27); } .battery-progress::-webkit-progress-value { background: rgb(29, 196, 27); } } </style>
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en-US" class="no-js"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width"> <link rel="profile" href="https://gmpg.org/xfn/11"> <link rel="pingback" href="https://publicizetests.wpsandbox.me/xmlrpc.php"> <!--[if lt IE 9]> <script src="https://publicizetests.wpsandbox.me/wp-content/themes/twentyfifteen/js/html5.js?ver=3.7.0"></script> <![endif]--> <script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script> <title>Unsupported Shortcodes test &#8211; Publicize Jetpack</title> <meta name='robots' content='noindex,nofollow' /> <link rel='dns-prefetch' href='//secure.gravatar.com' /> <link rel='dns-prefetch' href='//fonts.googleapis.com' /> <link rel='dns-prefetch' href='//s.w.org' /> <link rel='dns-prefetch' href='//v0.wordpress.com' /> <link rel='dns-prefetch' href='//i0.wp.com' /> <link rel='dns-prefetch' href='//i1.wp.com' /> <link rel='dns-prefetch' href='//i2.wp.com' /> <link href='https://fonts.gstatic.com' crossorigin rel='preconnect' /> <link rel="alternate" type="application/rss+xml" title="Publicize Jetpack &raquo; Feed" href="https://publicizetests.wpsandbox.me/feed/" /> <link rel="alternate" type="application/rss+xml" title="Publicize Jetpack &raquo; Comments Feed" href="https://publicizetests.wpsandbox.me/comments/feed/" /> <link rel="alternate" type="application/rss+xml" title="Publicize Jetpack &raquo; Unsupported Shortcodes test Comments Feed" href="https://publicizetests.wpsandbox.me/2015/06/29/unsupported-shortcodes-test/feed/" /> <script> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.0\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.0\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/publicizetests.wpsandbox.me\/wp-includes\/js\/wp-emoji-release.min.js?ver=5.6-alpha-49063"}}; !function(e,a,t){var r,n,o,i,p=a.createElement("canvas"),s=p.getContext&&p.getContext("2d");function c(e,t){var a=String.fromCharCode;s.clearRect(0,0,p.width,p.height),s.fillText(a.apply(this,e),0,0);var r=p.toDataURL();return s.clearRect(0,0,p.width,p.height),s.fillText(a.apply(this,t),0,0),r===p.toDataURL()}function l(e){if(!s||!s.fillText)return!1;switch(s.textBaseline="top",s.font="600 32px Arial",e){case"flag":return!c([127987,65039,8205,9895,65039],[127987,65039,8203,9895,65039])&&(!c([55356,56826,55356,56819],[55356,56826,8203,55356,56819])&&!c([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]));case"emoji":return!c([55357,56424,8205,55356,57212],[55357,56424,8203,55356,57212])}return!1}function d(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(i=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},o=0;o<i.length;o++)t.supports[i[o]]=l(i[o]),t.supports.everything=t.supports.everything&&t.supports[i[o]],"flag"!==i[o]&&(t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&t.supports[i[o]]);t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&!t.supports.flag,t.DOMReady=!1,t.readyCallback=function(){t.DOMReady=!0},t.supports.everything||(n=function(){t.readyCallback()},a.addEventListener?(a.addEventListener("DOMContentLoaded",n,!1),e.addEventListener("load",n,!1)):(e.attachEvent("onload",n),a.attachEvent("onreadystatechange",function(){"complete"===a.readyState&&t.readyCallback()})),(r=t.source||{}).concatemoji?d(r.concatemoji):r.wpemoji&&r.twemoji&&(d(r.twemoji),d(r.wpemoji)))}(window,document,window._wpemojiSettings); </script> <style> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='twentyfifteen-jetpack-css' href='https://publicizetests.wpsandbox.me/wp-content/plugins/jetpack/modules/theme-tools/compat/twentyfifteen.css?ver=8.9.1' media='all' /> <link rel='stylesheet' id='wp-block-library-css' href='https://publicizetests.wpsandbox.me/wp-includes/css/dist/block-library/style.min.css?ver=5.6-alpha-49063' media='all' /> <style id='wp-block-library-inline-css'> .has-text-align-justify{text-align:justify;} </style> <link rel='stylesheet' id='wp-block-library-theme-css' href='https://publicizetests.wpsandbox.me/wp-includes/css/dist/block-library/theme.min.css?ver=5.6-alpha-49063' media='all' /> <link rel='stylesheet' id='twentyfifteen-fonts-css' href='https://fonts.googleapis.com/css?family=Noto+Sans%3A400italic%2C700italic%2C400%2C700%7CNoto+Serif%3A400italic%2C700italic%2C400%2C700%7CInconsolata%3A400%2C700&#038;subset=latin%2Clatin-ext&#038;display=fallback' media='all' /> <link rel='stylesheet' id='genericons-css' href='https://publicizetests.wpsandbox.me/wp-content/plugins/jetpack/_inc/genericons/genericons/genericons.css?ver=3.1' media='all' /> <
{ "pile_set_name": "Github" }
/*! * @license * Copyright 2019 Alfresco, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { Component, OnInit, Input } from '@angular/core'; import { CardItemTypeService } from '@alfresco/adf-core'; import { Store } from '@ngrx/store'; import { AmaState, EntityProperty, MessagePayload, selectSelectedProcess, ConnectorParameter, ParametersSelectOptions, MappingType, Process, ServiceParameterMapping, ProcessExtensionsModel, BpmnElement, ServiceParameterMappings } from '@alfresco-dbp/modeling-shared/sdk'; import { MatTableDataSource } from '@angular/material/table'; import { filter, take } from 'rxjs/operators'; import { MessageVariableMappingService } from './message-variable-mapping.service'; import { MessageItemModel } from '../message-item/message-item.model'; @Component({ selector: 'ama-message-variable-mapping', templateUrl: './message-variable-mapping.component.html', providers: [CardItemTypeService] }) export class CardViewMessageVariableMappingComponent implements OnInit { @Input() message: Bpmn.DiagramElement; @Input() property: MessageItemModel; displayedColumns: string[] = ['name', 'process-variable']; dataSource: MatTableDataSource<any>; processVariables: EntityProperty[]; payloadProperties: MessagePayload[] = []; mapping: ServiceParameterMapping = {}; optionsForParams: ParametersSelectOptions = {}; paramName2VariableName: { [paramName: string]: string } = {}; private get modelEvents(): Bpmn.BusinessObject[] { if (this.property.data.element.parent.type === BpmnElement.Process) { return this.property.data.element.parent.businessObject.flowElements; } else { const process = this.property.data.element.parent.businessObject.$parent.$parent.rootElements.filter((element) => element.$type === BpmnElement.Process); return process.reduce((allElements, currentElement) => { const flows = currentElement.flowElements.filter(childElement => childElement.flowElements).map(element => element.flowElements); return [ ...allElements, ...currentElement.flowElements, ...flows ]; } , []); } } private get elementId(): string { return this.property.data.id; } constructor(private store: Store<AmaState>, private messageVariableMappingService: MessageVariableMappingService) { } ngOnInit() { this.store.select(selectSelectedProcess) .pipe( filter((process: Process) => !!process), take(1)) .subscribe((process: Process) => { const processExtensionsModel = new ProcessExtensionsModel(process.extensions); this.mapping = this.getMappingFromProcess(processExtensionsModel.getMappings(this.property.data.processId)); this.processVariables = Object.values(processExtensionsModel.getProperties(this.property.data.processId)); this.payloadProperties = this.parseMessagePayload(processExtensionsModel.getAllMappings()); this.dataSource = new MatTableDataSource(this.payloadProperties); this.initMapping(); }); } initMapping() { this.payloadProperties.forEach((payloadProperty) => { if (this.mapping) { Object.keys(this.mapping).map((outputProperty) => { if (this.mapping[outputProperty].value === payloadProperty.name) { this.paramName2VariableName[payloadProperty.name] = outputProperty; } }); } this.optionsForParams[payloadProperty.name] = this.processVariables.filter((prop) => prop.type === payloadProperty.type); }); } parseMessagePayload(messageMappings: ServiceParameterMappings): MessagePayload[] { const payloadMessageEvent = this.messageVariableMappingService.getPayloadMessageEventByMessageId(this.modelEvents, this.message.id, this.elementId); return this.messageVariableMappingService.parseMessagePayload(payloadMessageEvent, messageMappings); } getMappingFromProcess(mappings: ServiceParameterMappings): ServiceParameterMapping { return mappings[this.elementId] && mappings[this.elementId].outputs ? { ...mappings[this.elementId].outputs } : {}; } selectVariable(selection: string, param: ConnectorParameter) { this.mapping = { ...this.mapping }; if (!selection) { Object.keys(this.mapping).forEach((property) => { if (this.mapping[property].value === param.name) { delete this.mapping[property]; } }); } else { this.mapping[selection] = { type: MappingType.variable, value: param.name }; } this.messageVariableMappingService.updateMessagePayloadMapping(this.property.data.processId, this.elementId, { outputs: this.mapping }); } hasPayload(): boolean { return this.payloadProperties.length > 0; } }
{ "pile_set_name": "Github" }
๏ปฟ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <ProjectGuid>{0BCBFEAF-6370-46BD-996D-6333FCF87133}</ProjectGuid> <ProjectVersion>16.0</ProjectVersion> <FrameworkType>VCL</FrameworkType> <MainSource>app_56_RunInvoke.dpr</MainSource> <Base>True</Base> <Config Condition="'$(Config)'==''">Debug</Config> <Platform Condition="'$(Platform)'==''">Win32</Platform> <TargetedPlatforms>1</TargetedPlatforms> <AppType>Application</AppType> </PropertyGroup> <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> <Base>true</Base> </PropertyGroup> <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''"> <Base_Win64>true</Base_Win64> <CfgParent>Base</CfgParent> <Base>true</Base> </PropertyGroup> <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''"> <Base_Win32>true</Base_Win32> <CfgParent>Base</CfgParent> <Base>true</Base> </PropertyGroup> <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''"> <Cfg_1>true</Cfg_1> <CfgParent>Base</CfgParent> <Base>true</Base> </PropertyGroup> <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''"> <Cfg_1_Win32>true</Cfg_1_Win32> <CfgParent>Cfg_1</CfgParent> <Cfg_1>true</Cfg_1> <Base>true</Base> </PropertyGroup> <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''"> <Cfg_2>true</Cfg_2> <CfgParent>Base</CfgParent> <Base>true</Base> </PropertyGroup> <PropertyGroup Condition="'$(Base)'!=''"> <Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon> <SanitizedProjectName>app_56_RunInvoke</SanitizedProjectName> <DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace> <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput> <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput> <DCC_E>false</DCC_E> <DCC_N>false</DCC_N> <DCC_S>false</DCC_S> <DCC_F>false</DCC_F> <DCC_K>false</DCC_K> </PropertyGroup> <PropertyGroup Condition="'$(Base_Win64)'!=''"> <DCC_UsePackage>IndyIPClient;FireDACASADriver;FireDACSqliteDriver;bindcompfmx;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;FireDACODBCDriver;RESTBackendComponents;emsclientfiredac;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;FireDACCommon;bindcomp;inetdb;tethering;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DBXOdbcDriver;vclFireDAC;DataSnapProviderClient;xmlrtl;DataSnapNativeClient;DBXSybaseASEDriver;DbxCommonDriver;vclimg;ibxpress;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;FireDACCommonDriver;MetropolisUILiveTile;bindengine;vclactnband;vcldb;bindcompdbx;soaprtl;vcldsnap;bindcompvcl;vclie;fmxFireDAC;FireDACADSDriver;vcltouch;DBXDb2Driver;emsclient;CustomIPTransport;DBXOracleDriver;vclribbon;VCLRESTComponents;FireDACMSSQLDriver;FireDAC;VclSmp;dsnap;DBXInformixDriver;vcl;DataSnapConnectors;fmxase;DataSnapServerMidas;DBXMSSQLDriver;IndyIPCommon;IndyCore;dsnapcon;FireDACIBDriver;DBXFirebirdDriver;inet;IndyIPServer;DataSnapFireDAC;fmxobj;CloudService;FireDACDBXDriver;FireDACMySQLDriver;soapmidas;vclx;soapserver;inetdbxpress;DBXSybaseASADriver;dsnapxml;FireDACOracleDriver;FireDACInfxDriver;FireDACDb2Driver;RESTComponents;fmxdae;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;adortl;$(DCC_UsePackage)</DCC_UsePackage> </PropertyGroup> <PropertyGroup Condition="'$(Base_Win32)'!=''"> <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace> <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File> <VerInfo_Locale>1033</VerInfo_Locale> <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys> <DCC_UsePackage>IndyIPClient;FireDACASADriver;FireDACSqliteDriver;bindcompfmx;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;FireDACODBCDriver;RESTBackendComponents;emsclientfiredac;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;FireDACCommon;bindcomp;inetdb;tethering;vclib;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DBXOdbcDriver;vclFireDAC;DataSnapProviderClient;xmlrtl;DataSnapNativeClient;DBXSybaseASEDriver;DbxCommonDriver;svnui;vclimg;ibxpress;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;FireDACCommonDriver;MetropolisUILiveTile;bindengine;vclactnband;vcldb;bindcompdbx;soaprtl;vcldsnap;bindcompvcl;vclie;OmniThreadLibraryRuntimeXE7;fmxFireDAC;FireDACADSDriver;vcltouch;DBXDb2Driver;emsclient;CustomIPTransport;DBXOracleDriver;vclribbon;VCLRESTComponents;FireDACMSSQLDriver;FireDAC;VclSmp;dsnap;DBXInformixDriver;vcl;DataSnapConnectors;fmxase;DataSnapServerMidas;DBXMSSQLDriver;IndyIPCommon;IndyCore;dsnapcon;FireDACIBDriver;DBXFirebirdDriver;inet;IndyIPServer;DataSnapFireDAC;fmxobj;CloudService;FireDACDBXDriver;FireDACMySQLDriver;soapmidas;vclx;soapserver;inetdbxpress;svn;DBXSybaseASADriver;dsnapxml;FireDACOracleDriver;FireDACInfxDriver;FireDACDb2Driver;RESTComponents;fmxdae;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;adortl;$(DCC_UsePackage)</DCC_UsePackage> </PropertyGroup> <PropertyGroup Condition="'$(Cfg_1)'!=''"> <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define> <DCC
{ "pile_set_name": "Github" }
# JTI OpenConfig Telemetry Input Plugin This plugin reads Juniper Networks implementation of OpenConfig telemetry data from listed sensors using Junos Telemetry Interface. Refer to [openconfig.net](http://openconfig.net/) for more details about OpenConfig and [Junos Telemetry Interface (JTI)](https://www.juniper.net/documentation/en_US/junos/topics/concept/junos-telemetry-interface-oveview.html). ### Configuration: ```toml # Subscribe and receive OpenConfig Telemetry data using JTI [[inputs.jti_openconfig_telemetry]] ## List of device addresses to collect telemetry from servers = ["localhost:1883"] ## Authentication details. Username and password are must if device expects ## authentication. Client ID must be unique when connecting from multiple instances ## of telegraf to the same device username = "user" password = "pass" client_id = "telegraf" ## Frequency to get data sample_frequency = "1000ms" ## Sensors to subscribe for ## A identifier for each sensor can be provided in path by separating with space ## Else sensor path will be used as identifier ## When identifier is used, we can provide a list of space separated sensors. ## A single subscription will be created with all these sensors and data will ## be saved to measurement with this identifier name sensors = [ "/interfaces/", "collection /components/ /lldp", ] ## We allow specifying sensor group level reporting rate. To do this, specify the ## reporting rate in Duration at the beginning of sensor paths / collection ## name. For entries without reporting rate, we use configured sample frequency sensors = [ "1000ms customReporting /interfaces /lldp", "2000ms collection /components", "/interfaces", ] ## Optional TLS Config # enable_tls = true # tls_ca = "/etc/telegraf/ca.pem" # tls_cert = "/etc/telegraf/cert.pem" # tls_key = "/etc/telegraf/key.pem" ## Use TLS but skip chain & host verification # insecure_skip_verify = false ## Delay between retry attempts of failed RPC calls or streams. Defaults to 1000ms. ## Failed streams/calls will not be retried if 0 is provided retry_delay = "1000ms" ## To treat all string values as tags, set this to true str_as_tags = false ``` ### Tags: - All measurements are tagged appropriately using the identifier information in incoming data
{ "pile_set_name": "Github" }
/* gunicodeprivate.h * * Copyright (C) 2012 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef __G_CHARSET_PRIVATE_H__ #define __G_CHARSET_PRIVATE_H__ #include "gcharset.h" G_BEGIN_DECLS const char ** _g_charset_get_aliases (const char *canonical_name); G_END_DECLS #endif
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleVersion</key> <string>1</string> <key>LSRequiresIPhoneOS</key> <true/> <key>UIApplicationSceneManifest</key> <dict> <key>UIApplicationSupportsMultipleScenes</key> <false/> <key>UISceneConfigurations</key> <dict> <key>UIWindowSceneSessionRoleApplication</key> <array> <dict> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UISceneConfigurationName</key> <string>Default Configuration</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string> </dict> </array> </dict> </dict> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> </array> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> </dict> </plist>
{ "pile_set_name": "Github" }
This Swedish Dictionary for Spell Checking is maintained by Gรถran Andersson <goran@init.se>. ************ COPYRIGHT ************ Copyright ยฉ 2003-19 Gรถran Andersson <goran@init.se>. This dictionary is made available subject to the terms of GNU Lesser General Public License Version 3. A copy of the LGPL license can be found at http://www.gnu.org/licenses/lgpl-3.0.html .
{ "pile_set_name": "Github" }
.panel { overflow: hidden; text-align: left; margin: 0; border: 0; -moz-border-radius: 0 0 0 0; -webkit-border-radius: 0 0 0 0; border-radius: 0 0 0 0; } .panel-header, .panel-body { border-width: 1px; border-style: solid; } .panel-header { padding: 5px; position: relative; } .panel-title { background: url('images/blank.gif') no-repeat; } .panel-header-noborder { border-width: 0 0 1px 0; } .panel-body { overflow: auto; border-top-width: 0; padding: 0; } .panel-body-noheader { border-top-width: 1px; } .panel-body-noborder { border-width: 0px; } .panel-body-nobottom { border-bottom-width: 0; } .panel-with-icon { padding-left: 18px; } .panel-icon, .panel-tool { position: absolute; top: 50%; margin-top: -8px; height: 16px; overflow: hidden; } .panel-icon { left: 5px; width: 16px; } .panel-tool { right: 5px; width: auto; } .panel-tool a { display: inline-block; width: 16px; height: 16px; opacity: 0.6; filter: alpha(opacity=60); margin: 0 0 0 2px; vertical-align: top; } .panel-tool a:hover { opacity: 1; filter: alpha(opacity=100); background-color: #eaf2ff; -moz-border-radius: 3px 3px 3px 3px; -webkit-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; } .panel-loading { padding: 11px 0px 10px 30px; } .panel-noscroll { overflow: hidden; } .panel-fit, .panel-fit body { height: 100%; margin: 0; padding: 0; border: 0; overflow: hidden; } .panel-loading { background: url('images/loading.gif') no-repeat 10px 10px; } .panel-tool-close { background: url('images/panel_tools.png') no-repeat -16px 0px; } .panel-tool-min { background: url('images/panel_tools.png') no-repeat 0px 0px; } .panel-tool-max { background: url('images/panel_tools.png') no-repeat 0px -16px; } .panel-tool-restore { background: url('images/panel_tools.png') no-repeat -16px -16px; } .panel-tool-collapse { background: url('images/panel_tools.png') no-repeat -32px 0; } .panel-tool-expand { background: url('images/panel_tools.png') no-repeat -32px -16px; } .panel-header, .panel-body { border-color: #95B8E7; } .panel-header { background-color: #E0ECFF; background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0); } .panel-body { background-color: #ffffff; color: #000000; font-size: 12px; } .panel-title { font-size: 12px; font-weight: bold; color: #0E2D5F; height: 16px; line-height: 16px; } .panel-footer { border: 1px solid #95B8E7; overflow: hidden; background: #F4F4F4; } .panel-footer-noborder { border-width: 1px 0 0 0; } .accordion { overflow: hidden; border-width: 1px; border-style: solid; } .accordion .accordion-header { border-width: 0 0 1px; cursor: pointer; } .accordion .accordion-body { border-width: 0 0 1px; } .accordion-noborder { border-width: 0; } .accordion-noborder .accordion-header { border-width: 0 0 1px; } .accordion-noborder .accordion-body { border-width: 0 0 1px; } .accordion-collapse { background: url('images/accordion_arrows.png') no-repeat 0 0; } .accordion-expand { background: url('images/accordion_arrows.png') no-repeat -16px 0; } .accordion { background: #ffffff; border-color: #95B8E7; } .accordion .accordion-header { background: #E0ECFF; filter: none; } .accordion .accordion-header-selected { background: #ffe48d; } .accordion .accordion-header-selected .panel-title { color: #000000; } .window { overflow: hidden; padding: 5px; border-width: 1px; border-style: solid; } .window .window-header { background: transparent; padding: 0px 0px 6px 0px; } .window .window-body { border-width: 1px; border-style: solid; border-top-width: 0px; } .window .window-body-noheader { border-top-width: 1px; } .window .panel-body-nobottom { border-bottom-width: 0; } .window .window-header .panel-icon, .window .window-header .panel-tool { top: 50%; margin-top: -11px; } .window .window-header .panel-icon { left: 1px; } .window .window-header .panel-tool { right: 1px; } .window .window-header .panel-with-icon { padding-left: 18px; } .window-proxy { position: absolute; overflow: hidden; } .window-proxy-mask { position: absolute; filter: alpha(opacity=5); opacity: 0.05; } .window-mask { position: absolute; left: 0; top: 0; width: 100%; height: 100%; filter: alpha(opacity=40); opacity: 0.40; font-size: 1px; overflow: hidden; } .window, .window-shadow { position: absolute; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .window-shadow { background: #ccc; -moz-box-shadow: 2px 2px 3px #cccccc; -webkit-box-shadow: 2px 2px 3px #cccccc; box-shadow: 2px 2px 3px #cccccc; filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0
{ "pile_set_name": "Github" }
/* * Firetweet - Twitter client for Android * * Copyright (C) 2012-2014 Mariotaku Lee <mariotaku.lee@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.getlantern.firetweet.adapter; import android.app.Activity; import android.content.Context; import android.text.TextUtils; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import org.getlantern.firetweet.R; import org.getlantern.firetweet.adapter.iface.IBaseCardAdapter; import org.getlantern.firetweet.app.FiretweetApplication; import org.getlantern.firetweet.model.ParcelableUserList; import org.getlantern.firetweet.util.MediaLoaderWrapper; import org.getlantern.firetweet.util.MultiSelectManager; import org.getlantern.firetweet.util.UserColorNameUtils; import org.getlantern.firetweet.util.Utils; import org.getlantern.firetweet.view.holder.UserListViewListHolder; import java.util.List; import java.util.Locale; import static org.getlantern.firetweet.util.Utils.configBaseCardAdapter; import static org.getlantern.firetweet.util.Utils.getLocalizedNumber; import static org.getlantern.firetweet.util.Utils.openUserProfile; public class ParcelableUserListsListAdapter extends BaseArrayAdapter<ParcelableUserList> implements IBaseCardAdapter, OnClickListener { private final Context mContext; private final MediaLoaderWrapper mImageLoader; private final MultiSelectManager mMultiSelectManager; private final Locale mLocale; public ParcelableUserListsListAdapter(final Context context) { this(context, Utils.isCompactCards(context)); } public ParcelableUserListsListAdapter(final Context context, final boolean compactCards) { super(context, getItemResource(compactCards)); mContext = context; mLocale = context.getResources().getConfiguration().locale; final FiretweetApplication app = FiretweetApplication.getInstance(context); mImageLoader = app.getMediaLoaderWrapper(); mMultiSelectManager = app.getMultiSelectManager(); configBaseCardAdapter(context, this); } public void appendData(final List<ParcelableUserList> data) { setData(data, false); } @Override public long getItemId(final int position) { return getItem(position) != null ? getItem(position).id : -1; } @Override public View getView(final int position, final View convertView, final ViewGroup parent) { final View view = super.getView(position, convertView, parent); final Object tag = view.getTag(); final UserListViewListHolder holder; if (tag instanceof UserListViewListHolder) { holder = (UserListViewListHolder) tag; } else { holder = new UserListViewListHolder(view); holder.profile_image.setOnClickListener(this); // holder.content.setOnOverflowIconClickListener(this); view.setTag(holder); } holder.position = position; final ParcelableUserList userList = getItem(position); final String displayName = UserColorNameUtils.getDisplayName(mContext, userList.user_id, userList.user_name, userList.user_screen_name, isDisplayNameFirst(), false); holder.setTextSize(getTextSize()); holder.name.setText(userList.name); holder.created_by.setText(mContext.getString(R.string.created_by, displayName)); if (holder.description != null) { holder.description.setVisibility(TextUtils.isEmpty(userList.description) ? View.GONE : View.VISIBLE); holder.description.setText(userList.description); } if (holder.members_count != null) { holder.members_count.setText(getLocalizedNumber(mLocale, userList.members_count)); } if (holder.subscribers_count != null) { holder.subscribers_count.setText(getLocalizedNumber(mLocale, userList.subscribers_count)); } holder.profile_image.setVisibility(isProfileImageDisplayed() ? View.VISIBLE : View.GONE); if (isProfileImageDisplayed()) { mImageLoader.displayProfileImage(holder.profile_image, userList.user_profile_image_url); } else { mImageLoader.cancelDisplayTask(holder.profile_image); } holder.profile_image.setTag(position); return view; } @Override public void onClick(final View view) { if (mMultiSelectManager.isActive()) return; final Object tag = view.getTag(); final int position = tag instanceof Integer ? (Integer) tag : -1; if (position == -1) return; switch (view.getId()) { case R.id.profile_image: { if (mContext instanceof Activity) { final ParcelableUserList item = getItem(position); openUserProfile(mContext, item.account_id, item.user_id, item.user_screen_name, null); } break; } } } public void setData(final List<ParcelableUserList> data, final boolean clear_old) { if (clear_old) { clear(); } if (data == null) return; for (final ParcelableUserList user : data) { if (clear_old || findItemPosition(user.id) < 0) { add(user); } } } private static int getItemResource(final boolean compactCards) { // return compactCards ? R.layout.card_item_user_list_compact : R.layout.card_item_user_list; return R.layout.list_item_user_list; } }
{ "pile_set_name": "Github" }
LEG OF MUTTON IN CASSEROLE (Cosciotto di castrato in cazzaruola) Take a shoulder or a leg of mutton and after having boned it, lard it with small pieces of bacon dipped in salt and pepper. Salt moderately the meat then tie it tight and put it on the fire in a pan that contains a piece of butter and one large onion larded with clover. When it begins to brown, take it away from the fire and add a cup of broth, or of water, a little bunch of greens and some tomatoes cut in pieces. Put again on a low fire and let it simmer for three hours, keeping the saucepan closed, but opening from time to time to turn the meat. When it is cooked, throw away the onion, rub the sauce through a sieve, remove its fat and put it with the meat when served. The mutton must not be overdone, for in this case it cannot be sliced.
{ "pile_set_name": "Github" }
{ "images" : [ { "idiom" : "iphone", "size" : "20x20", "scale" : "2x" }, { "idiom" : "iphone", "size" : "20x20", "scale" : "3x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "app-icon-29pt.png", "scale" : "1x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "app-icon-29pt@2x.png", "scale" : "2x" }, { "size" : "29x29", "idiom" : "iphone", "filename" : "app-icon-29pt@3x.png", "scale" : "3x" }, { "size" : "40x40", "idiom" : "iphone", "filename" : "app-icon-40pt@2x.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "iphone", "filename" : "app-icon-40pt@3x.png", "scale" : "3x" }, { "idiom" : "iphone", "size" : "57x57", "scale" : "1x" }, { "idiom" : "iphone", "size" : "57x57", "scale" : "2x" }, { "size" : "60x60", "idiom" : "iphone", "filename" : "app-icon-60pt@2x.png", "scale" : "2x" }, { "size" : "60x60", "idiom" : "iphone", "filename" : "app-icon-60pt@3x.png", "scale" : "3x" }, { "idiom" : "ipad", "size" : "20x20", "scale" : "1x" }, { "idiom" : "ipad", "size" : "20x20", "scale" : "2x" }, { "size" : "29x29", "idiom" : "ipad", "filename" : "ipad-app-icon-29pt.png", "scale" : "1x" }, { "size" : "29x29", "idiom" : "ipad", "filename" : "ipad-app-icon-29pt@2x.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "ipad", "filename" : "app-icon-40pt.png", "scale" : "1x" }, { "size" : "40x40", "idiom" : "ipad", "filename" : "ipad-app-icon-40pt@2x.png", "scale" : "2x" }, { "idiom" : "ipad", "size" : "50x50", "scale" : "1x" }, { "idiom" : "ipad", "size" : "50x50", "scale" : "2x" }, { "idiom" : "ipad", "size" : "72x72", "scale" : "1x" }, { "idiom" : "ipad", "size" : "72x72", "scale" : "2x" }, { "size" : "76x76", "idiom" : "ipad", "filename" : "app-icon-76pt.png", "scale" : "1x" }, { "size" : "76x76", "idiom" : "ipad", "filename" : "app-icon-76pt@2x.png", "scale" : "2x" }, { "size" : "83.5x83.5", "idiom" : "ipad", "filename" : "app-icon-167.png", "scale" : "2x" }, { "size" : "1024x1024", "idiom" : "ios-marketing", "filename" : "app-icon-1024.png", "scale" : "1x" } ], "info" : { "version" : 1, "author" : "xcode" } }
{ "pile_set_name": "Github" }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { "genericSaveError": "'{0}' ใฎไฟๅญ˜ใซๅคฑๆ•—ใ—ใพใ—ใŸ: {1}", "saveFileFirst": "ใƒ•ใ‚กใ‚คใƒซใŒใƒ€ใƒผใƒ†ใ‚ฃใงใ™ใ€‚ใพใšไฟๅญ˜ใ—ใฆใ‹ใ‚‰ใ€ๅˆฅใฎใ‚จใƒณใ‚ณใƒผใƒ‰ใงๅ†ๅบฆ้–‹ใ„ใฆใใ ใ•ใ„ใ€‚", "unexpectedEventError": "ใƒ•ใ‚กใ‚คใƒซๅค‰ๆ›ดใƒชใ‚นใƒŠใƒผใ‹ใ‚‰ไบˆๆœŸใ—ใชใ„ใ‚จใƒฉใƒผใŒใ‚นใƒญใƒผใ•ใ‚Œใพใ—ใŸใ€‚ใƒชใ‚นใƒŠใƒผใฎ็จฎ้กž: {0}" }
{ "pile_set_name": "Github" }
/** ** Copyright (c) 2010 Ushahidi Inc ** All rights reserved ** Contact: team@ushahidi.com ** Website: http://www.ushahidi.com ** ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: http://www.gnu.org/licenses/lgpl.html. ** ** ** If you have questions regarding the use of this file, please contact ** Ushahidi developers at team@ushahidi.com. ** **/ package com.ushahidi.android.app.models; import java.util.List; import com.ushahidi.android.app.entities.UserEntity; /** * @author eyedol * * @param <users> * */ public class UserModel<users> extends Model { public List<UserEntity> users; }
{ "pile_set_name": "Github" }
/////////////////////////////////////////////////////////////////////////////////////////////////// // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) /////////////////////////////////////////////////////////////////////////////////////////////////// // Created : 2005-12-21 // Updated : 2008-07-24 // Licence : This source is under MIT License // File : glm/gtx/norm.inl /////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { template <typename T> GLM_FUNC_QUALIFIER T length2 ( T const & x ) { return x * x; } template <typename T, precision P> GLM_FUNC_QUALIFIER T length2 ( detail::tvec2<T, P> const & x ) { return dot(x, x); } template <typename T, precision P> GLM_FUNC_QUALIFIER T length2 ( detail::tvec3<T, P> const & x ) { return dot(x, x); } template <typename T, precision P> GLM_FUNC_QUALIFIER T length2 ( detail::tvec4<T, P> const & x ) { return dot(x, x); } template <typename T> GLM_FUNC_QUALIFIER T distance2 ( T const & p0, T const & p1 ) { return length2(p1 - p0); } template <typename T, precision P> GLM_FUNC_QUALIFIER T distance2 ( detail::tvec2<T, P> const & p0, detail::tvec2<T, P> const & p1 ) { return length2(p1 - p0); } template <typename T, precision P> GLM_FUNC_QUALIFIER T distance2 ( detail::tvec3<T, P> const & p0, detail::tvec3<T, P> const & p1 ) { return length2(p1 - p0); } template <typename T, precision P> GLM_FUNC_QUALIFIER T distance2 ( detail::tvec4<T, P> const & p0, detail::tvec4<T, P> const & p1 ) { return length2(p1 - p0); } template <typename T, precision P> GLM_FUNC_QUALIFIER T l1Norm ( detail::tvec3<T, P> const & a, detail::tvec3<T, P> const & b ) { return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z); } template <typename T, precision P> GLM_FUNC_QUALIFIER T l1Norm ( detail::tvec3<T, P> const & v ) { return abs(v.x) + abs(v.y) + abs(v.z); } template <typename T, precision P> GLM_FUNC_QUALIFIER T l2Norm ( detail::tvec3<T, P> const & a, detail::tvec3<T, P> const & b ) { return length(b - a); } template <typename T, precision P> GLM_FUNC_QUALIFIER T l2Norm ( detail::tvec3<T, P> const & v ) { return length(v); } template <typename T, precision P> GLM_FUNC_QUALIFIER T lxNorm ( detail::tvec3<T, P> const & x, detail::tvec3<T, P> const & y, unsigned int Depth ) { return pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth)); } template <typename T, precision P> GLM_FUNC_QUALIFIER T lxNorm ( detail::tvec3<T, P> const & v, unsigned int Depth ) { return pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth)); } }//namespace glm
{ "pile_set_name": "Github" }
#if 0 // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // fxc /Zpc /Tps_3_0 /Emain /Fh ShaderHeader/sprite_distortion_ps.h // Shader/sprite_distortion_ps.fx // // // Parameters: // // sampler2D Sampler_g_backSampler; // sampler2D Sampler_g_sampler; // float4 _73_g_scale; // float4 _73_mUVInversedBack; // // // Registers: // // Name Reg Size // --------------------- ----- ---- // _73_g_scale c0 1 // _73_mUVInversedBack c1 1 // Sampler_g_sampler s0 1 // Sampler_g_backSampler s1 1 // ps_3_0 def c2, -1, -0, 2, 1 def c3, 0.5, 1, 0, 0 dcl_texcoord v0.xyw dcl_texcoord1 v1.xy dcl_texcoord2 v2.xyw dcl_texcoord3 v3.xyw dcl_texcoord4 v4.xyw dcl_2d s0 dcl_2d s1 texld r0, v1, s0 mul r0.z, r0.w, v0.w cmp r1, -r0_abs.z, c2.x, c2.y texkill r1 rcp r0.w, v2.w mul r1.xy, r0.w, v2 rcp r0.w, v3.w rcp r1.z, v4.w mad r0.xy, r0, c2.z, c2.x mul r0.xy, r0, v0 mul r0.xy, r0, c0.x mad r1.zw, v4.xyxy, r1.z, -r1.xyxy mad r1.zw, r1, r0.x, r1.xyxy mad r0.xw, v3.xyzy, r0.w, -r1.xyzy mad r0.xy, r0.xwzw, r0.y, r1.zwzw add r0.xy, r0, c2.w mul r1.x, r0.x, c3.x mad r0.x, r0.y, -c3.x, c3.y mad r1.z, c1.y, r0.x, c1.x texld r1, r1.xzzw, s1 mov oC0.xyz, r1 mov oC0.w, r0.z // approximately 22 instruction slots used (2 texture, 20 arithmetic) #endif const BYTE g_ps30_main[] = { 0, 3, 255, 255, 254, 255, 73, 0, 67, 84, 65, 66, 28, 0, 0, 0, 239, 0, 0, 0, 0, 3, 255, 255, 4, 0, 0, 0, 28, 0, 0, 0, 16, 1, 0, 0, 232, 0, 0, 0, 108, 0, 0, 0, 3, 0, 1, 0, 1, 0, 6, 0, 132, 0, 0, 0, 0, 0, 0, 0, 148, 0, 0, 0, 3, 0, 0, 0, 1, 0, 2, 0, 168, 0, 0, 0, 0, 0, 0, 0, 184, 0, 0, 0, 2, 0, 0, 0, 1, 0, 2, 0, 196, 0, 0, 0, 0, 0, 0, 0, 212, 0, 0, 0, 2, 0, 1, 0, 1, 0, 6, 0, 196, 0, 0, 0, 0, 0, 0, 0, 83, 97, 109, 112, 108, 101, 114, 95, 103, 95, 98, 97, 99, 107, 83, 97, 109, 112, 108, 101, 114, 0, 171, 171, 4, 0, 12, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 83, 97, 109, 112, 108, 101, 114, 95, 103, 95, 115, 97, 109, 112, 108, 101, 114, 0, 171, 171, 4, 0, 12, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 95, 55, 51, 95, 103, 95, 115, 99, 97, 108, 101, 0, 1, 0, 3, 0, 1, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 95, 55, 51, 95, 109, 85, 86, 73, 110, 118, 101, 114, 115, 101, 100, 66, 97, 99, 107, 0, 112, 115, 95, 51, 95, 48, 0, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 40, 82, 41, 32, 72, 76, 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, 32, 57, 46, 50, 57, 46, 57, 53, 50, 46, 51, 49, 49, 49, 0, 81, 0, 0, 5, 2, 0, 15, 160, 0, 0, 128, 191, 0, 0, 0, 128, 0, 0, 0, 64, 0, 0, 128, 63, 81, 0, 0, 5, 3, 0, 15, 160, 0, 0, 0, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 2, 5, 0, 0, 128, 0, 0, 11, 144, 31, 0, 0, 2, 5, 0, 1, 128, 1, 0, 3, 144, 31, 0, 0, 2, 5, 0, 2, 128, 2, 0, 11, 144, 31, 0, 0, 2, 5, 0, 3, 128, 3, 0, 11, 144, 31, 0, 0, 2, 5, 0, 4, 128, 4, 0, 11, 144, 31, 0, 0, 2, 0, 0, 0, 144, 0, 8, 15, 160, 31, 0, 0, 2, 0, 0, 0, 144, 1, 8, 15, 160, 66, 0, 0
{ "pile_set_name": "Github" }
[ { "id": "a933", "name": "Add MPLS dec_ttl action with pipe opcode", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl pipe index 8", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*pipe.*index 8 ref", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "08d1", "name": "Add mpls dec_ttl action with pass opcode", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl pass index 8", "expExitCode": "0", "verifyCmd": "$TC actions get action mpls index 8", "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*pass.*index 8 ref", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "d786", "name": "Add mpls dec_ttl action with drop opcode", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl drop index 8", "expExitCode": "0", "verifyCmd": "$TC actions get action mpls index 8", "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*drop.*index 8 ref", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "f334", "name": "Add mpls dec_ttl action with reclassify opcode", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl reclassify index 8", "expExitCode": "0", "verifyCmd": "$TC actions get action mpls index 8", "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*reclassify.*index 8 ref", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "29bd", "name": "Add mpls dec_ttl action with continue opcode", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl continue index 8", "expExitCode": "0", "verifyCmd": "$TC actions get action mpls index 8", "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*continue.*index 8 ref", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "48df", "name": "Add mpls dec_ttl action with jump opcode", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl jump 10 index 8", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*jump 10.*index 8 ref", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "62eb", "name": "Add mpls dec_ttl action with trap opcode", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl trap index 8", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*dec_ttl trap.*index 8 ref", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "09d2", "name": "Add mpls dec_ttl action with opcode and cookie", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl pipe index 8 cookie aabbccddeeff", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*dec_ttl pipe.*index 8 ref.*cookie aabbccddeeff", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "c170", "name": "Add mpls dec_ttl action with opcode and cookie of max length", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl continue index 8 cookie aa11bb22cc33dd44ee55ff66aa11b1b2", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*dec_ttl continue.*index 8 ref.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "9118", "name": "Add mpls dec_ttl action with invalid opcode", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl foo index 8", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0
{ "pile_set_name": "Github" }
/* TODO - list of things to do for libpng: Final bug fixes. Better C++ wrapper/full C++ implementation? Fix problem with C++ and EXTERN "C". cHRM transformation. Remove setjmp/longjmp usage in favor of returning error codes. Add "grayscale->palette" transformation and "palette->grayscale" detection. Improved dithering. Multi-lingual error and warning message support. Complete sRGB transformation (presently it simply uses gamma=0.45455). Make profile checking optional via a png_set_something() call. Man pages for function calls. Better documentation. Better filter selection (counting huffman bits/precompression? filter inertia? filter costs?). Histogram creation. Text conversion between different code pages (Latin-1 -> Mac and DOS). Avoid building gamma tables whenever possible. Use greater precision when changing to linear gamma for compositing against background and doing rgb-to-gray transformation. Investigate pre-incremented loop counters and other loop constructions. Add interpolated method of handling interlacing. Switch to the simpler zlib (zlib/libpng) license if legally possible. Extend pngvalid.c to validate more of the libpng transformations. */
{ "pile_set_name": "Github" }
(* test/bytechar.sml -- test cases for Byte and Char, suitable for ASCII PS 1994-12-10, 1995-05-11, 1995-11-10, 1996-09-30 *) use "auxil.sml"; local in val test1 = checkrange (0,255) (fn i => (Word8.toInt o Byte.charToByte o Byte.byteToChar o Word8.fromInt) i = i); val test2 = checkrange (0,Char.maxOrd) (fn i => (Word8.toInt o Byte.charToByte o Char.chr) i = i); val test3 = checkrange (0,255) (fn i => (Char.ord o Byte.byteToChar o Word8.fromInt) i = i); val test4 = checkrange (0, Char.maxOrd) (fn i => (Char.ord o Char.chr) i = i); val test5 = (Char.chr ~1 seq "WRONG") handle Chr => "OK" | _ => "WRONG"; val test6 = (Char.chr (Char.maxOrd+1) seq "WRONG") handle Chr => "OK" | _ => "WRONG"; val test7 = check("" = Byte.bytesToString (Word8Vector.fromList [])); val test8 = check("ABDC" = (Byte.bytesToString o Word8Vector.fromList o map Word8.fromInt) [65, 66, 68, 67]); val test9 = check("" = Byte.unpackString(Word8Array.fromList [], 0, SOME 0)); local val arr = Word8Array.tabulate(10, fn i => Word8.fromInt(i+65)) in val test10a = check("" = Byte.unpackString(arr, 0, SOME 0)); val test10b = check("" = Byte.unpackString(arr, 10, SOME 0) andalso "" = Byte.unpackString(arr, 10, NONE)); val test10c = check("BCDE" = Byte.unpackString(arr, 1, SOME 4)); val test10d = (Byte.unpackString(arr, ~1, SOME 0) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test10e = (Byte.unpackString(arr, 11, SOME 0) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test10f = (Byte.unpackString(arr, 0, SOME ~1) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test10g = (Byte.unpackString(arr, 0, SOME 11) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test10h = (Byte.unpackString(arr, 10, SOME 1) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test10i = (Byte.unpackString(arr, ~1, NONE) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test10j = (Byte.unpackString(arr, 11, NONE) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; end local val vec = Word8Vector.tabulate(10, fn i => Word8.fromInt(i+65)) in val test11a = check("" = Byte.unpackStringVec(vec, 0, SOME 0)); val test11b = check("" = Byte.unpackStringVec(vec, 10, SOME 0) andalso "" = Byte.unpackStringVec(vec, 10, NONE)); val test11c = check("BCDE" = Byte.unpackStringVec(vec, 1, SOME 4)); val test11d = (Byte.unpackStringVec(vec, ~1, SOME 0) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test11e = (Byte.unpackStringVec(vec, 11, SOME 0) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test11f = (Byte.unpackStringVec(vec, 0, SOME ~1) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test11g = (Byte.unpackStringVec(vec, 0, SOME 11) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test11h = (Byte.unpackStringVec(vec, 10, SOME 1) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test11i = (Byte.unpackStringVec(vec, ~1, NONE) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; val test11j = (Byte.unpackStringVec(vec, 11, NONE) seq "WRONG") handle Subscript => "OK" | _ => "WRONG"; end val test18 = check(not (Char.contains "" (Char.chr 65)) andalso not (Char.contains "aBCDE" (Char.chr 65)) andalso (Char.contains "ABCD" (Char.chr 67)) andalso not (Char.contains "" #"\000") andalso not (Char.contains "" #"\255") andalso not (Char.contains "azAZ09" #"\000") andalso not (Char.contains "azAZ09" #"\255")); val test19 = check(Char.notContains "" (Char.chr 65) andalso Char.notContains "aBCDE" (Char.chr 65) andalso not (Char.notContains "ABCD" (Char.chr 67)) andalso Char.notContains "" #"\000" andalso Char.notContains "" #"\255" andalso Char.notContains "azAZ09" #"\000" andalso Char.notContains "azAZ09" #"\255"); val test20 = check(Char.ord Char.maxChar = Char.maxOrd); local fun mycontains s c = let val stop = String.size s fun h i = i < stop andalso (c = String.sub(s, i) orelse h(i+1)) in h 0 end; (* Check that p(c) = (mycontains s c) for all characters: *) fun equivalent p s = let fun h n = n > 255 orelse (p (chr n) = mycontains s (chr n)) andalso h(n+1) in h 0 end fun checkset p s = check'(fn _ => equivalent p s); val graphchars = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\ \[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; val ascii = "\^@\^A\^B\^C\^D\^E\^F\^G\^H\t\n\^K\^L\^M\^N\^O\^P\ \\^Q\^R\^S\^T\^U\^V\^W\^X\^Y\^Z\^[\^\\^]\^^\^_\ \ !\"#$%&'()*+,-./0123456789:;<=>?@\ \ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\127" val lowerascii = "\^@\^A\^B\^C\^D\^E\^F\^G\^H\t\n\^K\^L\^M\^N\^O\^P\ \\^Q\^R\^S\^T\^U\^V\^W\^X\^Y\^Z\^[\^\\^]\^^\^_\ \ !\"#$%&'()*+,-./0123456789:;<=>?@\ \abcdefghijklmnopqrstuvwxyz[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\127" val upperascii = "\^@\^A\^B\^C\^D\^E\^F\^G\^H\t\n\^K\^L\^M\^N\^O\^P\ \\^Q\^R\^S\^T\^U\^V\^W\^X\^Y\^Z\^[\^\\^]\^^\^_\ \ !\"
{ "pile_set_name": "Github" }