text
stringlengths
2
99.5k
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 * - pp_bnk_read_packet() will read a truncated last track. */ if ((ret = avio_skip(s->pb, e.size)) == AVERROR_EOF) { ctx->track_count = i + 1; av_log(s, AV_LOG_WARNING, "Track %d has truncated data, assuming track count == %d\n", i, ctx->track_count); break; } else if (ret < 0) { goto fail; } } /* File is only a header. */ if (ctx->track_count == 0) { ret = AVERROR_INVALIDDATA; goto fail; } /* Build the streams. */ for (int i = 0; i < ctx->track_count; i++) { if (!(st = avformat_new_stream(s, NULL))) { ret = AVERROR(ENOMEM); goto fail; } par = st->codecpar; par->codec_type = AVMEDIA_TYPE_AUDIO; par->codec_id = AV_CODEC_ID_ADPCM_IMA_CUNNING; par->format = AV_SAMPLE_FMT_S16; par->channel_layout = AV_CH_LAYOUT_MONO; par->channels = 1; par->sample_rate = hdr.sample_rate; par->bits_per_coded_sample = 4; par->bits_per_raw_sample = 16; par->block_align = 1; par->bit_rate = par->sample_rate * par->bits_per_coded_sample; avpriv_set_pts_info(st, 64, 1, par->sample_rate); st->start_time = 0; st->duration = ctx->tracks[i].data_size * 2; } return 0; fail: av_freep(&ctx->tracks); return ret; } static int pp_bnk_read_packet(AVFormatContext *s, AVPacket *pkt) { PPBnkCtx *ctx = s->priv_data; /* * Read a packet from each track, round-robin style. * This method is nasty, but needed to avoid "Too many packets buffered" errors. */ for (int i = 0; i < ctx->track_count; i++, ctx->current_track++) { int64_t ret; int size; PPBnkCtxTrack *trk; ctx->current_track %= ctx->track_count; trk = ctx->tracks + ctx->current_track; if (trk->bytes_read == trk->data_size) continue; if ((ret = avio_seek(s->pb, trk->data_offset + trk->bytes_read, SEEK_SET)) < 0) return ret; else if (ret != trk->data_offset + trk->bytes_read) return AVERROR(EIO); size = FFMIN(trk->data_size - trk->bytes_read, PP_BNK_MAX_READ_SIZE); if ((ret = av_get_packet(s->pb, pkt, size)) == AVERROR_EOF) { /* If we've hit EOF, don't attempt this track again. */ trk->data_size = trk->bytes_read; continue; } else if (ret < 0) { return ret; } trk->bytes_read += ret; pkt->flags &= ~AV_PKT_FLAG_CORRUPT; pkt->stream_index = ctx->current_track++; pkt->duration = ret * 2; return 0; } /* If we reach here, we're done. */ return AVERROR_EOF; } static int pp_bnk_read_close(AVFormatContext *s) { PPBnkCtx *ctx = s->priv_data; av_freep(&ctx->tracks); return 0; } AVInputFormat ff_pp_bnk_demuxer = { .name = "pp_bnk", .long_name = NULL_IF_CONFIG_SMALL("Pro Pinball Series Soundbank"), .priv_data_size = sizeof(PPBnkCtx), .read_probe = pp_bnk_probe, .read_header = pp_bnk_read_header, .read_packet = pp_bnk_read_packet, .read_close = pp_bnk_read_close };
{ "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)๊ฐ€ ๋†’๋‹ค๊ณ  ๋งํ•œ๋‹ค. - ์‘์ง‘๋„์— ์œ„์ž„ ๊ฐœ๋…์ด ๋ฐ˜๋“œ์‹œ ๋“ค์–ด๊ฐ€์•ผํ• ๊นŒ? - ๊ฐ์ฒด ์ž์‹ ์ด ์†Œ์œ ํ•˜๊ณ  ์žˆ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ๋งŽ์ด ํ™œ์šฉํ•˜๋ฉด์„œ ๋™์ž‘ํ•˜๋Š” ๊ฐ์ฒด๋Š” ์œ„์ž„ํ•˜์ง€ ์•Š๋”๋ผ๋„ ์‘์ง‘๋„๊ฐ€ ๋†’๋‹ค. - ์†Œ์œ ํ•˜๊ณ  ์žˆ์ง€๋งŒ ํ™œ์šฉ๋˜์ง€ ์•Š๋Š” ๋ฐ์ดํ„ฐ๊ฐ€ ๋งŽ์œผ๋ฉด ์‘์ง‘๋„๊ฐ€ ๋‚ฎ์•„์ง€๋ฉฐ, ์ด๋ฅผ ์†Œ์œ ํ•˜์ง€ ์•Š๊ณ  ์™ธ๋ถ€๋กœ ์˜ฎ๊ฒจ์„œ ์œ„์ž„ํ•˜๋ฉด ์‘์ง‘๋„๊ฐ€ ๋†’์•„์ง„๋‹ค. - ๊ฐ์ฒด ์ž์‹ ์ด ์†Œ์œ ํ•˜๊ณ  ์žˆ์ง€ ์•Š์€ ๋ฐ์ดํ„ฐ๋ฅผ ๋งŽ์ด ํ™œ์šฉํ•˜๋ฉด์„œ ๋™์ž‘ํ•˜๋Š”, ๋‹ค์‹œ ๋งํ•ด ๋‹ค๋ฅธ ๊ฐ์ฒด์—๊ฒŒ ๋ฐ์ดํ„ฐ๋ฅผ ์š”๊ตฌํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๋™์ž‘ํ•˜๋Š” ๊ฐ์ฒด๋Š” ๊ฒฐํ•ฉ๋„๊ฐ€ ๋†’๋‹ค. #### ์ ˆ์ฐจ์  ํ”„๋กœ๊ทธ๋ž˜๋ฐ >ํ”„๋กœ์„ธ์Šค์™€ ๋ฐ์ดํ„ฐ๋ฅผ ๋ณ„๋„์˜ ๋ชจ๋“ˆ์— ์œ„์น˜์‹œํ‚ค๋Š” ๋ฐฉ์‹์„ ์ ˆ์ฐจ์  ํ”„๋กœ๊ทธ๋ž˜๋ฐ์ด๋ผ ํ•œ๋‹ค. #### ์ ˆ์ฐจ์  ํ”„๋กœ๊ทธ๋ž˜๋ฐ๊ณผ ์ง๊ด€ >์ผ๋ฐ˜์ ์œผ๋กœ ์ ˆ์ฐจ์  ํ”„๋กœ๊ทธ๋ž˜๋ฐ์€ ์šฐ๋ฆฌ์˜ ์ง๊ด€์— ์œ„๋ฐฐ๋œ๋‹ค. ์šฐ๋ฆฌ๋Š” ๊ด€๋žŒ๊ฐ๊ณผ ํŒ๋งค์›์ด ์ž์‹ ์˜ ์ผ์„ ์Šค์Šค๋กœ ์ฒ˜๋ฆฌํ•  ๊ฒƒ์ด๋ผ๊ณ  ์˜ˆ์ƒํ•œ๋‹ค. - ๋‹ค๋ฅธ ๊ด€์ ์—์„œ ๋ณด๋ฉด ์ ˆ์ฐจ์  ํ”„๋กœ๊ทธ๋ž˜๋ฐ์€ ์šฐ๋ฆฌ์˜ ์ง๊ด€์— ์œ„๋ฐฐ๋˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ, ์šฐ๋ฆฌ์˜ ์ง๊ด€์„ ๊ทธ๋Œ€๋กœ ์˜ฎ๊ธด๋‹ค. - ์˜ํ™”๊ด€ ์ž…์žฅ์ด๋ผ๋Š” ์ฒ˜๋ฆฌ ํ๋ฆ„ ๊ด€์ ์—์„œ๋Š” ๊ด€๋žŒ๊ฐ, ํŒ๋งค์›, ๊ทน์žฅ ๋“ฑ์˜ ์ž์œจ์„ฑ ์žˆ๋Š” ๊ฐ์ฒด์˜ ํ˜‘๋ ฅ๋ง์„ ๋– ์˜ฌ๋ฆฌ๊ธฐ๋ณด๋‹ค๋Š” ๊ธˆ์•ก, ํ‹ฐ์ผ“, ์ฐจ๊ฐ ๋“ฑ ๋ฐ์ดํ„ฐ์™€ ๋™์ž‘์„ ์ฒ˜๋ฆฌ ํ๋ฆ„์— ๋”ฐ๋ผ ์ ˆ์ฐจ์ ์œผ๋กœ ๋‚˜์—ดํ•˜๋Š” ๊ฒƒ์ด ๋” ์ง๊ด€์— ๋ถ€ํ•ฉํ•œ๋‹ค. - ๋˜ํ•œ ๋ฌด์ƒ๋ฌผ์ธ ๊ทน์žฅ, ๋งคํ‘œ์†Œ ๋“ฑ์ด ์ž์œจ์ ์œผ๋กœ ๋™์ž‘ํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋Š” ๊ฒƒ ์—ญ์‹œ ์ง๊ด€์— ๋ถ€ํ•ฉํ•˜์ง€ ์•Š๋Š”๋‹ค. - ์ด์ฒ˜๋Ÿผ ์ ˆ์ฐจ์  ํ”„๋กœ๊ทธ๋ž˜๋ฐ์ด ์ง๊ด€์— ๋” ๋ถ€ํ•ฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ์ฒด ์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ๋ณด๋‹ค ๋” ๋จผ์ € ์ •๋ฆฝ๋œ ๊ฒƒ์ด ์•„๋‹๊นŒ. ### p27 #### ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ >๋ฐ์ดํ„ฐ์™€ ํ”„๋กœ์„ธ์Šค๊ฐ€ ๋™์ผํ•œ ๋ชจ๋“ˆ ๋‚ด๋ถ€์— ์œ„์น˜ํ•˜๋„๋ก ํ”„๋กœ๊ทธ๋ž˜๋ฐํ•˜๋Š” ๋ฐฉ์‹์„ ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. - **์—ฐ๊ด€๋œ ๋ฐ์ดํ„ฐ์™€ ํ”„๋กœ์„ธ์Šค๋ฅผ ํ•˜๋‚˜์˜ ์ž์œจ์ ์ธ ๊ฐ์ฒด๋กœ ์บก์Аํ™”ํ•ด์„œ ์ ˆ์ฐจ์˜ ๋‚˜์—ด์ด ์•„๋‹ˆ๋ผ ๊ฐ์ฒด์˜ ํ˜‘๋ ฅ์„ ํ†ตํ•ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋ฐฉ์‹์„ ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค.** ### p29 #### ์บก์Аํ™”์™€ ์ •๋ณด ๊ฐ์ถค >์˜ˆ์ œ์—์„œ ๊ฒฐํ•ฉ๋„๋ฅผ ๋‚ฎ์ถ”๊ธฐ ์œ„ํ•ด ์„ ํƒํ•œ ๋ฐฉ๋ฒ•์€ Theater๊ฐ€ ๋ชฐ๋ผ๋„ ๋˜๋Š” ์„ธ๋ถ€์‚ฌํ•ญ์„ Audience์™€ TicketSeller ๋‚ด๋ถ€๋กœ ๊ฐ์ถฐ ์บก์Аํ™”ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. - ์–ด์ฉŒ๋ฉด ์ด ์ฑ…์—์„œ๋Š” ์บก์Аํ™”์™€ ์ •๋ณด ๊ฐ์ถค(information hiding)์„ ์ผ๋ถ€๋Ÿฌ ์บก์Аํ™” ํ•˜๋‚˜๋กœ ํ‰์นœ ๋“ฏ. ์ •๋ณด ๊ฐ์ถค(๋˜๋Š” ์€๋‹‰, ์ˆจ๊น€)์ด ์šฉ์–ด ์ž์ฒด๋กœ๋„ ๋ถˆํ•„์š”ํ•œ ๊ฒƒ์„ ๊ฐ์ถ˜๋‹ค๋Š” ์˜๋ฏธ๋ฅผ ๋” ๊ตฌ์ฒด์ ์œผ๋กœ ์ „๋‹ฌํ•˜๋ฏ€๋กœ ์บก์Аํ™”๋ณด๋‹ค ์ „๋‹ฌ๋ ฅ์ด ๋” ์ข‹๋‹ค๊ณ  ์ƒ๊ฐ. ### p34 #### ๊ฐ์ฒด์ง€ํ–ฅ์€ ์‹ค์„ธ๊ณ„๋ฅผ ๊ทธ๋Œ€๋กœ ๋ฐ˜์˜? >์‹ค์„ธ๊ณ„์—์„œ๋Š” ์ƒ๋ช…์ด ์—†๋Š” ์ˆ˜๋™์ ์ธ ์กด์žฌ๋ผ๊ณ  ํ•˜๋”๋ผ๋„ ๊ฐ์ฒด์ง€ํ–ฅ์˜ ์„ธ๊ณ„๋กœ ๋„˜์–ด์˜ค๋Š” ์ˆœ๊ฐ„ ๊ทธ๋“ค์€ ์ƒ๋ช…๊ณผ ์ง€๋Šฅ์„ ๊ฐ€์ง„ ์‹ฑ์‹ฑํ•œ ์กด์žฌ๋กœ ๋‹ค์‹œ ํƒœ์–ด๋‚œ๋‹ค. - ๊ฐ์ฒด์ง€ํ–ฅ์€ ์‹ค์„ธ๊ณ„๋ฅผ ๊ทธ๋Œ€๋กœ ๋ฐ˜์˜ํ•˜์ง€ ์•Š์œผ๋ฉฐ, ๋ฌด์ƒ๋ฌผ์„ ์ž์œจ์ ์ธ ์กด์žฌ๋กœ ์˜์ธํ™”ํ•˜๋Š” ๊ณผ์ •์ด ํ•„์š”. ### p35 #### ์ข‹์€ ์„ค๊ณ„๋ž€? >์˜ค๋Š˜ ์š”๊ตฌํ•˜๋Š” ๊ธฐ๋Šฅ์„ ์˜จ์ „ํžˆ ์ˆ˜ํ–‰ํ•˜๋ฉด์„œ ๋‚ด์ผ์˜ ๋ณ€๊ฒฝ์„ ๋งค๋„๋Ÿฝ๊ฒŒ ์ˆ˜์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์„ค๊ณ„ ### p36 #### ์ข‹์€ ๊ฐ์ฒด์ง€ํ–ฅ ์„ค๊ณ„๋ž€? >ํ˜‘๋ ฅํ•˜๋Š” ๊ฐ์ฒด ์‚ฌ์ด์˜ ์˜์กด์„ฑ์„ ์ ์ ˆํ•˜๊ฒŒ ๊ด€๋ฆฌํ•˜๋Š” ์„ค๊ณ„ - ์ ์ ˆํ•œ ์˜์กด์„ฑ์—์„œ์˜ ์ ์ ˆ์€ ์–‘๊ณผ ๋ฐฉํ–ฅ ๊ด€์ ์œผ๋กœ ๋‚˜๋ˆŒ ์ˆ˜ ์žˆ๋‹ค. - ๊ฐ์ฒด์˜ ์ž์œจ์„ฑ์„ ๋†’์ด๋ฉด ์˜์กด์„ฑ์˜ ์–‘์„ ์ค„์ผ ์ˆ˜ ์žˆ๋‹ค. - ์˜์กด์„ฑ์˜ ๋ฐฉํ–ฅ์€ ๋‚˜์ค‘์— ๋‚˜์˜ฌ ๋“ฏ ## 02. ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ - **๊ฐ์ฒด์ง€ํ–ฅ์˜ ํ•ต์‹ฌ์€ ์Šค์Šค๋กœ ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌํ•˜๊ณ , ํŒ๋‹จํ•˜๊ณ , ํ–‰๋™ํ•˜๋Š” ์ž์œจ์ ์ธ ๊ฐ์ฒด๋“ค์˜ ํ˜‘๋ ฅ๋ง์„ ๊ตฌ์„ฑํ•˜๋Š” ๊ฒƒ์ด๋‹ค.** - **์ถ”์ƒํ™”๋ฅผ ํ†ตํ•ด ์„ธ๋ถ€ ๊ตฌํ˜„ ๋‚ด์šฉ ์—†์ด ์ •์ฑ… ์ˆ˜์ค€์—์„œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ํ˜‘๋ ฅ ํ๋ฆ„์„ ๋‹จ์ˆœํ™”ํ•ด์„œ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค.** - **๊ตฌํ˜„ ๋‚ด์šฉ์˜ ์žฌ์‚ฌ์šฉ์„ ์œ„ํ•ด ์ƒ์†์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ๋Œ€๋ถ€๋ถ„ ์ข‹์ง€ ์•Š์€ ์„ ํƒ์ด๋‹ค.** - **์ƒ์†์ด ์ž˜๋ชป ์‚ฌ์šฉ๋˜๋ฉด ์ข‹์ง€ ์•Š์€ ์ด์œ ๋Š” abstract ๋“ฑ์˜ ํ‚ค์›Œ๋“œ๋ฅผ ํ†ตํ•ด ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ณต์œ ํ•˜๊ธฐ ๋•Œ๋ฌธ์ด ์•„๋‹ˆ๋ผ, protected ๋“ฑ์œผ๋กœ ์„œ๋ธŒํด๋ž˜์Šค์—๊ฒŒ ๊ณต๊ฐœํ•˜๋Š” ๋ถ€๋ถ„์ด ์žˆ๊ณ  ์ด๊ฒƒ์ด ์ •๋ณด ๊ฐ์ถค์„ ์œ„๋ฐ˜ํ•˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.** ### p41 #### Object-oriented์˜ ์˜๋ฏธ >์ง„์ •ํ•œ ๊ฐ์ฒด์ง€ํ–ฅ ํŒจ๋Ÿฌ๋‹ค์ž„์œผ๋กœ์˜ ์ „ํ™˜์€ ํด๋ž˜์Šค๊ฐ€ ์•„๋‹Œ ๊ฐ์ฒด์— ์ดˆ์ ์„ ๋งž์ถœ ๋•Œ์—๋งŒ ์–ป์„ ์ˆ˜ ์žˆ๋‹ค. > >์–ด๋–ค ํด๋ž˜์Šค๊ฐ€ ํ•„์š”ํ•œ์ง€๋ฅผ ๊ณ ๋ฏผํ•˜๊ธฐ ์ „์— ์–ด๋–ค ๊ฐ์ฒด๋“ค์ด ํ•„์š”ํ•œ์ง€ ๊ณ ๋ฏผํ•˜๋ผ. ํด๋ž˜์Šค๋Š” ๊ณตํ†ต์ ์ธ ์ƒํƒœ์™€ ํ–‰๋™์„ ๊ณต์œ ํ•˜๋Š” ๊ฐ์ฒด๋“ค์„ ์ถ”์ƒํ™”ํ•œ ๊ฒƒ์ด๋‹ค. ๋”ฐ๋ผ์„œ ํด๋ž˜์Šค์˜ ์œค๊ณฝ์„ ์žก๊ธฐ ์œ„ํ•ด์„œ๋Š” ์–ด๋–ค ๊ฐ์ฒด๋“ค์ด ์–ด๋–ค ์ƒํƒœ์™€ ํ–‰๋™์„ ๊ฐ€์ง€๋Š”์ง€๋ฅผ ๋จผ์ € ๊ฒฐ์ •ํ•ด์•ผ ํ•œ๋‹ค. > >๊ฐ์ฒด์ง€ํ–ฅ์ ์œผ๋กœ ์ƒ๊ฐํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ๊ฐ์ฒด๋ฅผ ๊ณ ๋ฆฝ๋œ ์กด์žฌ๋กœ ๋ฐ”๋ผ๋ณด์ง€ ๋ง๊ณ  ํ˜‘๋ ฅ์— ์ฐธ์—ฌํ•˜๋Š” ํ˜‘๋ ฅ์ž๋กœ ๋ฐ”๋ผ๋ณด๊ธฐ ๋ฐ”๋ž€๋‹ค. > >๊ฐ์ฒด๋“ค์˜ ๋ชจ์–‘๊ณผ ์œค๊ณฝ์ด ์žกํžˆ๋ฉด ๊ณตํ†ต๋œ ํŠน์„ฑ๊ณผ ์ƒํƒœ๋ฅผ ๊ฐ€์ง„ ๊ฐ์ฒด๋“ค์„ ํƒ€์ž…์œผ๋กœ ๋ถ„๋ฅ˜ํ•˜๊ณ  ์ด ํƒ€์ž…์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํด๋ž˜์Šค๋ฅผ ๊ตฌํ˜„ํ•˜๋ผ. - ๊ฐ์ฒด๋Š” ์ž์œจ์„ฑ์„ ๊ฐ–๊ณ  ์žˆ๊ณ  ๋‚ด/์™ธ๋ถ€๊ฐ€ ๊ฒฉ๋ฆฌ๋ผ์žˆ์ง€๋งŒ, ๊ทธ๋ ‡๋‹ค๊ณ  ์„œ๋กœ ๋–จ์–ด์ ธ ๊ณ ๋ฆฝ๋œ ์ฑ„ ์‚ด์•„๊ฐ€๋Š” ์กด์žฌ๊ฐ€ ์•„๋‹ˆ๋‹ค. - ๋จผ์ € ๊ฐ์ฒด๋ฅผ ์‹๋ณ„ํ•˜๊ณ  ๊ฐ์ฒด๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ํƒ€์ž…์„ ๋„์ถœํ•œ๋‹ค. ### p44 #### ๊ฐ์ฒด์ง€ํ–ฅ์˜ ํ•ต์‹ฌ >๊ฐ์ฒด์ง€ํ–ฅ์˜ ํ•ต์‹ฌ์€ ์Šค์Šค๋กœ ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌํ•˜๊ณ , ํŒ๋‹จํ•˜๊ณ , ํ–‰๋™ํ•˜๋Š” ์ž์œจ์ ์ธ ๊ฐ์ฒด๋“ค์˜ ๊ณต๋™์ฒด๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ๊ฒƒ - **๊ฐ์ฒด์ง€ํ–ฅ์˜ ํ•ต์‹ฌ์€ ์Šค์Šค๋กœ ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌํ•˜๊ณ , ํŒ๋‹จํ•˜๊ณ , ํ–‰๋™ํ•˜๋Š” ์ž์œจ์ ์ธ ๊ฐ์ฒด๋“ค์˜ ํ˜‘๋ ฅ๋ง์„ ๊ตฌ์„ฑํ•˜๋Š” ๊ฒƒ** ### p45 #### ์ ‘๊ทผ ์ œ์–ด์˜ ์˜์˜ >๋ณ€๊ฒฝ๋  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋Š” ์„ธ๋ถ€์ ์ธ ๊ตฌํ˜„ ๋‚ด์šฉ์„ private ์˜์—ญ ์•ˆ์— ๊ฐ์ถค์œผ๋กœ์จ ๋ณ€๊ฒฝ์œผ๋กœ ์ธํ•œ ํ˜ผ๋ž€์„ ์ตœ์†Œํ™”ํ•  ์ˆ˜ ์žˆ๋‹ค. ### p47 #### ๊ฐ์ฒด์˜ ํ‘œํ˜„๋ ฅ >Long ํƒ€์ž…์€ ๋ณ€์ˆ˜์˜ ํฌ๊ธฐ๋‚˜ ์—ฐ์‚ฐ์ž์˜ ์ข…๋ฅ˜์™€ ๊ด€๋ จ๋œ ๊ตฌํ˜„ ๊ด€์ ์˜ ์ œ์•ฝ์€ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์ง€๋งŒ, Money ํƒ€์ž…์ฒ˜๋Ÿผ ์ €์žฅํ•˜๋Š” ๊ฐ’์ด ๊ธˆ์•ก๊ณผ ๊ด€๋ จ๋ผ ์žˆ๋‹ค๋Š” ์˜๋ฏธ๋ฅผ ์ „๋‹ฌํ•  ์ˆ˜๋Š” ์—†๋‹ค. >๋˜ํ•œ (Long ํƒ€์ž…์€) ๊ธˆ์•ก ๊ด€๋ จ ๋กœ์ง์ด (Long ์•ˆ์— ์กด์žฌํ•  ์ˆ˜ ์—†์œผ๋ฏ€๋กœ) ์„œ๋กœ ๋‹ค๋ฅธ ๊ณณ์— ์ค‘๋ณต๋˜์–ด ๊ตฌํ˜„๋˜๋Š” ๊ฒƒ์„ ๋ง‰์„ ์ˆ˜ ์—†๋‹ค. >**๋น„๋ก ํ•˜๋‚˜์˜ ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๋งŒ ํฌํ•จํ•˜๋”๋ผ๋„ ๊ฐœ๋…์„ ๋ช…์‹œ์ ์œผ๋กœ ํ‘œํ˜„ํ•˜๋Š” ๊ฒƒ์€ ์ „์ฒด์ ์ธ ์„ค๊ณ„์˜ ๋ช…ํ™•์„ฑ๊ณผ ์œ ์—ฐ์„ฑ์„ ๋†’์ด๋Š” ์ฒซ๊ฑธ์Œ์ด๋‹ค.** ### p49 #### ๋ฉ”์‹œ์ง€ >๊ฐ์ฒด๊ฐ€ ๋‹ค๋ฅธ ๊ฐ์ฒด์™€ ์ƒํ˜ธ์ž‘์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์œ ์ผํ•œ ๋ฐ”์—…์€ ๋ฉ”์‹œ์ง€๋ฅผ ์ „์†ก(send a message)ํ•˜๋Š” ๊ฒƒ๋ฟ์ด๋‹ค. - ๊ฐ์ฒด๊ฐ€ ๋‹ค๋ฅธ ๊ฐ์ฒดํ™” ํ˜‘๋ ฅํ•  ์ˆ˜ ์žˆ๋Š” ์œ ์ผํ•œ ์˜์‚ฌ์†Œํ†ต ์ˆ˜๋‹จ์€ ๋ฉ”์‹œ์ง•์ด๋‹ค. #### ๋ฉ”์„œ๋“œ >๋ฉ”์‹œ์ง€๋ฅผ ์ˆ˜์‹ ํ•œ ๊ฐ์ฒด๋Š” ์Šค์Šค๋กœ์˜ ๊ฒฐ์ •์— ๋”ฐ๋ผ ์ž์œจ์ ์œผ๋กœ (๋ฐ›์€) ๋ฉ”์‹œ์ง€๋ฅผ ์ฒ˜๋ฆฌํ•  ๋ฐฉ๋ฒ•์„ ๊ฒฐ์ •ํ•œ๋‹ค. ์ด์ฒ˜๋Ÿผ ์ˆ˜์‹ ๋œ ๋ฉ”์‹œ์ง€๋ฅผ ์ฒ˜๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ (๊ฐ์ฒด) ์ž์‹ ๋งŒ์˜ ๋ฐฉ๋ฒ•์„ ๋ฉ”์„œ๋“œ(method)๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. - ์•จ๋Ÿฐ ์ผ€์ด์˜ ์„ค๋ช…์— ๋”ฐ๋ฅด๋ฉด ๋ฉ”์‹œ์ง€์—๋Š” ๋ฉ”์„œ๋“œ๋งŒ ๋Œ€์‘๋˜๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ ๋ฐ์ดํ„ฐ๋„ ๋Œ€์‘๋  ์ˆ˜ ์žˆ๋‹ค. [๊ฐ์ฒด ์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ๊ณผ ๋ฉ”์‹œ์ง•](https://homoefficio.github.io/2019/07/04/๊ฐ์ฒด-์ง€ํ–ฅ-ํ”„๋กœ๊ทธ๋ž˜๋ฐ๊ณผ-๋ฉ”์‹œ์ง•/) ์ฐธ๊ณ  ### p57 #### ์ปดํŒŒ์ผ ์‹œ๊ฐ„ ์˜์กด์„ฑ๊ณผ ์‹คํ–‰ ์‹œ๊ฐ„ ์˜์กด์„ฑ - ์ปดํŒŒ์ผ ์‹œ์ (Compile time) ์˜์กด์„ฑ๊ณผ ์‹คํ–‰ ์‹œ์ (Runtime) ์˜์กด์„ฑ ### p59 #### ์ฝ”๋“œ์˜ ์˜์กด์„ฑ๊ณผ ์‹คํ–‰ ์‹œ์ ์˜ ์˜์กด์„ฑ >์ฝ”๋“œ์˜ ์˜์กด์„ฑ(์ปดํŒŒ์ผ ์‹œ์  ์˜์กด์„ฑ)๊ณผ ์‹คํ–‰ ์‹œ์ (Runtime)์˜ ์˜์กด์„ฑ์€ ๋™์ผํ•˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ๋‹ค. - ์ฝ”๋“œ ์ƒ์—์„œ๋Š” ์ˆ˜ํผํด๋ž˜์Šค์— ์˜์กดํ•˜์ง€๋งŒ ์‹คํ–‰ ์‹œ์ ์—์„œ๋Š” ๊ตฌ์ฒด์  ์„œ๋ธŒํด๋ž˜์Šค์— ์˜์กดํ•œ๋‹ค. ์ด๋ฅผ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ด ๋‹คํ˜•์„ฑ์ด๋‹ค. ### p61 #### ์ƒ์†์˜ ์ˆจ์€ ์˜์˜ >์ƒ์†์ด ๊ฐ€์น˜ ์žˆ๋Š” ์ด์œ ๋Š” ๋ถ€๋ชจ ํด๋ž˜์Šค๊ฐ€ ์ œ๊ณตํ•˜๋Š” ๋ชจ๋“  ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ž์‹ ํด๋ž˜์Šค๊ฐ€ ๋ฌผ๋ ค๋ฐ›์„ ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. > >์ธํ„ฐํŽ˜์ด์Šค๋Š” ๊ฐ์ฒด๊ฐ€ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋Š” ๋ฉ”์‹œ์ง€์˜ ๋ชฉ๋ก์„ ์ •์˜ํ•œ๋‹ค๋Š” ๊ฒƒ์„ ๊ธฐ์–ตํ•˜๋ผ. ๊ฒฐ๊ณผ์ ์œผ๋กœ ์ž์‹ ํด๋ž˜์Šค๋Š” ๋ถ€๋ชจ ํด๋ž˜์Šค๊ฐ€ ์ˆ˜์‹ ํ•  ์ˆ˜ ์žˆ๋Š” ๋ชจ๋“  ๋ฉ”์‹œ์ง€๋ฅผ ์ˆ˜์‹ ํ•  ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์™ธ๋ถ€ ๊ฐ์ฒด๋Š” ์ž์‹ ํด๋ž˜์Šค๋ฅผ ๋ถ€๋ชจ ํด๋ž˜์Šค์™€ ๋™์ผํ•œ ํƒ€์ž…์œผ๋กœ ๊ฐ„์ฃผํ•  ์ˆ˜ ์žˆ๋‹ค. - ์ƒ์†ํ•˜๋ฉด ๋ณดํ†ต public, protected์ธ ๋ฉ”์„œ๋“œ๋‚˜ ํ•„๋“œ๋ฅผ ๋ฌผ๋ ค๋ฐ›๋Š” ๊ฒƒ์„ ๋– ์˜ฌ๋ฆฌ๋Š”๋ฐ, ์ •์ž‘ ์ค‘์š”ํ•œ ๊ฒƒ์€ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๋ฌผ๋ ค๋ฐ›๋Š” ๋‹ค๋Š” ๊ฒƒ ### p62 #### Upcasting >์ž์‹ ํด๋ž˜์Šค๊ฐ€ ๋ถ€๋ชจ ํด๋ž˜์Šค๋ฅผ ๋Œ€์‹ ํ•˜๋Š” ๊ฒƒ์„ ์—…์บ์ŠคํŒ…(Upcasting)์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. ### p63 #### ๋‹คํ˜•์„ฑ(Polymorphism) >๋‹คํ˜•์„ฑ์ด๋ž€ ๋™์ผํ•œ ๋ฉ”์‹œ์ง€๋ฅผ ์ˆ˜์‹ ํ–ˆ์„ ๋•Œ ๊ฐ์ฒด์˜ ํƒ€์ž…์— ๋”ฐ๋ผ ๋‹ค๋ฅด๊ฒŒ ์‘๋‹ตํ•  ์ˆ˜ ์žˆ๋Š” ๋Šฅ๋ ฅ์„ ์˜๋ฏธํ•œ๋‹ค. - ์ฆ‰ ์–ด๋–ค ๋ฐ›์€ ๋ฉ”์‹œ์ง€์— ๋Œ€ํ•ด ์–ด๋–ค ๋ฉ”์„œ๋“œ๋ฅผ ํ†ตํ•ด ์ฒ˜๋ฆฌํ•˜๊ณ  ์‘๋‹ตํ•  ์ง€๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ์‹ค์ œ๋กœ ๋ฐ›์€ ๊ฐ์ฒด ์Šค์Šค๋กœ ๊ฒฐ์ •ํ•œ๋‹ค. #### ๋™์  ๋ฐ”์ธ๋”ฉ(Dynamic-binding), ์ง€์—ฐ ๋ฐ”์ธ๋”ฉ(Late-binding) >๋ฉ”์‹œ์ง€์™€ ๋ฉ”์„œ๋“œ๋ฅผ ์‹คํ–‰ ์‹œ์ ์— ๋ฐ”์ธ๋”ฉํ•˜๋Š” ๊ฒƒ #### ์ •์  ๋ฐ”์ธ๋”ฉ(Static-binding), ์ดˆ๊ธฐ ๋ฐ”์ธ๋”ฉ(Early-binding) >์ „ํ†ต์ ์ธ ํ•จ์ˆ˜ ํ˜ธ์ถœ์ฒ˜๋Ÿผ ์ปดํŒŒ์ผ ์‹œ์ ์— ์‹คํ–‰๋  ํ•จ์ˆ˜๋‚˜ ํ”„๋กœ์‹œ์ €๋ฅผ ๊ฒฐ์ •ํ•˜๋Š” ๊ฒƒ ### p64 #### ๊ตฌํ˜„ ์ƒ์†๊ณผ ์ธํ„ฐํŽ˜์ด์Šค ์ƒ์† >๋‹คํ˜•์ ์ธ ํ˜‘๋ ฅ์„ ์œ„ํ•ด ๋ถ€๋ชจ ํด๋ž˜์Šค์™€ ์ž์‹ ํด๋ž˜์Šค๊ฐ€ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ณต์œ ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ƒ์†์„ ์ด์šฉํ•˜๋Š” ๊ฒƒ์„ ์ธํ„ฐํŽ˜์ด์Šค ์ƒ์†(Interface inheritance) ๋˜๋Š” ์„œ๋ธŒํƒ€์ดํ•‘(Subtyping)์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. - ๋™์  ๋ฐ”์ธ๋”ฉ์„ ํ™œ์šฉํ•ด์„œ ๋‹คํ˜•์  ํ˜‘๋ ฅ์„ ๊ตฌ์„ฑํ•˜๊ธฐ ์œ„ํ•ด ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ณต์œ ํ•˜๋Š” ์ƒ์†์„ ์ธํ„ฐํŽ˜์ด์Šค ์ƒ์† ๋˜๋Š” ์„œ๋ธŒํƒ€์ดํ•‘์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. >์ˆœ์ˆ˜ํ•˜๊ฒŒ ์ฝ”๋“œ๋ฅผ ์žฌ์‚ฌ์šฉํ•  ๋ชฉ์ ์œผ๋กœ ์ƒ์†์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์„ ๊ตฌํ˜„ ์ƒ์†(Implementation inheritance) ๋˜๋Š” ์„œ๋ธŒํด๋ž˜์‹ฑ(Subclassing)์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. - ์ธํ„ฐํŽ˜์ด์Šค ๊ณต์œ ๊ฐ€ ํ•„์š”ํ•œ ๋ถ€๋ชจ ์ž์‹ ๊ด€๊ณ„๊ฐ€ ์•„๋‹˜์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  ๊ทธ์ € ๊ตฌํ˜„ ๋‚ด์šฉ์„ ์ƒ์†์„ ํ†ตํ•ด ์žฌ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์„ ๊ตฌํ˜„ ์ƒ์† ๋˜๋Š” ์„œ๋ธŒํด๋ž˜์‹ฑ์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. ### p65-p66 #### ์ถ”์ƒํ™”์˜ ํž˜ >์ถ”์ƒํ™” ๊ณ„์ธต๋งŒ ๋”ฐ๋กœ ๋–ผ์–ด ๋†“๊ณ  ์‚ดํŽด๋ณด๋ฉด ์š”๊ตฌ์‚ฌํ•ญ์˜ ์ •์ฑ…์„ ๋†’์€ ์ˆ˜์ค€์—์„œ ์„œ์ˆ ํ•  ์ˆ˜ ์žˆ๋‹ค. > >์ถ”์ƒํ™”๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์„ธ๋ถ€์‚ฌํ•ญ์— ์–ต๋ˆŒ๋ฆฌ์ง€ ์•Š๊ณ  ์ƒ์œ„ ๊ฐœ๋…๋งŒ์œผ๋กœ๋„ ๋„๋ฉ”์ธ์˜ ์ค‘์š”ํ•œ ๊ฐœ๋…์„ ์„ค๋ช…ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•œ๋‹ค. > >์ถ”์ƒํ™”๋ฅผ ์ด์šฉํ•œ ์„ค๊ณ„๋Š” ํ•„์š”์— ๋”ฐ๋ผ ํ‘œํ˜„์˜ ์ˆ˜์ค€์„ ์กฐ์ •ํ•˜๋Š” ๊ฒƒ์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด์ค€๋‹ค. > >์ถ”์ƒํ™”๋ฅผ ์ด์šฉํ•ด ์ƒ์œ„ ์ •์ฑ…์„ ๊ธฐ์ˆ ํ•œ๋‹ค๋Š” ๊ฒƒ์€ ๊ธฐ๋ณธ์ ์ธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ํ˜‘๋ ฅ ํ๋ฆ„์„ ๊ธฐ์ˆ ํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•œ๋‹ค. - ์ถ”์ƒํ™”๋Š” ์˜์‚ฌ์†Œํ†ต์— ํ•„์š”ํ•˜์ง€ ์•Š์€ ์„ธ๋ถ€ ๋‚ด์šฉ์„ ๋œ์–ด๋‚ด๊ณ  ๋‹จ์ˆœํ™”ํ•˜๋Š” ๊ฒƒ์„ ๋งํ•œ๋‹ค. ๋œ์–ด๋‚ธ๋‹ค๋Š” ๊ฒƒ์€ ๊ฒฐ๊ตญ ๋ณด์—ฌ์ง€์ง€ ์•Š๊ฒŒ ๊ฐ์ถ”๋Š” ํšจ๊ณผ๊ฐ€ ์žˆ์œผ๋ฏ€๋กœ ์ถ”์ƒํ™” ์—ญ์‹œ ์ •๋ณด ๊ฐ์ถค์˜ ์žฅ์ ์ธ ์ž์œจ์„ฑ๊ณผ ์œ ์—ฐ์„ฑ์„ ํ™•๋ณดํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋œ๋‹ค. - ์ถ”์ƒํ™”๋ฅผ ํ†ตํ•ด ์„ธ๋ถ€ ๊ตฌํ˜„ ๋‚ด์šฉ ์—†์ด ์ •์ฑ… ์ˆ˜์ค€์—์„œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ํ˜‘๋ ฅ ํ๋ฆ„์„ ๋‹จ์ˆœํ™”ํ•ด์„œ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค. ### p67 #### ๊ฒ‰๋ณด๊ธฐ์— ์˜ˆ์™ธ๋กœ ๋ณด์ด๋Š” ์ƒํ™ฉ ํ•ด๊ฒฐ ```java public class Movie { public Money calculateMovieFee(Screening screening) { if (discountPolicy == null) { return fee; } return fee.minus(discountPolicy.cacluateDiscountAmount(screening)); } } ``` >ํ• ์ธ ์ •์ฑ…์ด ์—†๋Š” ๊ฒฝ์šฐ์—๋Š” ํ• ์ธ ๊ธˆ์•ก์ด 0์ด๋ผ๋Š” ์‚ฌ์‹ค์„ ๊ฒฐ์ •ํ•˜๋Š” ์ฑ…์ž„์ด DiscountPolicy๊ฐ€ ์•„๋‹Œ Movie ์ชฝ์— ์žˆ๋‹ค. > >์ฑ…์ž„์˜ ์œ„์น˜๋ฅผ ๊ฒฐ์ •ํ•˜๊ธฐ ์œ„ํ•ด ์กฐ๊ฑด๋ฌธ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ํ˜‘๋ ฅ์˜ ์„ค๊ณ„ ์ธก๋ฉด์—์„œ ๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ ์ข‹์ง€ ์•Š์€ ์„ ํƒ์ด๋‹ค. - ํ• ์ธ ์ •์ฑ…์ด ์—†๋Š” ๊ฒฝ์šฐ๋ฅผ ํŠน๋ณ„ํ•œ ์ผ€์ด์Šค๋กœ ์ทจ๊ธ‰ํ•ด์„œ Movie์—๊ฒŒ ์ฑ…์ž„์„ ๋ถ€๊ณผํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค, ํ• ์ธ ์ •์ฑ…์ด ์—†๋Š” ๊ฒƒ ์ž์ฒด๋ฅผ ํ•˜๋‚˜์˜ ํ• ์ธ ์ •์ฑ…(NoneDiscountPolicy)์œผ๋กœ ์ •์˜ํ•ด์„œ ํ• ์ธ ๊ธˆ์•ก์ด ์—†์Œ์„ ๊ฒฐ์ •ํ•˜๋Š” ์ฑ…์ž„์„ Movie์—์„œ DiscountPolicy๋กœ ์˜ฎ๊ธฐ๋Š” ๊ฒƒ์ด ์ข‹๋‹ค. - ํ˜„์‹ค์—์„œ๋Š” ํ• ์ธ ์ •์ฑ… ์ž์ฒด๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š๋Š” ์ผ€์ด์Šค์ง€๋งŒ ๊ฐ์ฒด์ง€ํ–ฅ ์„ค๊ณ„์—์„œ๋Š” ์ •์ฑ…์ด ์—†๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ ํ• ์ธ ๊ธˆ์•ก์ด ์—†๋Š” ํ•˜๋‚˜์˜ ์ •์ฑ…์œผ๋กœ ์ทจ๊ธ‰ํ•œ๋‹ค. ์ด๋Ÿฐ ์ ๋„ ์˜์ธํ™”์™€ ํ•จ๊ป˜ ๊ฐ์ฒด์ง€ํ–ฅ์ด ํ˜„์‹ค ์„ธ๊ณ„๋ฅผ ์žˆ๋Š” ๊ทธ๋Œ€๋กœ ๋ฐ˜์˜ํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ๋Š” ์ฆ๊ฑฐ๊ฐ€ ๋œ๋‹ค. ### p68 - ์ดํ•ด๊ฐ€ ์ž˜ ์•ˆ ๋˜๋Š” ๋ถ€๋ถ„ >์•ž์˜ NoneDiscountPolicy ํด๋ž˜์Šค์˜ ์ฝ”๋“œ๋ฅผ ์ž์„ธํžˆ ์‚ดํŽด๋ณด๋ฉด getDiscountAmount() ๋ฉ”์„œ๋“œ๊ฐ€ ์–ด๋–ค ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•˜๋”๋ผ๋„ ์ƒ๊ด€์ด ์—†๋‹ค๋Š” ์‚ฌ์‹ค์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค. (์ค‘๋žต) NoneDiscountPolicy์˜ ๊ฐœ๋ฐœ์ž๋Š” getDiscountAmount()๊ฐ€ ํ˜ธ์ถœ๋˜์ง€ ์•Š์„ ๊ฒฝ์šฐ DiscountPolicy๊ฐ€ 0์›์„ ๋ฐ˜ํ™˜ํ•  ๊ฒƒ์ด๋ผ๋Š” ์‚ฌ์‹ค์„ ๊ฐ€์ •ํ•˜๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. - NoneDiscountPolicy ์ฝ”๋“œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€๋ฐ ์ด ์ค‘ DiscountPolicy๊ฐ€ 0์›์„ ๋ฐ˜ํ™˜ํ•  ๊ฒƒ์ด๋ผ๋Š” ์‚ฌ์‹ค์„ ๊ฐ€์ •ํ•˜๊ณ  ์žˆ๋Š” ๋ถ€๋ถ„์ด ์žˆ๋‚˜? ```java public class NoneDiscountPolicy extends DiscountPolicy { @Override protected Money getDiscountAmount(Screening screening) { return Money.ZERO; } } ``` ### p70 - ์ž˜ ์ดํ•ด๊ฐ€ ์•ˆ ๋˜๋Š” ์ƒ์†์ด ์บก์Аํ™”๋ฅผ ์œ„๋ฐ˜ํ•œ๋‹ค๋Š” ์‚ฌ๋ก€ >์ƒ์†์˜ ๊ฐ€์žฅ ํฐ ๋ฌธ์ œ์ ์€ ์บก์Аํ™”๋ฅผ ์œ„๋ฐ˜ํ•œ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. ์ƒ์†์„ ์ด์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ ๋‚ด๋ถ€ ๊ตฌ์กฐ๋ฅผ ์ž˜ ์•Œ๊ณ  ์žˆ์–ด์•ผ ํ•œ๋‹ค. AmountDiscountMovie์™€ PercentDiscountMovie๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” ๊ฐœ๋ฐœ์ž๋Š” ๋ถ€๋ชจ ํด๋ž˜์Šค์ธ Movie์˜ calculateMovieFee ๋ฉ”์„œ๋“œ ์•ˆ์—์„œ ์ถ”์ƒ ๋ฉ”์„œ๋“œ์ธ getDiscountAmount ๋ฉ”์„œ๋“œ๋ฅผ ํ˜ธ์ถœํ•œ๋‹ค๋Š” ์‚ฌ์‹ค์„ ์•Œ๊ณ  ์žˆ์–ด์•ผ ํ•œ๋‹ค. - ์—ฌ๊ธฐ์—์„œ๋„ ์บก์Аํ™”์™€ ์ •๋ณด ๊ฐ์ถค์„ ํ‰์ณ์„œ ์บก์Аํ™”๋ผ๊ณ  ์“ฐ๊ณ  ์žˆ๋‹ค. ์•ž์—์„œ๋„ ์–ธ๊ธ‰ํ–ˆ์ง€๋งŒ ์ด๋Ÿฐ ๋ฌธ๋งฅ์—์„œ๋Š” ์บก์Аํ™”์™€ ์ •๋ณด ๊ฐ์ถค์„ ์—„๋ฐ€ํ•˜๊ฒŒ ๋‚˜๋ˆ ์„œ ์ƒ์†์ด ์ •๋ณด ๊ฐ์ถค์„ ์œ„๋ฐ˜ํ•œ๋‹ค๊ณ  ํ•˜๋Š” ๊ฒŒ ๋ถˆํ•„์š”ํ•œ ํ˜ผ์„ ์„ ๋ง‰๋Š” ๋ฐ ๋” ๋„์›€์ด ๋  ๊ฒƒ ๊ฐ™๋‹ค. - ์„œ๋ธŒํด๋ž˜์Šค ์ž…์žฅ์—์„œ, ์ž๊ธฐ๊ฐ€ overrideํ•˜๊ณ  ์žˆ๋Š” ๋ฉ”์„œ๋“œ๊ฐ€ '์ˆ˜ํผํด๋ž˜์Šค์˜ ์–ด๋””์—์„ ๊ฐ€ ํ˜ธ์ถœ๋œ๋‹ค'๋Š” ์‚ฌ์‹ค์„ ์•Œ๊ณ  ์žˆ๋Š” ๊ฑธ '์„œ๋ธŒํด๋ž˜์Šค๊ฐ€ ์ˆ˜ํผํด๋ž˜์Šค์˜ ๋‚ด๋ถ€ ๊ตฌ์กฐ๋ฅผ ์ž˜ ์•Œ๊ณ  ์žˆ๋‹ค'๋ผ๊ณ  ํ•ด์„ํ•ด์•ผํ•  ํ•„์š”๊ฐ€ ์žˆ๋‚˜ ์‹ถ๋‹ค. - ์„œ๋ธŒํด๋ž˜์Šค ์ž…์žฅ์—์„œ๋Š” ์ƒ์†์— ์˜ํ•ด ์ž๊ธฐ๊ฐ€ ๊ตฌํ˜„ํ•ด์•ผํ•  ๋ฉ”์„œ๋“œ๊ฐ€ ๊ฐ•์ œ๋œ ๊ฒƒ ๋ฟ์ด๊ณ , ์ด๋Š” ์ƒ์†์ด ์•„๋‹ˆ๋ผ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ตฌํ˜„ํ•  ๋•Œ๋„ ๋งˆ์ฐฌ๊ฐ€์ง€๋‹ค. ๋‹ค๋งŒ ํ•œ ๊ฐ€์ง€ ์ฐจ์ด์ ์€ ์ƒ์†์—์„œ๋Š” ์„œ๋ธŒํด๋ž˜์Šค๊ฐ€ ๊ตฌํ˜„ํ•˜๋Š” ๋ฉ”์„œ๋“œ๋ฅผ ์ˆ˜ํผํด๋ž˜์Šค๊ฐ€ ํ˜ธ์ถœํ•œ๋‹ค๋Š” ์ ์„ ์„œ๋ธŒํด๋ž˜์Šค๊ฐ€ ์•Œ ์ˆ˜ ์žˆ๋‹ค๋Š” ์ ์ด๊ณ , ์ธํ„ฐํŽ˜์ด์Šค ๊ตฌํ˜„์—์„œ๋Š” ๊ตฌํ˜„ํ•œ ๋ฉ”์„œ๋“œ๋ฅผ ๋ˆ„๊ฐ€ ํ˜ธ์ถœํ• ์ง€ ๋ชจ๋ฅธ๋‹ค๋Š” ์ ์ด๋‹ค. - ๊ทธ๋Ÿฐ๋ฐ ๋ˆ„๊ฐ€ ํ˜ธ์ถœํ• ์ง€ ์•ˆ๋‹ค๊ณ  ํ•ด๋„ ๊ทธ์ € ์ˆ˜ํผํด๋ž˜์Šค๊ฐ€ ํ˜ธ์ถœํ• ์ง€ ์•ˆ๋‹ค๋Š” ๊ฒƒ ๋ฟ์ด๊ณ , ์ˆ˜ํผํด๋ž˜์Šค์—์„œ ๋‚ด๋ถ€์ ์œผ๋กœ ์–ด๋–ป๊ฒŒ ํ˜ธ์ถœ๋˜๋Š” ์ง€๋Š” ์•Œ ์ˆ˜ ์—†๋‹ค. ์ฆ‰, ์„œ๋ธŒํด๋ž˜์Šค๊ฐ€ ๊ตฌํ˜„ํ•œ ๋ฉ”์„œ๋“œ๋ฅผ c()๋ผ๊ณ  ํ•  ๋•Œ, a() -> b() -> c()๋กœ ํ˜ธ์ถœ๋ ์ง€ a() -> c()๋กœ ํ˜ธ์ถœ๋ ์ง€ ์„œ๋ธŒํด๋ž˜์Šค๋Š” ์•Œ ์ˆ˜ ์—†๋‹ค. - ๋”ฐ๋ผ์„œ ์ตœ์†Œํ•œ ์ฑ…์—์„œ ์˜ˆ๋กœ๋“  ๋ฉ”์„œ๋“œ ๊ด€์ ์—์„œ๋Š” ์„œ๋ธŒํด๋ž˜์Šค๊ฐ€ ๋ถ€๋ชจํด๋ž˜์Šค์˜ ๋‚ด๋ถ€ ๊ตฌ์กฐ๋ฅผ ์ž˜ ์•Œ๊ณ  ์žˆ๋‹ค๊ณ  ๊ฒฐ๋ก  ์ง“๋Š” ๊ฑด ์ ์ ˆํ•˜์ง€ ์•Š์•„ ๋ณด์ธ๋‹ค. - ์ƒ์†์ด ์ž˜๋ชป ์‚ฌ์šฉ๋˜๋ฉด ์ข‹์ง€ ์•Š์€ ์ด์œ ๋Š” abstract ๋“ฑ์˜ ํ‚ค์›Œ๋“œ๋ฅผ ํ†ตํ•ด ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ณต์œ ํ•˜๊ธฐ ๋•Œ๋ฌธ์ด ์•„๋‹ˆ๋ผ, protected ๋“ฑ์œผ๋กœ ์„œ๋ธŒํด๋ž˜์Šค์—๊ฒŒ ๊ณต๊ฐœํ•˜๋Š” ๋ถ€๋ถ„์ด ์žˆ๊ณ  ์ด๊ฒƒ์ด ์ •๋ณด ๊ฐ์ถค์„ ์œ„๋ฐ˜ํ•˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. ### p72 #### ์ƒ์†์˜ ์ ์ ˆํ•œ ์‚ฌ์šฉ ์‚ฌ๋ก€ >์ฝ”๋“œ๋ฅผ ์žฌ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์—๋Š” ์ƒ์†๋ณด๋‹ค ํ•ฉ์„ฑ์„ ์„ ํ˜ธํ•˜๋Š” ๊ฒƒ์ด ์˜ณ์ง€๋งŒ, >๋‹คํ˜•์„ฑ์„ ์œ„ํ•ด ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์žฌ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์—๋Š” ์ƒ์†๊ณผ ํ•ฉ์„ฑ์„ ํ•จ๊ป˜ ์กฐํ•ฉํ•ด์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ๋ฐ–์— ์—†๋‹ค. - ๊ตฌํ˜„์„ ์žฌ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•œ ๋ชฉ์ ์œผ๋กœ ์ƒ์†์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ๊ฐ•ํ•œ ๊ฒฐํ•ฉ์„ ์œ ๋ฐœํ•˜๋ฏ€๋กœ ์ข‹์ง€ ์•Š๋‹ค. - ๋‹คํ˜•์„ฑ์„ ์‚ฌ์šฉํ•œ ๋ฌธ์ œ ํ•ด๊ฒฐ์ด ํ•„์š”ํ•œ ์ƒํ™ฉ์—์„œ ์ธํ„ฐํŽ˜์ด์Šค ๊ณต์œ ๋ฅผ ์œ„ํ•ด ์ƒ์†์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ๊ดœ์ฐฎ๋‹ค. - ๋‹จ ์ด ๊ฒฝ์šฐ์—๋„ ์ •๋ณด ๊ฐ์ถค ์œ„๋ฐ˜์„ ์ตœ์†Œํ™”ํ•ด์•ผ ํ•œ๋‹ค. ## 03. ์—ญํ• , ์ฑ…์ž„, ํ˜‘๋ ฅ - **Collaboration ---reference---> Role ---select from---> Object ---instance of---> Class** - **ํ˜‘๋ ฅ๋ง ์•ˆ์—์„œ ๊ด€๋ จ๋œ ์—ฌ๋Ÿฌ ์ฑ…์ž„์„ ํ•œ๋ฐ ๋ฌถ์œผ๋ฉด ์—ญํ• ์ด ๋˜๊ณ , ์ด ์—ญํ• ์„ ๊ต์ฒด ๊ฐ€๋Šฅํ•œ ๊ฐ์ฒด๊ฐ€ ์ˆ˜ํ–‰ํ•˜๋ฉฐ, ๊ฐ์ฒด๋Š” ํด๋ž˜์Šค์˜ ์ธ์Šคํ„ด์Šค๋‹ค.** ### p74 #### ์—ญํ• , ์ฑ…์ž„, ํ˜‘๋ ฅ์˜ ๊ฐ„๊ฒฐํ•œ ์ •์˜ >๊ฐ์ฒด๋“ค์ด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•ด ์ˆ˜ํ–‰ํ•˜๋Š” ์ƒํ˜ธ์ž‘์šฉ์„ **ํ˜‘๋ ฅ**์ด๋ผ๊ณ  ํ•œ๋‹ค. > >๊ฐ์ฒด๊ฐ€ ํ˜‘๋ ฅ์— ์ฐธ์—ฌํ•˜๊ธฐ ์œ„ํ•ด ์ˆ˜ํ–‰ํ•˜๋Š” ๋กœ์ง์€ **์ฑ…์ž„**์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. > >๊ฐ์ฒด๋“ค์ด ํ˜‘๋ ฅ ์•ˆ์—์„œ ์ˆ˜ํ–‰ํ•˜๋Š” ์ฑ…์ž„๋“ค์ด ๋ชจ์—ฌ ๊ฐ์ฒด๊ฐ€ ์ˆ˜ํ–‰ํ•˜๋Š” **์—ญํ• **์„ ๊ตฌ์„ฑํ•œ๋‹ค. - ์—ญํ• ๊ณผ ์ฑ…์ž„์„ ๊ตฌ๋ถ„ํ•ด์„œ ์„ค๋ช…ํ•˜๊ธฐ ์ฐธ ์–ด๋ ค์šด๋ฐ, ์ฑ…์ž„๋“ค์ด ๋ชจ์—ฌ ์—ญํ• ์„ ๊ตฌ์„ฑํ•œ๋‹ค๊ณ  ํ•˜๋‹ˆ ๋”ฑ ์ข‹๋‹ค. ### p77 #### ๊ฐ์ฒด์™€ ํ–‰๋™๊ณผ ํ˜‘๋ ฅ >Movie์˜ ํ–‰๋™์„ ๊ฒฐ์ •ํ•˜๋Š” ๊ฒƒ์„ ์˜ํ™” ์˜ˆ๋งค๋ฅผ ์œ„ํ•œ ํ˜‘๋ ฅ์ด๋‹ค. ํ˜‘๋ ฅ์ด๋ผ๋Š” ๋ฌธ๋งฅ์„ ๊ณ ๋ คํ•˜์ง€ ์•Š๊ณ  Movie์˜ ํ–‰๋™์„ ๊ฒฐ์ •ํ•˜๋Š” ๊ฒƒ์€ ์•„๋ฌด๋Ÿฐ ์˜๋ฏธ๊ฐ€ ์—†๋‹ค. ํ˜‘๋ ฅ์ด ์กด์žฌํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ์ฒด๊ฐ€ ์กด์žฌํ•˜๋Š” ๊ฒƒ์ด๋‹ค. - Movie๋ผ๋Š” ๊ฐ์ฒด์˜ ์ฑ…์ž„์€ ๋‹จ์ˆœํžˆ ํ˜„์‹ค์— ์กด์žฌํ•˜๋Š” Movie์—์„œ ์œ ์ถ”ํ•ด์„œ ๋„์ถœํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค. ์˜ํ™” ์˜ˆ๋งค๋ผ๋Š” ํ˜‘๋ ฅ๋ง ์•ˆ์—์„œ ๋„์ถœ๋˜์–ด์•ผ ํ•œ๋‹ค. #### ๊ฐ์ฒด์˜ ์ƒํƒœ์™€ ํ–‰๋™ >๊ฐ์ฒด์˜ ํ–‰๋™์„ ๊ฒฐ์ •ํ•˜๋Š” ๊ฒƒ์ด ํ˜‘๋ ฅ์ด๋ผ๋ฉด, ๊ฐ์ฒด์˜ ์ƒํƒœ๋ฅผ ๊ฒฐ์ •ํ•˜๋Š” ๊ฒƒ์€ ํ–‰๋™์ด๋‹ค. ๊ฐ์ฒด์˜ ์ƒํƒœ๋Š” ๊ทธ ๊ฐ์ฒด๊ฐ€ ํ–‰๋™์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ์ •๋ณด๊ฐ€ ๋ฌด์—‡์ธ์ง€๋กœ ๊ฒฐ์ •๋œ๋‹ค. ๊ฐ์ฒด๋Š” ์ž์‹ ์˜ ์ƒํƒœ๋ฅผ ์Šค์Šค๋กœ ๊ฒฐ์ •ํ•˜๊ณ  ๊ด€๋ฆฌํ•˜๋Š” ์ž์œจ์ ์ธ ์กด์žฌ์ด๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ์ฒด๊ฐ€ ์ˆ˜ํ–‰ํ•˜๋Š” ํ–‰๋™์— ํ•„์š”ํ•œ ์ƒํƒœ๋„ ํ•จ๊ป˜ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์•ผ ํ•œ๋‹ค. - ๊ฐ์ฒด์ง€ํ–ฅ์—์„œ ํ–‰๋™๊ณผ ์ƒํƒœ๋Š” ๋‹ญ๊ณผ ๋‹ฌ๊ฑ€์ด ์•„๋‹ˆ๋ผ ์–ธ์ œ๋‚˜ ํ–‰๋™์ด ์ƒํƒœ๋ณด๋‹ค ๋จผ์ €๊ณ  ์šฐ์„ ์ด๋‹ค. ### p78 #### ์ฑ…์ž„๊ณผ ํ–‰๋™ >ํ˜‘๋ ฅ์— ์ฐธ์—ฌํ•˜๊ธฐ ์œ„ํ•ด ๊ฐ์ฒด๊ฐ€ ์ˆ˜ํ–‰ํ•˜๋Š” ํ–‰๋™์„ ์ฑ…์ž„์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. - ๋ฏธ๋ฌ˜ํ•œ ์ฐจ์ด์ง€๋งŒ 'ํ–‰๋™์„ ์ฑ…์ž„์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค'๋ผ๊ณ  ํ‘œํ˜„ํ•˜๋ฉด ํ–‰๋™์„ ๋จผ์ € ๋งŒ๋“ค๊ณ  ์ด๋ฅผ ์ฑ…์ž„์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค๋Š” ๋‰˜์•™์Šค๊ฐ€ ๋А๊ปด์ง„๋‹ค. - ๋จผ์ € ์ฑ…์ž„์ด ์ •๋ฆฝ๋˜๊ณ  ๊ทธ ์ฑ…์ž„์„ ์™„์ˆ˜ํ•˜๊ธฐ ์œ„ํ•ด ๊ทธ์— ๋งž๋Š” ํ–‰๋™์ด ํ•„์š”ํ•œ ๊ฒŒ ์•„๋‹๊นŒ. - ์ฑ…์ž„์€ ์„ค๊ณ„ ๊ด€์ ์— ๊ฐ€๊นŒ์šด ์šฉ์–ด๊ณ , ํ–‰๋™์€ ๊ตฌํ˜„ ๊ด€์ ์— ๊ฐ€๊นŒ์šด ๋А๋‚Œ์ด ๋“ ๋‹ค. - ํ•˜์ง€๋งŒ ์‹ค์งˆ์ ์œผ๋กœ๋Š” ๋™์ผํ•œ ๊ฒƒ์„ ๊ฐ€๋ฆฌํ‚จ๋‹ค๊ณ  ๋ด๋„ ๋ฌด๋ฐฉํ•  ๊ฒƒ ๊ฐ™๋‹ค. - ์ฑ…์—์„œ ์˜ˆ๋กœ ๋“ค๊ณ  ์žˆ๋Š” DiscountPolicy๋Š” ํ• ์ธ ๊ธˆ์•ก์„ ๊ณ„์‚ฐํ•˜๋Š” ์ฑ…์ž„์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ํ• ์ธ ๊ธˆ์•ก ๊ณ„์‚ฐ์ด๋ผ๋Š” ์ฑ…์ž„์„ ์™„์ˆ˜ํ•˜๊ธฐ ์œ„ํ•ด ์„œ๋ธŒํด๋ž˜์Šค AmountDiscountPolicy๋Š” ์ •์•ก ํ• ์ธ์ด๋ผ๋Š” ํ–‰๋™์„ ๊ฐ€์ง€๊ณ  ์žˆ๊ณ , ๋˜ ๋‹ค๋ฅธ ์„œ๋ธŒํด๋ž˜์Šค PercentDiscountPolicy๋Š” ์ •๋ฅ  ํ• ์ธ์ด๋ผ๋Š” ํ–‰๋™์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค. - AmountDiscountPolicy์˜ ์ •์•ก ํ• ์ธ์€ ํ–‰๋™์ด์ž ์ฑ…์ž„์ด๊ณ , PercentDiscountPolicy์˜ ์ •๋ฅ  ํ• ์ธ์€ ํ–‰๋™์ด์ž ์ฑ…์ž„์ด๋‹ค. ### p81 #### CRC ์นด๋“œ >์„ค๊ณ„ ์ดˆ๊ธฐ์— ์ฑ…์ž„์„ ํ• ๋‹นํ•  ํ›„๋ณด๋Š” ๊ฐ์ฒด์ผ ์ˆ˜๋„ ์žˆ๊ณ  ์—ญํ• ์ผ ์ˆ˜๋„ ์žˆ๋‹ค. ์ค‘์š”ํ•œ ๊ฒƒ์€ ํ›„๋ณด(Candidate)๋ฅผ ์–ด๋–ป๊ฒŒ ๊ตฌํ˜„ํ•  ๊ฒƒ์ธ๊ฐ€๊ฐ€ ์•„๋‹ˆ๋ผ ์–ด๋–ค ํ›„๋ณด์—๊ฒŒ ์–ด๋–ค ์ฑ…์ž„์„ ํ• ๋‹นํ•  ๊ฒƒ์ธ๊ฐ€์— ์ง‘์ค‘ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. C๋ฅผ ํด๋ž˜์Šค๋กœ ๋ณด๋Š” ๊ด€์ ์—์„œ๋Š” ์„ค๊ณ„์˜ ์ž์—ฐ์Šค๋Ÿฌ์šด ํ๋ฆ„์„ ๋ฐฉํ•ดํ•˜๊ณ  ์ฒ˜์Œ๋ถ€ํ„ฐ ๊ตฌํ˜„ ์ค‘์‹ฌ์ ์ธ ์‚ฌ๊ณ ๋กœ ๋น ์ง€๊ฒŒ ๋งŒ๋“ค ์œ„ํ—˜์ด ๋„์‚ฌ๋ฆฌ๊ณ  ์žˆ๋‹ค. - ์„ค๊ณ„ ๊ณผ์ •์—์„œ ํด๋ž˜์Šค๋ฅผ ๋„ˆ๋ฌด ์ผ์ฐ ๋“ฑ์žฅ์‹œํ‚ค๋ฉด ํ˜‘๋ ฅ๊ณผ ์ฑ…์ž„์— ๋Œ€ํ•œ ๊ณ ๋ฏผ์ด ์•„๋‹ˆ๋ผ ๊ตฌํ˜„์— ๋Œ€ํ•œ ๊ณ ๋ฏผ์— ๋น ์ง€๊ฒŒ ํ•  ์œ„ํ—˜์ด ํฌ๋‹ค. - ํด๋ž˜์Šค๋Š” ์„ค๊ณ„ ๊ณผ์ •์—์„œ ์‚ฌ์šฉ๋˜๋Š” ๋“ฑ์žฅ ์ธ๋ฌผ์ด ์•„๋‹ˆ๋ผ ์„ค๊ณ„ ๊ฒฐ๊ณผ๋กœ ๋‚˜์˜ค๋Š” ๊ฒฐ๊ณผ๋ฌผ์ด๋ผ๊ณ  ๋ณด๋Š” ๊ฒŒ ์ข‹๋‹ค. #### ์ •๋ณด ์ „๋ฌธ๊ฐ€(Information Expert) ํŒจํ„ด >์ž์œจ์ ์ธ ๊ฐ์ฒด๋ฅผ ๋งŒ๋“œ๋Š” ๊ฐ€์žฅ ๊ธฐ๋ณธ์ ์ธ ๋ฐฉ๋ฒ•์€ ์ฑ…์ž„์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ์ •๋ณด๋ฅผ ๊ฐ€์žฅ ์ž˜ ์•Œ๊ณ  ์žˆ๋Š” ์ „๋ฌธ๊ฐ€(Information Expert, ์‚ฌ๋žŒ์ด ์•„๋‹ˆ๋ผ ๊ฐ์ฒด๋ฅผ ์˜๋ฏธ)์—๊ฒŒ ๊ทธ ์ฑ…์ž„์„ ํ• ๋‹นํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ์ด๋ฅผ ์ฑ…์ž„ ํ• ๋‹น์„ ์œ„ํ•œ ์ •๋ณด ์ „๋ฌธ๊ฐ€ ํŒจํ„ด์ด๋ผ๊ณ  ํ•œ๋‹ค. ### p82 - p83 #### ๊ฐ์ฒด์ง€ํ–ฅ ์„ค๊ณ„ ๊ณผ์ • >๊ฐ์ฒด์ง€ํ–ฅ ์„ค๊ณ„๋Š” ์‹œ์Šคํ…œ์˜ ์ฑ…์ž„์„ ์™„๋ฃŒํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ๋” ์ž‘์€ ์ฑ…์ž„์„ ์ฐพ์•„๋‚ด๊ณ  ์ด๋ฅผ ๊ฐ์ฒด๋“ค์—๊ฒŒ ํ• ๋‹นํ•˜๋Š” ๋ฐ˜๋ณต์ ์ธ ๊ณผ์ •์„ ํ†ตํ•ด ๋ชจ์–‘์„ ๊ฐ–์ถฐ๊ฐ„๋‹ค. #### ์‹œ์Šคํ…œ์˜ ์›์ดˆ์ ์ธ ์ฑ…์ž„ ์ •์˜๋ถ€ํ„ฐ ์„ค๊ณ„ ์‹œ์ž‘ >์‹œ์Šคํ…œ์ด ์‚ฌ์šฉ์ž์—๊ฒŒ ์ œ๊ณตํ•ด์•ผ ํ•  ๊ธฐ๋Šฅ์€ ์˜ํ™”๋ฅผ ์˜ˆ๋งคํ•˜๋Š” ๊ฒƒ์ด๊ณ  ์ด ๊ธฐ๋Šฅ์„ ์‹œ์Šคํ…œ์ด ์ œ๊ณตํ•  ์ฑ…์ž„์œผ๋กœ ํ• ๋‹นํ•  ๊ฒƒ์ด๋‹ค. #### ํ˜‘๋ ฅ์€ ๋ฉ”์‹œ์ง€ ์ •์˜๋กœ ์‹œ์ž‘ >๊ฐ์ฒด๊ฐ€ ์ฑ…์ž„์„ ์ˆ˜ํ–‰ํ•˜๊ฒŒ ํ•˜๋Š” ์œ ์ผํ•œ ๋ฐฉ๋ฒ•์€ ๋ฉ”์‹œ์ง€๋ฅผ ์ „์†กํ•˜๋Š” ๊ฒƒ์ด๋ฏ€๋กœ ์ฑ…์ž„์„ ํ• ๋‹นํ•œ๋‹ค๋Š” ๊ฒƒ์€ ๋ฉ”์‹œ์ง€์˜ ์ด๋ฆ„์„ ๊ฒฐ์ •ํ•˜๋Š” ๊ฒƒ๊ณผ ๊ฐ™๋‹ค. ์ด ์˜ˆ์—์„œ๋Š” `์˜ˆ๋งคํ•˜๋ผ`๋ผ๋Š” ์ด๋ฆ„์˜ ๋ฉ”์‹œ์ง€๋กœ ํ˜‘๋ ฅ์„ ์‹œ์ž‘ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค. #### ๋ฉ”์‹œ์ง€ ์ฒ˜๋ฆฌ ๋‹ด๋‹น ๊ฐ์ฒด ์„ ์ • >์˜ํ™” ์˜ˆ๋งค์™€ ๊ด€๋ จ๋œ ์ •๋ณด๋ฅผ ๊ฐ€์žฅ ๋งŽ์ด ์•Œ๊ณ  ์žˆ๋Š” ๊ฐ์ฒด(์ธ Screening)์—๊ฒŒ ์ฑ…์ž„์„ ํ• ๋‹นํ•˜๋Š” ๊ฒƒ์ด ๋ฐ”๋žŒ์งํ•˜๋‹ค. > >Screening์€ ์˜ˆ๋งค์— ๋Œ€ํ•ด์„œ๋Š” ์ •๋ณด ์ „๋ฌธ๊ฐ€์ผ์ง€ ๋ชฐ๋ผ๋„ ์˜ํ™” ๊ฐ€๊ฒฉ ์ž์ฒด์— ๋Œ€ํ•ด์„œ๋Š” ์ •๋ณด ์ „๋ฌธ๊ฐ€๊ฐ€ ์•„๋‹ˆ๋‹ค. (๋”ฐ๋ผ์„œ Screening๋„ `๊ฐ€๊ฒฉ์„ ๊ณ„์‚ฐํ•˜๋ผ`๋ผ๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ์™ธ๋ถ€๋กœ ๋ณด๋‚ด๋ฉฐ ํ˜‘๋ ฅ์„ ์š”์ฒญํ•œ๋‹ค. > >๊ฐ€๊ฒฉ ๊ณ„์‚ฐ์„ ๊ฐ€์žฅ ์ž˜ ์•Œ๊ณ  ์žˆ๋Š” ์ •๋ณด ์ „๋ฌธ๊ฐ€๋Š” Movie์ด๋ฏ€๋กœ Movie์—๊ฒŒ ๊ฐ€๊ฒฉ ๊ณ„์‚ฐ ์ฑ…์ž„์„ ํ• ๋‹นํ•œ๋‹ค. - ์œ„ ๊ณผ์ •์„ ๋ฐ˜๋ณตํ•˜๋ฉด์„œ ์„ค๊ณ„๊ฐ€ ๋ชจ์Šต์„ ๊ฐ–์ถฐ๊ฐ„๋‹ค๋Š” ์–˜๊ธฐ ### p84 - p85 #### ์ฑ…์ž„ ์ฃผ๋„ ์„ค๊ณ„ ๋ฐฉ๋ฒ• >1. ์‹œ์Šคํ…œ์ด ์‚ฌ์šฉ์ž์—๊ฒŒ ์ œ๊ณตํ•ด์•ผ ํ•˜๋Š” ๊ธฐ๋Šฅ์ธ ์‹œ์Šคํ…œ ์ฑ…์ž„์„ ํŒŒ์•…ํ•œ๋‹ค. >2. ์‹œ์Šคํ…œ ์ฑ…์ž„์„ ๋” ์ž‘์€ ์ฑ…์ž„์œผ๋กœ ๋ถ„ํ• ํ•œ๋‹ค. >3. ๋ถ„ํ• ๋œ ์ฑ…์ž„์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ์ ์ ˆํ•œ ๊ฐ์ฒด ๋˜๋Š” ์—ญํ• ์„ ์ฐพ์•„ ์ฑ…์ž„์„ ํ• ๋‹นํ•œ๋‹ค. >4. ๊ฐ์ฒด๊ฐ€ ์ฑ…์ž„์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๋„์ค‘ ๋‹ค๋ฅธ ๊ฐ์ฒด์˜ ๋„์›€์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ ์ด๋ฅผ ์ฑ…์ž„์งˆ ์ ์ ˆํ•œ ๊ฐ์ฒด ๋˜๋Š” ์—ญํ• ์„ ์ฐพ๋Š”๋‹ค. >5. ํ•ด๋‹น ๊ฐ์ฒด ๋˜๋Š” ์—ญํ• ์—๊ฒŒ ์ฑ…์ž„์„ ํ• ๋‹นํ•จ์œผ๋กœ์จ ๋‘ ๊ฐ์ฒด๊ฐ€ ํ˜‘๋ ฅํ•˜๊ฒŒ ํ•œ๋‹ค. #### ๋ฉ”์‹œ์ง€๊ฐ€ ๊ฐ์ฒด๋ฅผ ๊ฒฐ์ •ํ•œ๋‹ค. >๊ฐ์ฒด์—๊ฒŒ ์ฑ…์ž„์„ ํ• ๋‹นํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ๋ฉ”์‹œ์ง€๋ฅผ ๋จผ์ € ์‹๋ณ„ํ•˜๊ณ  ๋ฉ”์‹œ์ง€๋ฅผ ์ฒ˜๋ฆฌํ•  ๊ฐ์ฒด๋ฅผ ๋‚˜์ค‘์— ์„ ํƒํ–ˆ๋‹ค๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•˜๋‹ค. >๋‹ค์‹œ ๋งํ•ด, ๊ฐ์ฒด๊ฐ€ ๋ฉ”์‹œ์ง€๋ฅผ ์„ ํƒํ•˜๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ ๋ฉ”์‹œ์ง€๊ฐ€ ๊ฐ์ฒด๋ฅผ ์„ ํƒํ•˜๊ฒŒ ํ–ˆ๋‹ค. - ๊ทธ๋Ÿผ ๋ฉ”์‹œ์ง€๋ฅผ ์ฒ˜๋ฆฌํ•  ๊ฐ์ฒด๋ฅผ ์„ ํƒํ•˜๋Š” ๊ธฐ์ค€์€ ๋ฌด์—‡์ธ๊ฐ€? - '์„ ํƒ'ํ•œ๋‹ค๋Š” ๊ฒƒ์€ ์ตœ์†Œํ•œ ๊ทธ ํ›„๋ณด๊ตฐ์ด ์ด๋ฏธ ์กด์žฌํ•œ๋‹ค๋Š” ์–˜๊ธฐ์ธ๋ฐ, - ์ด ํ›„๋ณด๊ตฐ์€ ์• ์ดˆ์— ์–ด๋–ค ๊ธฐ์ค€์œผ๋กœ ๋งŒ๋“ค์–ด์ง€๋Š” ๊ฑด์ง€์— ๋Œ€ํ•œ ์„ค๋ช…์ด ์—†๋Š” ๊ฒƒ ๊ฐ™๋‹ค. - ~~์ฆ‰, ํ›„๋ณด๊ตฐ์ด๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋Š”, p41์— ๋‚˜์˜ค๋Š” ์ตœ์ดˆ์˜ ์—ญํ• ๋“ค(๊ทธ๋ฆผ 2.3 ์ œ๋ชฉ์—๋Š” 'ํƒ€์ž…๋“ค'์ด๋ผ๊ณ  ์จ์žˆ๋Š” ์˜ˆ๋งค, ์ƒ์˜, ์˜ํ™”, ํ• ์ธ ์ •์ฑ…, ํ• ์ธ ์กฐ๊ฑด ๋“ฑ)์€ ์• ์ดˆ์— ์–ด๋–ป๊ฒŒ ๋„์ถœ๋œ ๊ฒƒ์ธ๊ฐ€?~~ - ~~์•„๋งˆ๋„ ๋„๋ฉ”์ธ ์ „๋ฌธ๊ฐ€์™€ ํ•จ๊ป˜ ๊ณ ๋ฏผํ•˜๋ฉฐ ๋„์ถœํ•˜๋Š” ๊ฒƒ์ผํ…๋ฐ, ๊ทธ ๋„์ถœ ๊ธฐ์ค€์€ ๋ฌด์—‡์ผ๊นŒ? ๋งŒ์•ฝ ๊ทธ ๋„์ถœ ๊ธฐ์ค€์ด ๋ฉ”์‹œ์ง€๋ผ๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ชจ์ˆœ์ด ๋ฐœ์ƒํ•œ๋‹ค.~~ - ~~ํ›„๋ณด๊ตฐ์ด ๋ฉ”์‹œ์ง€๋ณด๋‹ค ๋จผ์ € ์กด์žฌํ•ด์•ผ ํ›„๋ณด๊ตฐ ์ค‘์—์„œ ์„ ์ •์„ ํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ, ํ›„๋ณด๊ตฐ์˜ ๋„์ถœ ๊ธฐ์ค€์ด ๋˜ ๋ฉ”์‹œ์ง€๋ผ๋ฉด ๋ชจ์ˆœ์ด ์•„๋‹Œ๊ฐ€?~~ - ~~๊ทธ๋ ‡๋‹ค๋ฉด ํ›„๋ณด๊ตฐ์˜ ๋„์ถœ ๊ธฐ์ค€์€ ๋ฌด์—‡์ธ๊ฐ€?~~ - **ํ‹€๋ฆฌ๋‹ค. ํ›„๋ณด๊ตฐ์€ ์—ญํ• ๋“ค์ด ์•„๋‹ˆ๊ณ , ์ •ํ•ด์ง„ ์—ญํ• ์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ์ฒด๋“ค์ด ํ›„๋ณด๊ตฐ์ด๋‹ค.** - **์—ญํ• ์€ ๋ฉ”์‹œ์ง€์™€ ์„ ํ›„ ๊ด€๊ณ„ ์—†์ด ํ•จ๊ป˜ ๋„์ถœ๋œ๋‹ค.** - **๋ฉ”์‹œ์ง€๊ฐ€ (์ด๋ฏธ ์กด์žฌํ•˜๋Š” ๊ฐ์ฒด ์ค‘์—์„œ) ๊ฐ์ฒด๋ฅผ ์„ ํƒํ•œ๋‹ค๊ธฐ๋ณด๋‹ค, ๋ฉ”์‹œ์ง€์— ๋Œ€์‘ํ•˜๋Š” ์—ญํ• ์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ์ฒด์™€ ๊ทธ ๊ฐ์ฒด๊ฐ€ ํ˜‘๋ ฅ์— ์ฐธ์—ฌํ•  ์ˆ˜ ์žˆ๋Š” ํ–‰๋™์ด ์ด ์‹œ์ ์— ์ฒ˜์Œ ๋งŒ๋“ค์–ด์ง„๋‹ค๊ณ  ๋ณด๋Š” ๊ฒŒ ๋‚ซ์ง€ ์•Š์„๊นŒ?** - ์ด๋ ‡๊ฒŒ ๋ณด๋ฉด ์ •๋ณด ์ „๋ฌธ๊ฐ€ ํŒจํ„ด์ด๋ผ๋Š” ๊ฒŒ ์œ ํšจํ•œ ๊ฑด์ง€ ๋ชจ๋ฅด๊ฒ ๋‹ค. - ๋ฉ”์‹œ์ง€๋ฅผ ์ฒ˜๋ฆฌํ•  ์ •๋ณด๋ฅผ ์ž˜ ์•„๋Š” ๊ฐ์ฒด๋ฅผ ์ด ์‹œ์ ์—์„œ ํŒ๋ณ„ํ•  ์ˆ˜ ์žˆ๋Š”๊ฑด์ง€ ๋ชจ๋ฅด๊ฒ ๋‹ค. ์™œ๋ƒํ•˜๋ฉด ์ด ์‹œ์ ์—์„œ๋Š” ๋ฉ”์‹œ์ง€์™€ ์—ญํ• ์ด ์กด์žฌํ•  ๋ฟ์ด๊ณ , ๊ฐ์ฒด๋Š” ์ด์ œ ์„ค๊ณ„ํ•˜๊ธฐ ์‹œ์ž‘ํ•˜๋Š” ์‹œ์ ์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. - ๋”ฐ๋ผ์„œ ์–ด๋А ๊ฐ์ฒด๊ฐ€ ์–ด๋–ค ์ •๋ณด๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š”์ง€ ๋ชจ๋ฅด๊ณ , ์‹ฌ์ง€์–ด ์–ด๋–ค ๊ฐ์ฒด๊ฐ€ ์กด์žฌํ•˜๋Š”์ง€ ๋งˆ์ € ์•Œ ์ˆ˜ ์—†๋Š”๋ฐ ๋ฌด์Šจ ์ „๋ฌธ๊ฐ€๊ฐ€ ์กด์žฌํ•˜๋ฉฐ ๋ˆ„๊ตด ์„ ํƒํ•œ๋‹ค๋Š” ๊ฑด๊ฐ€.. #### ํ–‰๋™์ด ์ƒํƒœ๋ฅผ ๊ฒฐ์ •ํ•œ๋‹ค. >๊ฐ์ฒด๊ฐ€ ํ˜‘๋ ฅ์— ์ ํ•ฉํ•œ์ง€๋ฅผ ๊ฒฐ์ •ํ•˜๋Š” ๊ฒƒ์€ ๊ทธ ๊ฐ์ฒด์˜ ์ƒํƒœ๊ฐ€ ์•„๋‹ˆ๋ผ ํ–‰๋™์ด๋‹ค. - ์ƒํƒœ๊ฐ€ ๋จผ์ € ์กด์žฌํ•˜๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ ํ–‰๋™์— ํ•„์š”ํ•œ ์ƒํƒœ๋ฅผ ์ด ๋•Œ ์„ค๊ณ„ํ•œ๋‹ค. ### p86 #### ์—ญํ• ๊ณผ ๊ฐ์ฒด >ํ˜‘๋ ฅ์„ ๋ชจ๋ธ๋งํ•  ๋•Œ๋Š” ๊ฐ์ฒด์—๊ฒŒ ์ฑ…์ž„์„ ํ• ๋‹นํ•˜๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ ์—ญํ• ์—๊ฒŒ ์ฑ…์ž„์„ ํ• ๋‹นํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋Š” ๊ฒŒ ์ข‹๋‹ค. > >`์˜ˆ๋งคํ•˜๋ผ`๋ผ๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ์ฒ˜๋ฆฌํ•˜๊ธฐ์— ์ ํ•ฉํ•œ ๊ฐ์ฒด๋กœ Screening์„ ์„ ํƒํ–ˆ๋‹ค. ํ•˜๋‚˜์˜ ๋‹จ๊ณ„์ฒ˜๋Ÿผ ๋ณด์ด๋Š” ์ด ์ฑ…์ž„ ํ• ๋‹น ๊ณผ์ •์€ ์‹ค์ œ๋กœ๋Š” (์—ญํ•  ์ •๋ฆฝ๊ณผ ์—ญํ• ์— ๋งž๋Š” ๊ฐ์ฒด์˜ ์„ ํƒ์ด๋ผ๋Š”) ๋‘ ๊ฐœ์˜ ๋…๋ฆฝ์ ์ธ ๋‹จ๊ณ„๊ฐ€ ํ•ฉ์ณ์ง„ ๊ฒƒ์ด๋‹ค. - ์•ž์— ์“ด ๋Œ€๋กœ Screening์„ ์„ ํƒํ–ˆ๋‹ค ๋ผ๊ธฐ๋ณด๋‹ค Screening์„ ์ด ์‹œ์ ์— ์„ค๊ณ„ํ•œ๋‹ค ๊ฐ€ ๋” ๋‚˜์„ ๋“ฏ. - ์—ญํ• ๊ณผ ๊ฐ์ฒด๋ฅผ ์–ด๋–ป๊ฒŒ ๊ตฌ๋ถ„ํ•ด์„œ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์„๊นŒ ํ–ˆ๋Š”๋ฐ ์ด์ฒ˜๋Ÿผ ๋ช…์พŒํ•  ์ˆ˜๊ฐ€ ์—†๋‹ค. ### p88 #### ์—ญํ• ๊ณผ ๊ฐ์ฒด >์—ญํ• ์€ ๋‘ ์ข…๋ฅ˜์˜ ๊ฐ์ฒด๋ฅผ ๊ต๋Œ€๋กœ ๋ฐ”๊ฟ” ๋ผ์šธ ์ˆ˜ ์žˆ๋Š” ์ผ์ข…์˜ ์Šฌ๋กฏ์œผ๋กœ ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ๋‹ค. > >์—ญํ• ์€ ๋‘ ์ข…๋ฅ˜์˜ ๊ตฌ์ฒด์ ์ธ ๊ฐ์ฒด๋ฅผ ํฌ๊ด„ํ•˜๋Š” ์ถ”์ƒํ™”๋ผ๋Š” ์ ์— ์ฃผ๋ชฉํ•˜๋ผ. #### ์—ญํ• ๊ณผ ์ฑ…์ž„ >์—ญํ• ์€ ๋‹ค๋ฅธ ๊ฒƒ์œผ๋กœ ๊ต์ฒดํ•  ์ˆ˜ ์žˆ๋Š” ์ฑ…์ž„์˜ ์ง‘ํ•ฉ์ด๋‹ค. #### ์—ญํ• ์€ ์ฃผ์–ด์ง„ ์ฑ…์ž„์„ ์™„์ˆ˜ํ•˜๋„๋ก ์ถ”์ƒํ™”๋œ ์Šฌ๋กฏ์ด๊ณ , ๊ฐ์ฒด๋Š” ์ด ์Šฌ๋กฏ์— ๋ผ์›Œ์ ธ์„œ ์ฃผ์–ด์ง„ ์ฑ…์ž„์„ ์™„์ˆ˜ํ•œ๋‹ค. ### p89 #### ์—ญํ• ์˜ ๊ตฌํ˜„ >์—ญํ• ์„ ๊ตฌํ˜„ํ•˜๋Š” ๊ฐ€์žฅ ์ผ๋ฐ˜์ ์ธ ๋ฐฉ๋ฒ•์€ ์ถ”์ƒ ํด๋ž˜์Šค์™€ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด๋‹ค. - ์ถ”์ƒ ํด๋ž˜์Šค์™€ ์ธํ„ฐํŽ˜์ด์Šค๋Š” ์—ญํ• ์— ์ฃผ์–ด์ง„ ์ฑ…์ž„ ์™„์ˆ˜๋ฅผ ์œ„ํ•ด ๋ฉ”์‹œ์ง€๊ฐ€ ์˜ค๊ฐˆ ์ˆ˜ ์žˆ๋Š” ํ†ต๋กœ๋ฅผ ์™ธ๋ถ€์— ์ œ๊ณตํ•˜๊ณ  ์ฑ…์ž„ ์™„์ˆ˜๋ฅผ ์œ„ํ•œ ๋กœ์ง์„ ๋‚ด๋ถ€๋กœ ์บก์Аํ™”ํ•œ๋‹ค. ### p91 #### ํ˜‘๋ ฅ, ์—ญํ• , ๊ฐ์ฒด, ํด๋ž˜์Šค์˜ ๊ด€๊ณ„ >Collaboration ---reference---> Role ---select from---> Object ---instance of---> Class #### ๋ฌด์—‡๋ถ€ํ„ฐ? >๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ ์–ด๋–ค ๊ฒƒ์ด ์—ญํ• ์ด๊ณ , ์–ด๋–ค ๊ฒƒ์ด ๊ฐ์ฒด์ธ์ง€ ๋˜๋ ทํ•˜๊ฒŒ ๋“œ๋Ÿฌ๋‚˜์ง€๋Š” ์•Š์„ ๊ฒƒ์ด๋‹ค. ํŠนํžˆ๋‚˜ ์„ค๊ณ„ ์ดˆ๋ฐ˜์—๋Š” ๊ฒฐ์ •์„ ๋‚ด๋ฆฌ๊ธฐ๊ฐ€ ๋”์šฑ ์–ด๋ ต๋‹ค. > >์„ค๊ณ„ ์ดˆ๋ฐ˜์—๋Š” ์ ์ ˆํ•œ ์ฑ…์ž„๊ณผ ํ˜‘๋ ฅ์˜ ํฐ ๊ทธ๋ฆผ์„ ํƒ์ƒ‰ํ•˜๋Š” ๊ฒƒ์ด ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๋ชฉํ‘œ์—ฌ์•ผ ํ•˜๊ณ  ์—ญํ• ๊ณผ ๊ฐ์ฒด๋ฅผ ๊ตฌ๋ถ„ํ•˜๋Š” ๊ฒƒ์€ ๊ทธ๋ ‡๊ฒŒ ์ค‘์š”ํ•˜์ง€๋Š” ์•Š๋‹ค. > >์ด์— ๋Œ€ํ•œ ๊ฐœ์ธ์ ์ธ ๊ฒฌํ•ด๋Š”์• ๋งคํ•˜๋‹ค๋ฉด ๋‹จ์ˆœํ•˜๊ฒŒ ๊ฐ์ฒด๋กœ ์‹œ์ž‘ํ•˜๊ณ  ๋ฐ˜๋ณต์ ์œผ๋กœ ์ฑ…์ž„๊ณผ ํ˜‘๋ ฅ์„ ์ •์ œํ•ด๊ฐ€๋ฉด์„œ ํ•„์š”ํ•œ ์ˆœ๊ฐ„์— ๊ฐ์ฒด๋กœ๋ถ€ํ„ฐ ์—ญํ• ์„ ๋ถ„๋ฆฌํ•ด๋‚ด๋Š” ๊ฒƒ์ด ๊ฐ€์žฅ ์ข‹์€ ๋ฐฉ๋ฒ•์ด๋‹ค. - ์•ž์—์„œ ์ฒ˜์Œ์—๋Š” ์—ญํ• ์ด ๋ฉ”์‹œ์ง€์™€ ์„ ํ›„๊ด€๊ณ„ ์—†์ด ํ•จ๊ป˜ ๋„์ถœ๋˜๊ณ , ๋ฉ”์‹œ์ง€์— ์˜ํ•ด ๊ฐ์ฒด๊ฐ€ ์ •์˜๋˜๋ฏ€๋กœ, - ๋ฉ”์‹œ์ง€๊ฐ€ ์ด๋ฏธ ๋งŒ๋“ค์–ด์ง„ ๊ฐ์ฒด๋ฅผ ์„ ํƒํ•œ๋‹ค๊ธฐ๋ณด๋‹ค ๋ฉ”์‹œ์ง€์— ์˜ํ•ด ๊ฐ์ฒด๊ฐ€ ์ฒ˜์Œ ๋งŒ๋“ค์–ด์ง„๋‹ค๊ณ  ๋ณด๋Š” ๊ฒŒ ๋‚ซ๊ฒ ๋‹ค๋Š” ์ž์ฒด ๊ฒฐ๋ก ์„ ๋‚ด๋ ธ๋Š”๋ฐ, - ์ด๋ ‡๊ฒŒ ์—ญํ• ๊ณผ ๊ฐ์ฒด ๊ตฌ๋ถ„์ด ์ดˆ๊ธฐ์—๋Š” ์‰ฝ์ง€ ์•Š์œผ๋‹ˆ ์ผ๋‹จ ๊ฐ์ฒด๋กœ ์‹œ์ž‘ํ•˜๊ณ , - ์ฑ…์ž„์„ ์™„์ˆ˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์—ฌ๋Ÿฌ ๊ฐœ์ž„์ด ๋“œ๋Ÿฌ๋‚ฌ์„ ๋•Œ ์—ญํ• ๊ณผ ์ฑ…์ž„์„ ๋ถ„๋ฆฌํ•˜๋Š” ๊ฒŒ ์ข‹์€ ๋ฐฉ๋ฒ•์ด๋ผ๊ณ  ํ•˜๋‹ˆ, - ๋ฉ”์‹œ์ง€์— ๋”ฐ๋ผ ๊ฐ์ฒด๋ฅผ '์„ ํƒ'ํ•œ๋‹ค๋Š” ๋ง๋„ ์œ ํšจํ•ด์กŒ๋‹ค. - ํ•˜์ง€๋งŒ, ๊ฒฐ๊ณผ์ ์œผ๋กœ ๊ฐ์ฒด๊ฐ€ ์—ญํ• ์ด ๋  ์ˆ˜๋„ ์žˆ์œผ๋‹ˆ๊นŒ ํ˜„์‹ค์ ์œผ๋กœ ์ด๋Ÿฐ ๋ฐฉ๋ฒ•์„ ์ทจํ•  ์ˆ˜๋„ ์žˆ๋Š” ๊ฒƒ์ด๊ณ , - ์›๋ก ์ ์œผ๋กœ๋Š” ์—ฌ์ „ํžˆ ๊ทธ ์‹œ์ ์—์„œ๋Š” ๋ฉ”์‹œ์ง€์™€ ์—ญํ• ๋งŒ์ด ์กด์žฌํ•œ๋‹ค๊ณ  ๋ณด๋Š” ๊ฒƒ์ด ๋งž๋‹ค๊ณ  ์ƒ๊ฐํ•œ๋‹ค. ### p96 #### ์—ญํ• ๊ณผ ๊ฐ์ฒด >๊ฐ์ฒด๋Š” ๋‹ค์ˆ˜์˜ ์—ญํ• ์„ ๋ณด์œ ํ•  ์ˆ˜ ์žˆ์ง€๋งŒ, ๊ฐ์ฒด๊ฐ€ ์ฐธ์—ฌํ•˜๋Š” ํŠน์ • ํ˜‘๋ ฅ์€ ๊ฐ์ฒด์˜ ํ•œ ๊ฐ€์ง€ ์—ญํ• ๋งŒ ๋ฐ”๋ผ๋ณผ ์ˆ˜ ์žˆ๋‹ค. - ๊ฐ์ฒด๋Š” ๋‹ค์ˆ˜์˜ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๊ณ , ์–ด๋А ํ˜‘๋ ฅ์— ์ฐธ์—ฌํ•˜๋А๋ƒ์— ๋”ฐ๋ผ ํ•ด๋‹น ํ˜‘๋ ฅ๊ณผ ๊ด€๋ จํ•œ ์ธํ„ฐํŽ˜์ด์Šค๋กœ ์—…์บ์ŠคํŒ…๋˜๋ฉด ํ•ด๋‹น ์ธํ„ฐํŽ˜์ด์Šค์˜ ์—ญํ• ๋งŒ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค. ## 04. ์„ค๊ณ„ ํ’ˆ์งˆ๊ณผ ํŠธ๋ ˆ์ด๋“œ ์˜คํ”„ - **์บก์Аํ™”๋ฅผ ์ผ๋ถ€ ํ•˜๋”๋ผ๋„ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํ†ตํ•ด ์ƒˆ์–ด๋‚˜๊ฐ€๋Š” ์„ธ๋ถ€์‚ฌํ•ญ์ด ์—ฌ์ „ํžˆ ๋‚จ์•„์žˆ์„ ์ˆ˜ ์žˆ๋‹ค.** ### p97 #### ๊ฐ์ฒด์ง€ํ–ฅ ์„ค๊ณ„๋ž€? >์˜ฌ๋ฐ”๋ฅธ ๊ฐ์ฒด์—๊ฒŒ ์˜ฌ๋ฐ”๋ฅธ ์ฑ…์ž„์„ ํ• ๋‹นํ•˜๋ฉด์„œ ๋‚ฎ์€ ๊ฒฐํ•ฉ๋„์™€ ๋†’์€ ์‘์ง‘๋„๋ฅผ ๊ฐ€์ง„ ๊ตฌ์กฐ๋ฅผ ์ฐฝ์กฐํ•˜๋Š” ํ™œ๋™์ด๋‹ค. ### p98 #### ๋ฐ์ดํ„ฐ ์ค‘์‹ฌ ์„ค๊ณ„์˜ ์œ„ํ—˜์„ฑ >์ƒํƒœ๋ฅผ ๊ฐ์ฒด ๋ถ„ํ• ์˜ ์ค‘์‹ฌ์ถ•์œผ๋กœ ์‚ผ์œผ๋ฉด ๊ตฌํ˜„์— ๊ด€ํ•œ ์„ธ๋ถ€์‚ฌํ•ญ์ด ๊ฐ์ฒด์˜ ์ธํ„ฐํŽ˜์ด์Šค์— ์Šค๋ฉฐ๋“ค๊ฒŒ ๋˜์–ด ์บก์Аํ™”์˜ ์›์น™์ด ๋ฌด๋„ˆ์ง„๋‹ค. ๊ฒฐ๊ณผ์ ์œผ๋กœ ์ƒํƒœ ๋ณ€๊ฒฝ์€ ์ธํ„ฐํŽ˜์ด์Šค์˜ ๋ณ€๊ฒฝ์„ ์ดˆ๋ž˜ํ•˜๋ฉฐ ์ด ์ธํ„ฐํŽ˜์ด์Šค์— ์˜์กดํ•˜๋Š” ๋ชจ๋“  ๊ฐ์ฒด์—๊ฒŒ ๋ณ€๊ฒฝ์˜ ์˜ํ–ฅ์ด ํผ์ง€๊ฒŒ ๋œ๋‹ค. - 4์žฅ ๋‚ด์šฉ์—์„œ ๊ฐ€์žฅ ํฐ ๊นจ๋‹ฌ์Œ์„ ์–ป์€ ๋ถ€๋ถ„์ด๋‹ค. ### p109 #### ๊ฐ์ฒด์ง€ํ–ฅ์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ์›๋ฆฌ๋Š” ์บก์Аํ™” >๊ฐ์ฒด์ง€ํ–ฅ์—์„œ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ์›๋ฆฌ๋Š” ์บก์Аํ™”๋‹ค. > >๊ฐ์ฒด์ง€ํ–ฅ ์„ค๊ณ„์˜ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ์›๋ฆฌ๋Š” ๋ถˆ์•ˆ์ •ํ•œ ๊ตฌํ˜„ ์„ธ๋ถ€์‚ฌํ•ญ์„ ์•ˆ์ •์ ์ธ ์ธํ„ฐํŽ˜์ด์Šค ๋’ค๋กœ ์บก์Аํ™”ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. - ์ •๋ณด ๊ฐ์ถค๋„ ์บก์Аํ™”์— ํฌํ•จ๋œ๋‹ค๊ณ  ๋ณธ๋‹ค๋ฉด ํƒ€๋‹นํ•˜๋‹ค. >์‘์ง‘๋„, ๊ฒฐํ•ฉ๋„, ์ค‘๋ณต (๋ฐฉ์ง€) ์—ญ์‹œ ํ›Œ๋ฅญํ•œ ์ฝ”๋“œ๋ฅผ ๊ทœ์ •ํ•˜๋Š” ๋ฐ ํ•ต์‹ฌ์ ์ธ ํ’ˆ์งˆ์ธ ๊ฒƒ์ด ์‚ฌ์‹ค์ด์ง€๋งŒ ์บก์Аํ™”๋Š” ์šฐ๋ฆฌ๋ฅผ ์ข‹์€ ์ฝ”๋“œ๋กœ ์•ˆ๋‚ดํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ€์žฅ ์ค‘์š”ํ•œ ์ œ1์›๋ฆฌ๋‹ค. - ์บก์Аํ™”๋ฅผ ์ž˜ ํ•˜๋ฉด ์‘์ง‘๋„๋ฅผ ๋†’์•„์งˆ ์ˆ˜ ์žˆ๊ณ  ๊ฒฐํ•ฉ๋„๊ฐ€ ๋‚ฎ์•„์งˆ ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ ๊ฐ€์žฅ ์ค‘์š”ํ•œ ์›๋ฆฌ๋Š” ์บก์Аํ™”๋ผ๋Š” ๋ง์ด ์ •๋ง ๋งž๋Š” ๊ฒƒ ๊ฐ™๋‹ค. ### p110 - p111 #### ์‘์ง‘๋„ >๋ชจ๋“ˆ ๋‚ด์˜ ์š”์†Œ๋“ค์ด ํ•˜๋‚˜์˜ ๋ชฉ์ ์„ ์œ„ํ•ด ๊ธด๋ฐ€ํ•˜๊ฒŒ ํ˜‘๋ ฅํ•œ๋‹ค๋ฉด ๊ทธ ๋ชจ๋“ˆ์€ ์˜พ์€ ์‘์ง‘๋„๋ฅผ ๊ฐ€์ง„๋‹ค. > >์‘์ง‘๋„๊ฐ€ ๋‚ฎ์€ ์„ค๊ณ„์—์„œ๋Š” ํ•˜๋‚˜์˜ ์›์ธ์— ์˜ํ•ด ๋ณ€๊ฒฝํ•ด์•ผ ํ•˜๋Š” ๋ถ€๋ถ„์ด ๋‹ค์ˆ˜์˜ ๋ชจ๋“ˆ์— ๋ถ„์‚ฐ๋ผ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์—ฌ๋Ÿฌ ๋ชจ๋“ˆ์„ ๋™์‹œ์— ์ˆ˜์ •ํ•ด์•ผ ํ•œ๋‹ค. - ์‘์ง‘๋„ ์ €ํ•˜๋Š” ๋‘ ๊ฐ€์ง€ ์ƒํ™ฉ์—์„œ ๋ฐœ์ƒํ•œ๋‹ค. ํ•˜๋‚˜์˜ ๊ฐ์ฒด๊ฐ€ ์—ฌ๋Ÿฌ ์ฑ…์ž„์„ ๊ฐ€์ง€๊ณ  ์žˆ์„ ๋•Œ, ํ•˜๋‚˜์˜ ์ฑ…์ž„์ด ์—ฌ๋Ÿฌ ๊ฐ์ฒด์— ๋ถ„์‚ฐ๋ผ ์žˆ์„ ๋•Œ. - ๋ชจ๋“ˆ ๋‚ด์˜ ์š”์†Œ ์ค‘์— ๊ธด๋ฐ€ํ•˜๊ฒŒ ํ˜‘๋ ฅํ•˜์ง€ ์•Š๋Š” ๊ฒƒ์ด ์žˆ๋‹ค๋ฉด ์‘์ง‘๋„๊ฐ€ ๋‚ฎ์•„์ง€๋ฉฐ, ์ด๋“ค์€ ์ž˜๋ชป๋œ ๋ชจ๋“ˆ ์•ˆ์— ์ž๋ฆฌ์žก๊ณ  ์žˆ์„ ๊ฐ€๋Šฅ์„ฑ์ด ํฌ๋ฉฐ ๋ถ„๋ฆฌํ•ด์•ผํ•  ์œ ๋ ฅํ•œ ํ›„๋ณด๋‹ค. - ์‘์ง‘๋„๋Š” ํ•˜๋‚˜์˜ ๋ชจ๋“ˆ๋งŒ ๊ฐ€์ง€๊ณ ๋„ ์ธก์ •์ด ๊ฐ€๋Šฅํ•œ ์„ค๊ณ„ ํ’ˆ์งˆ์ด๋‹ค. - ํ•˜๋‚˜์˜ ๋ณ€๊ฒฝ์„ ๋ฐ˜์˜ํ•˜๊ธฐ ์œ„ํ•ด ์—ฌ๋Ÿฌ ๋ชจ๋“ˆ์„ ๋ณ€๊ฒฝํ•ด์•ผ ํ•œ๋‹ค๋Š” ๊ฒƒ์€ ํ•˜๋‚˜์˜ ์ฑ…์ž„์ด ์—ฌ๋Ÿฌ ๊ณณ์— ๋ถ„์‚ฐ๋ผ ์žˆ์Œ์„ ์˜๋ฏธํ•˜๋ฉฐ ์‘์ง‘๋„๊ฐ€ ๋‚ฎ๋‹ค. #### ๊ฒฐํ•ฉ๋„ >์–ด๋–ค ๋ชจ๋“ˆ์ด ๋‹ค๋ฅธ ๋ชจ๋“ˆ์— ๋Œ€ํ•ด ๋„ˆ๋ฌด ์ž์„ธํ•œ ๋ถ€๋ถ„๊นŒ์ง€ ์•Œ๊ณ  ์žˆ๋‹ค๋ฉด ๋‘ ๋ชจ๋“ˆ์€ ๋†’์€ ๊ฒฐํ•ฉ๋„๋ฅผ ๊ฐ€์ง„๋‹ค. - '๋„ˆ๋ฌด ์ž์„ธํ•œ'์ด๋ผ๋Š” ๋ง์ด ์กฐ๊ธˆ ๋ชจํ˜ธํ•˜๋‹ค. - TODO ๊ฒฐํ•ฉ๋„์˜ ์ •์˜๋ฅผ ์ฐพ์•„๋ณด์ž. - ๊ฒฐํ•ฉ๋„๋Š” ํ•˜๋‚˜์˜ ๋ชจ๋“ˆ๋งŒ ๊ฐ€์ง€๊ณ ๋Š” ์ธก์ •์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๊ณ  ํ˜‘๋ ฅ๋ง ์ฐจ์›์—์„œ ์ธก์ •์ด ๊ฐ€๋Šฅํ•œ ์„ค๊ณ„ ํ’ˆ์งˆ์ด๋‹ค. >๊ฒฐํ•ฉ๋„๋Š” ํ•˜๋‚˜์˜ ๋ชจ๋“ˆ์„ ์ˆ˜์ •ํ•  ๋•Œ ์–ผ๋งˆ๋‚˜ ๋งŽ์€ ๋ชจ๋“ˆ์„ ํ•จ๊ป˜ ์ˆ˜์ •ํ•ด์•ผ ํ•˜๋Š”์ง€๋ฅผ ๋‚˜ํƒ€๋‚ธ๋‹ค. - ์ด๊ฑด ์‘์ง‘๋„์™€ ํ‘œ๋ฉด์ ์œผ๋กœ๋Š” ๊ฒน์น˜๋Š” ์„ค๋ช…์ด๋‹ค. ๋‹ค๋งŒ **์‘์ง‘๋„๋Š” ๋ณ€๊ฒฝ ์ž์ฒด์˜ ๋ณธ์งˆ์ ์ธ ์ˆ˜์šฉ์„ ์œ„ํ•ด ๋™์‹œ์— ํ•จ๊ป˜ ์ˆ˜์ •ํ•ด์•ผ ํ•˜๋Š” ๋ชจ๋“ˆ์˜ ์–‘์— ๋Œ€ํ•œ ์–˜๊ธฐ๊ณ , ๊ฒฐํ•ฉ๋„๋Š” ๋ณ€๊ฒฝ์˜ ๋ณธ์งˆ์ ์ธ ๋ฐ˜์˜ ์ดํ›„์— ํŒŒ์ƒ์ ์œผ๋กœ ์ˆ˜์ •๋ผ์•ผ ํ•˜๋Š” ๋ชจ๋“ˆ์˜ ์–‘์— ๋Œ€ํ•œ ์–˜๊ธฐ๋‹ค.** - ์ด ์„ค๋ช…์€ ์ผ๋ฐ˜ํ™”ํ•˜๊ธฐ์—๋Š” ์•ฝ์ ์ด ์žˆ๋‹ค. A๊ฐ€ ๋‚ด๋ถ€ ๊ตฌํ˜„์„ ๋“œ๋Ÿฌ๋‚ด๋Š” ์‹์œผ๋กœ ๋งŒ๋“ค์–ด์ ธ ์žˆ๋‹ค๊ณ  ํ•˜์ž. ๊ทธ๋Ÿฐ๋ฐ ๋น„์ฆˆ๋‹ˆ์Šค ์ปจํ…์ŠคํŠธ์— ๋”ฐ๋ผ ์ด A์— ์˜์กดํ•˜๋Š” ๋ชจ๋“ˆ์ด ํ•˜๋‚˜์ผ ์ˆ˜๋„ ์žˆ๊ณ  ์—ฌ๋Ÿฟ์ผ ์ˆ˜๋„ ์žˆ๋‹ค. ์—ฌ๋Ÿฟ์ด ์˜์กดํ•  ๋•Œ๋Š” ๊ฒฐํ•ฉ๋„๊ฐ€ ๋†’์ง€๋งŒ, ํ•˜๋‚˜๋งŒ ์˜์กดํ•  ๋•Œ๋Š” ํŒŒ์ƒ์ ์œผ๋กœ ๋ณ€๊ฒฝ๋ผ์•ผ ํ•˜๋Š” ๊ฒƒ์ด ํ•˜๋‚˜ ๋ฐ–์— ์—†์œผ๋ฏ€๋กœ ๊ฒฐํ•ฉ๋„๊ฐ€ ๋‚ฎ๋‹ค๊ณ  ํ•  ์ˆ˜ ์žˆ์„๊นŒ? ### p113 #### getter, setter ์‚ฌ์šฉ์„ ์บก์Аํ™”๋ผ๊ณ  ๋ณผ ์ˆ˜ ์—†๋Š” ์ด์œ  >์•ˆํƒ€๊น๊ฒŒ๋„ ์ ‘๊ทผ์ž์™€ ์ˆ˜์ •์ž ๋ฉ”์„œ๋“œ๋Š” ๊ฐ์ฒด ๋‚ด๋ถ€์˜ ์ƒํƒœ์— ๋Œ€ํ•œ ์–ด๋–ค ์ •๋ณด๋„ ์บก์Аํ™”ํ•˜์ง€ ๋ชปํ•œ๋‹ค. getFee ๋ฉ”์„œ๋“œ์™€ setFee ๋ฉ”์„œ๋“œ๋Š” Movie ๋‚ด๋ถ€์— Money ํƒ€์ž…์˜ fee๋ผ๋Š” ์ด๋ฆ„์˜ ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๊ฐ€ ์กด์žฌํ•œ๋‹ค๋Š” ์‚ฌ์‹ค์„ ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค์— ๋…ธ๊ณจ์ ์œผ๋กœ ๋“œ๋Ÿฌ๋‚ธ๋‹ค. ### p115 #### ๋ฐ์ดํ„ฐ ์ค‘์‹ฌ ์„ค๊ณ„์˜ ์œ„ํ—˜์„ฑ >์—ฌ๋Ÿฌ ๋ฐ์ดํ„ฐ ๊ฐ์ฒด๋“ค์„ ์‚ฌ์šฉํ•˜๋Š” ์ œ์–ด ๋กœ์ง์ด ํŠน์ • ๊ฐ์ฒด ์•ˆ์— ์ง‘์ค‘๋˜๊ธฐ ๋•Œ๋ฌธ์— ํ•˜๋‚˜์˜ ์ œ์–ด ๊ฐ์ฒด๊ฐ€ ๋‹ค์ˆ˜์˜ ๋ฐ์ดํ„ฐ ๊ฐ์ฒด์— ๊ฐ•ํ•˜๊ฒŒ ๊ฒฐํ•ฉ๋œ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. ์ด ๊ฒฐํ•ฉ๋„๋กœ ์ธํ•ด ์–ด๋–ค ๋ฐ์ดํ„ฐ ๊ฐ์ฒด๋ฅผ ๋ณ€๊ฒฝํ•˜๋”๋ผ๋„ ์ œ์–ด ๊ฐ์ฒด๋ฅผ ํ•จ๊ป˜ ๋ณ€๊ฒฝํ•  ์ˆ˜ ๋ฐ–์— ์—†๋‹ค. - ๋ฐ์ดํ„ฐ ์ค‘์‹ฌ ์„ค๊ณ„๋Š” ํŒ๋ณ„ ๋กœ์ง์„ ์บก์Аํ™”ํ•˜์ง€ ์•Š์œผ๋ฉด์„œ ์ž์œจ์„ฑ์„ ํ•ด์น˜๊ณ , ํŒ๋ณ„์— ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ๋…ธ์ถœํ•จ์œผ๋กœ์จ ํŒ๋ณ„ ๋กœ์ง์ด ์—ฌ๋Ÿฌ ๊ณณ์— ์ค‘๋ณต๋˜์–ด ๋ถ„์‚ฐ๋  ์ˆ˜ ์žˆ๊ณ , ์—ฌ๋Ÿฌ ๊ฐ์ฒด์˜ ํŒ๋ณ„ ๋กœ์ง์„ ํ•œ ๋ชธ์— ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ์ œ์–ด ๊ฐ์ฒด๋ฅผ ๋งŒ๋“ค์–ด๋‚ผ ๊ฐ€๋Šฅ์„ฑ์ด ๋†’๋‹ค. ### p126 - p127 #### ์ž์œจ์„ฑ์„ ๋†’์—ฌ๋„ ์—ฌ์ „ํžˆ ๋ถ€์กฑํ•œ ์บก์Аํ™” ๋ฌธ์ œ - **ํŒ๋ณ„ ๋กœ์ง์„ ๊ฐœ๋ณ„ ๊ฐ์ฒด ๋‚ด๋กœ ์บก์Аํ™”์‹œ์ผœ์„œ ์ž์œจ์„ฑ์„ ๋†’์ธ๋‹ค๊ณ  ํ•ด๋„ ์—ฌ์ „ํžˆ ์บก์Аํ™”๋Š” ๋ถ€์กฑํ•  ์ˆ˜ ์žˆ๋‹ค.** - ํŒ๋ณ„ ๋กœ์ง์„ ๊ฐ์ฒด ๋‚ด๋กœ ์บก์Аํ™”ํ•ด๋„ **์™ธ๋ถ€์— ๋…ธ์ถœํ•˜๋Š” ์ธํ„ฐํŽ˜์ด์Šค์˜ ์‹œ๊ทธ๋‹ˆ์ฒ˜๋ฅผ ํ†ตํ•ด ์—ฌ์ „ํžˆ ์„ธ๋ถ€ ๋‚ด์šฉ์ด ์ƒˆ์–ด๋‚˜๊ฐˆ ์ˆ˜ ์žˆ๋‹ค.** - ๋˜ํ•œ **๋…ธ์ถœ๋œ ์ธํ„ฐํŽ˜์ด์Šค ์ž์ฒด์˜ ์ถ”์ƒํ™”๊ฐ€ ๋ถ€์กฑํ•˜๋ฉด ์„ธ๋ถ€ ๋‚ด์šฉ์ด ์ƒˆ์–ด๋‚˜๊ฐˆ ์ˆ˜ ์žˆ๋‹ค.** ### p128 #### ์บก์Аํ™”์˜ ์ง„์ •ํ•œ ์˜๋ฏธ >(p126 - p127) ์˜ˆ์ œ๋Š” ์บก์Аํ™”๊ฐ€ ๋‹จ์ˆœํžˆ ๊ฐ์ฒด ๋‚ด๋ถ€์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์™ธ๋ถ€๋กœ๋ถ€ํ„ฐ ๊ฐ์ถ”๋Š” ๊ฒƒ ์ด์ƒ์˜ ์˜๋ฏธ๋ฅผ ๊ฐ€์ง„๋‹ค๋Š” ๊ฒƒ์„ ์ž˜ ๋ณด์—ฌ์ค€๋‹ค. > >์บก์Аํ™”๋ž€ (๋ฐ์ดํ„ฐ๋ฟ ์•„๋‹ˆ๋ผ) ๋ณ€ํ•˜๋Š” ์–ด๋–ค ๊ฒƒ์ด๋“  ๊ฐ์ถ”๋Š” ๊ฒƒ์ด๋‹ค. - ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํ†ตํ•œ ๊ฐ„์ ‘์ ์ธ ์ •๋ณด ๋ˆ„์ถœ๋„ ๋ฐœ์ƒํ•˜์ง€ ์•Š๊ฒŒ ํ•ด์•ผ ์ง„์ •ํ•œ ์บก์Аํ™”๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์ด๋Š” ๋ณ€ํ•˜๋Š” ์–ด๋–ค ๊ฒƒ์ด๋“  ๊ฐ์ถฐ์•ผ๋งŒ ๊ฐ€๋Šฅํ•˜๋‹ค. ### p131 #### ๋ฐ์ดํ„ฐ ์ค‘์‹ฌ ์„ค๊ณ„์˜ ๋ฌธ์ œ์  >๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ์ž‘์—…๊ณผ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ™์€ ๊ฐ์ฒด ์•ˆ์— ๋‘๋”๋ผ๋„ ๋ฐ์ดํ„ฐ์— ์ดˆ์ ์ด ๋งž์ถฐ์ ธ ์žˆ๋‹ค๋ฉด ๋งŒ์กฑ์Šค๋Ÿฌ์šด ์บก์Аํ™”๋ฅผ ์–ป๊ธฐ ์–ด๋ ต๋‹ค. ๋ฐ์ดํ„ฐ๋ฅผ ๋จผ์ € ๊ฒฐ์ •ํ•˜๊ณ  ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ์˜คํผ๋ ˆ์ด์…˜์„ ๋‚˜์ค‘์— ๊ฒฐ์ •ํ•˜๋Š” ๋ฐฉ์‹์€ ๋ฐ์ดํ„ฐ์— ๊ด€ํ•œ ์ง€์‹์ด ๊ฐ์ฒด์˜ ์ธํ„ฐํŽ˜์ด์Šค์— ๊ณ ์Šค๋ž€์ด ๋“œ๋Ÿฌ๋‚˜๊ฒŒ ๋œ๋‹ค. - ์ง€๊ธˆ๊นŒ์ง€๋Š” ํŒ๋ณ„์— ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ์™€ ํŒ๋ณ„ ๋กœ์ง์„ ๊ฐ™์€ ๊ฐ์ฒด ์•ˆ์— ๋‘๋Š” ๊ฒƒ์œผ๋กœ ์บก์Аํ™”๊ฐ€ ๋œ๋‹ค๊ณ  ์ƒ๊ฐํ•ด์™”๊ณ , ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํ†ตํ•ด ์ •๋ณด๊ฐ€ ์ƒˆ์–ด๋‚˜๊ฐˆ ์ˆ˜ ์žˆ๋‹ค๋Š” ์ƒ๊ฐ์€ ๋ฏธ์ฒ˜ ๋ชป ํ–ˆ์—ˆ๋Š”๋ฐ ํฐ ๊นจ๋‹ฌ์Œ์„ ์–ป์—ˆ๋‹ค. ## 05. ์ฑ…์ž„ ํ• ๋‹นํ•˜๊ธฐ - ์ฑ…์ž„ ์ค‘์‹ฌ ์„ค๊ณ„ - ๋„๋ฉ”์ธ ์ „๋ฌธ๊ฐ€์™€ ์ดˆ๊ธฐ ๋„๋ฉ”์ธ ๊ฐœ๋…, ๋„๋ฉ”์ธ ๋ชจ๋ธ์„ ๋„์ถœํ•˜๊ณ , - ๋„๋ฉ”์ธ ๋ชจ๋ธ์„ ํ† ๋Œ€๋กœ ํ˜‘๋ ฅ ๊ตฌ์กฐ์™€ ๋ฉ”์‹œ์ง€๋ฅผ ๋„์ถœ, - ๋ฉ”์‹œ์ง€์— ๋”ฐ๋ผ ๊ฐ์ฒด๋ฅผ ์„ ํƒ. ์ด ๋•Œ ๋„๋ฉ”์ธ ๊ฐœ๋…์ด ๊ฐ์ฒด ํ›„๋ณด - ์„ค๊ณ„์™€ ๊ตฌํ˜„์€ ์„œ๋กœ ํ”ผ๋“œ๋ฐฑ - ๋„๋ฉ”์ธ ๋ชจ๋ธ์—์„œ ์ดˆ๊ธฐ ์„ค๊ณ„๊ฐ€ ๋‚˜์˜ค๊ณ , - ์ดˆ๊ธฐ ์„ค๊ณ„๋Š” ๊ตฌํ˜„์„ ํ†ตํ•ด ๊ฒ€์ฆ๋˜๋ฉฐ, - ๊ตฌํ˜„ ๊ฒฐ๊ณผ๊ฐ€ ๋„๋ฉ”์ธ ๋ชจ๋ธ์˜ ๊ฐœ์„ ์„ ์œ ๋„ํ•  ์ˆ˜ ์žˆ๋‹ค. - ์ถ”์ƒํ™”๊ฐ€ ์ž˜ ๋œ public ๋ฉ”์„œ๋“œ๋Š” ์ƒ์œ„ ์ˆ˜์ค€์˜ ๋ช…์„ธ๋ฅผ ์ฝ๋Š” ๋А๋‚Œ - ์ด๋ฆ„์ด ์ž˜ ์ง€์–ด์ง„ ์ž‘์€ ๋ฉ”์„œ๋“œ๋Š” ์ฃผ์„์„ ์ฝ๋Š” ๋А๋‚Œ - ์ž‘์€ ๋ฉ”์„œ๋“œ์˜ ์žฅ์  - ์ฝ”๋“œ ์ž์ฒด๊ฐ€ ์ฃผ์„ ์—ญํ•  - ํ•˜๋‚˜์˜ ์ฑ…์ž„๋งŒ ๊ฐ€์ง€๋ฏ€๋กœ ์žฌ์‚ฌ์šฉ๊ณผ ์ด๋™(๋ฆฌํŒฉํ„ฐ๋ง)์ด ์‰ฝ๋‹คใ… ### p135 #### ํ˜‘๋ ฅ์— ์ ํ•ฉํ•œ ์ฑ…์ž„์ด๋ž€ >ํ˜‘๋ ฅ์„ ์‹œ์ž‘ํ•˜๋Š” ์ฃผ์ฒด๋Š” ๋ฉ”์‹œ์ง€ ์ „์†ก์ž์ด๊ธฐ ๋•Œ๋ฌธ์— ํ˜‘๋ ฅ์— ์ ํ•ฉํ•œ ์ฑ…์ž„์ด๋ž€ ๋ฉ”์‹œ์ง€ ์ˆ˜์‹ ์ž๊ฐ€ ์•„๋‹ˆ๋ผ ๋ฉ”์‹œ์ง€ ์ „์†ก์ž์—๊ฒŒ ์ ํ•ฉํ•œ ์ฑ…์ž„์„ ์˜๋ฏธํ•œ๋‹ค. > >๊ฐ์ฒด๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฉ”์‹œ์ง€๋ฅผ ๋ณด๋‚ด๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค. ๋ฉ”์‹œ์ง€๋ฅผ ์ „์†กํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ์ฒด๋ฅผ ๊ฐ–๊ฒŒ ๋œ ๊ฒƒ์ด๋‹ค.[Metz12] - ๋ฉ”์‹œ์ง€ ์ „์†ก์ž๋„ ๊ฐ์ฒด์ด๋ฏ€๋กœ ๋ฉ”์‹œ์ง€๋ณด๋‹ค ๊ฐ์ฒด๊ฐ€ ๋จผ์ € ๊ฒฐ์ •๋ผ ์žˆ์–ด์•ผ ํ•˜๋Š” ๊ฑฐ ์•„๋‹Œ๊ฐ€ ํ•˜๋Š” ์ƒ๊ฐ๋„ ๋“ ๋‹ค. ์ตœ์ดˆ์˜ ๋ฉ”์‹œ์ง€ ์ „์†ก์ž๋Š” ์‚ฌ์‹ค ์‚ฌ์šฉ์ž๋กœ ์ด๋ฏธ ์ •ํ•ด์ ธ ์žˆ๋Š” ์…ˆ์ด๋‹ค. ### p137 #### GRASP - By Craig Larman - General Responsibility Assignment Software Pattern #### ๋„๋ฉ”์ธ ๊ฐœ๋…, ๊ฐ์ฒด์˜ ํ›„๋ณด >์–ด๋–ค ์ฑ…์ž„์„ ํ• ๋‹นํ•  ๋•Œ ๊ฐ€์žฅ ๋จผ์ € ๊ณ ๋ฏผํ•ด์•ผ ํ•˜๋Š” ์œ ๋ ฅํ•œ ํ›„๋ณด๋Š” ๋ฐ”๋กœ ๋„๋ฉ”์ธ ๊ฐœ๋…์ด๋‹ค. - ๊ทธ๋Ÿผ ๋„๋ฉ”์ธ ๊ฐœ๋…์€ ์–ด๋””์„œ ๋„์ถœ๋˜๋Š”๊ฐ€? ์ „ํ†ต์ ์ธ ์„ค๊ณ„์—์„œ ์š”๊ตฌ์‚ฌํ•ญ ๊ธฐ์ˆ ์„œ์— ๋ช…์‚ฌ๋กœ ํ‘œํ˜„๋ผ ์žˆ๋Š” ๊ฒƒ๋“ค์ด ๋„๋ฉ”์ธ ๊ฐœ๋…์— ํ•ด๋‹นํ•œ๋‹ค. - ํ•˜์ง€๋งŒ ์—ฌ๊ธฐ์„œ ์ฃผ์˜ํ•  ์ ์ด ์žˆ๋‹ค. **๋„๋ฉ”์ธ ๊ฐœ๋…์ด ๋„์ถœ๋˜๋ฉด ๊ทธ ๊ฐœ๋…๊ณผ ๊ด€๋ จ ์ง€์„ ์ˆ˜ ์žˆ๋Š” ์†์„ฑ ํ›„๋ณด๋ฅผ ๋„์ถœํ•˜๋Š” ๊ฒŒ ๋” ์‰ฝ๊ณ  ์ž์—ฐ์Šค๋Ÿฝ๊ธฐ ๋•Œ๋ฌธ์— ๋ฐ์ดํ„ฐ ์ค‘์‹ฌ ์„ค๊ณ„๋กœ ํ๋ฅผ ์œ„ํ—˜์ด ์žˆ๋‹ค.** - ๋„๋ฉ”์ธ ๊ฐœ๋…์ด ๋„์ถœ๋˜๋ฉด ์†์„ฑ ํ›„๋ณด๋„ ํ•จ๊ป˜ ๋– ์˜ค๋ฅด๊ธฐ ๋งˆ๋ จ์ด์ง€๋งŒ ์ž ์‹œ ์ ‘์–ด๋‘๊ณ  ํ˜‘๋ ฅ๊ณผ ๋ฉ”์„ธ์ง€ ์„ค๊ณ„๋ฅผ ์‹œ์ž‘ํ•ด์•ผ ํ•œ๋‹ค. **์ด ์‹œ์ ์—์„œ ๋– ์˜ค๋ฅด๋Š” ์†์„ฑ ํ›„๋ณด๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ์ฒ˜๋ฆฌํ•  ์ •๋ณด ์ „๋ฌธ๊ฐ€๋ฅผ ์„ ํƒํ•˜๋Š” ๊ธฐ์ค€์œผ๋กœ๋งŒ ์‚ฌ์šฉํ•œ๋‹ค.** ### p143 - ์ž˜ ์ดํ•ด๊ฐ€ ์•ˆ ๋˜๋Š” >๊ทธ๋ฆผ 5.1์˜ ๋„๋ฉ”์ธ ๊ฐœ๋…์„ ๋‹ค์‹œ ์‚ดํŽด๋ณด์ž. ๋„๋ฉ”์ธ ์ƒ์œผ๋กœ Movie๋Š” DiscountCondition์˜ ๋ชฉ๋ก์„ ์†์„ฑ์œผ๋กœ ํฌํ•จํ•˜๊ณ  ์žˆ๋‹ค. Movie์™€ DiscountCondition์€ ์ด๋ฏธ ๊ฒฐํ•ฉ๋ผ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— Movie๋ฅผ DiscountCondition๊ณผ ํ˜‘๋ ฅํ•˜๊ฒŒ ํ•˜๋ฉด ์„ค๊ณ„ ์ „์ฒด์ ์œผ๋กœ ๊ฒฐํ•ฉ๋„๋ฅผ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š๊ณ ๋„ ํ˜‘๋ ฅ์„ ์™„์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค. - ์• ์ดˆ์— ์™œ Movie๊ฐ€ DiscountCondition์˜ ๋ชฉ๋ก์„ ์†์„ฑ์œผ๋กœ ํฌํ•จํ•˜๋„๋ก ๊ฒฐ์ •๋๋Š”๊ฐ€? ๋ผ๋Š” ์˜๋ฌธ์ด ๋– ์˜ค๋ฅด๋Š”๋ฐ, ์ด๋Š” ๋„๋ฉ”์ธ ์ „๋ฌธ๊ฐ€์™€ ํ•จ๊ป˜ ๋„์ถœํ•œ ๊ฐœ๋…์ด๋ฏ€๋กœ ์ผ๋‹จ ๋งž๋‹ค๊ณ  ๊ฐ€์ •ํ•˜๊ณ  ๊ฐ€๋Š” ๊ฑธ๋กœ ์ดํ•ดํ•˜๊ณ  ๋„˜์–ด๊ฐ€์ž. #### Low Coupling ํŒจํ„ด - (๋„๋ฉ”์ธ ์ „๋ฌธ๊ฐ€์™€ ํ•จ๊ป˜ ๋„์ถœํ•œ ๋„๋ฉ”์ธ ๊ฐœ๋…์„ ํ† ๋Œ€๋กœ) ๊ฒฐํ•ฉ๋„๋ฅผ ์ฆ๊ฐ€์‹œํ‚ค์ง€ ์•Š๋Š” ์ชฝ์œผ๋กœ ํ˜‘๋ ฅ ๊ด€๊ณ„๋ฅผ ์„ค๊ณ„ํ•˜์ž. ### p144 #### High Cohesion ํŒจํ„ด - (๋„๋ฉ”์ธ ์ „๋ฌธ๊ฐ€์™€ ํ•จ๊ป˜ ๋„์ถœํ•œ ๋„๋ฉ”์ธ ๊ฐœ๋…์„ ํ† ๋Œ€๋กœ) ์‘์ง‘๋„๋ฅผ ๋†’์ด๋Š” ์ชฝ์œผ๋กœ ํ˜‘๋ ฅ ๊ด€๊ณ„๋ฅผ ์„ค๊ณ„ํ•˜์ž. ### p145 #### Creator ํŒจํ„ด - ์–ด๋–ค ๊ฐ์ฒด A์˜ ์ƒ์„ฑ ์ฑ…์ž„์€ ๋‹ค์Œ ์กฐ๊ฑด์„ ์ตœ๋Œ€ํ•œ ๋งŒ์กฑํ•˜๋Š” ๊ฐ์ฒด์—๊ฒŒ ํ• ๋‹นํ•œ๋‹ค. - A๋ฅผ ์ฐธ์กฐํ•˜๊ฑฐ๋‚˜ ํฌํ•จํ•˜๋Š” ๊ฐ์ฒด - A๋ฅผ ๊ธฐ๋กํ•˜๋Š” ๊ฐ์ฒด - A๋ฅผ ๊ธด๋ฐ€ํ•˜๊ฒŒ ์‚ฌ์šฉํ•˜๋Š” ๊ฐ์ฒด - A๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๊ฐ์ฒด - ์œ„์™€ ๊ฐ™์€ ์กฐ๊ฑด์„ ๋งŒ์กฑํ•˜๋Š” ๊ฐ์ฒด๋Š” ๋„๋ฉ”์ธ ๊ฐœ๋… ์ƒ์œผ๋กœ๋„ ์ด๋ฏธ A์™€ ๊ฒฐํ•ฉ๋ผ ์žˆ์„ ๊ฐ€๋Šฅ์„ฑ์ด ๋†’์œผ๋ฏ€๋กœ, ์ด ๊ฐ์ฒด๊ฐ€ A๋ฅผ ์ƒ์„ฑํ•˜๊ฒŒ ํ•˜๋ฉด ๊ฒฐํ•ฉ๋„๋ฅผ ์ถ”๊ฐ€๋กœ ๋†’์ด์ง€ ์•Š๋Š”๋‹ค๋Š” ๊ด€์ ์—์„œ๋Š” Low Coupling ํŒจํ„ด์˜ ํ•œ ํ˜•ํƒœ๋ผ๊ณ  ๋ณผ ์ˆ˜๋„ ์žˆ๊ฒ ๋‹ค. #### ์Šค์ผ€์น˜์™€ ์„ค๊ณ„ >ํ˜„์žฌ๊นŒ์ง€์˜ ์ฑ…์ž„ ๋ถ„๋ฐฐ๋Š” ์„ค๊ณ„๋ฅผ ์‹œ์ž‘ํ•˜๊ธฐ ์œ„ํ•œ ๋Œ€๋žต์ ์ธ ์Šค์ผ€์น˜์— ๋ถˆ๊ณผํ•˜๋‹ค. **์‹ค์ œ ์„ค๊ณ„๋Š” ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ๋™์•ˆ ์ด๋ค„์ง„๋‹ค. ๊ทธ๋ฆฌ๊ณ  ํ˜‘๋ ฅ๊ณผ ์ฑ…์ž„์ด ์ œ๋Œ€๋กœ ๋™์ž‘ํ•˜๋Š”์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋Š” ์œ ์ผํ•œ ๋ฐฉ๋ฒ•์€ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  ์‹คํ–‰ํ•ด ๋ณด๋Š” ๊ฒƒ ๋ฟ์ด๋‹ค.** - ์„ค๊ณ„๋Š” ๊ตฌํ˜„์œผ๋กœ ๊ฒ€์ฆํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ, ์„ค๊ณ„์™€ ๊ตฌํ˜„์ด ๋ช…ํ™•ํ•˜๊ฒŒ ๋ถ„๋ฆฌ๋  ์ˆ˜ ์—†๋Š” ์ด์œ ์ด๋ฉฐ, ์„ค๊ณ„์™€ ๊ตฌํ˜„์„ Iterativeํ•˜๊ฒŒ ์ง„ํ–‰ํ•ด์•ผ ํ•˜๋Š” ๊ทผ๊ฑฐ ### p146 #### ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜ ๊ฒฐ์ • - ์ฑ…์ž„์„ ์™„์ˆ˜ํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ์ •๋ณด - '์˜ํ™” ์˜ˆ๋งค'๋ผ๋Š” ์ฑ…์ž„์„ ๊ฐ€์ง„ '์ƒ์˜ ์˜ํ™”' ๊ฐ์ฒด๊ฐ€ ์ฑ…์ž„์„ ์™„์ˆ˜ํ•˜๋Š”๋ฐ ํ•„์š”ํ•œ ์˜ํ™”, ์ƒ์˜๊ด€, ํšŒ์ฐจ ๋“ฑ - '์ƒ์˜ ์˜ํ™”' ๊ฐ์ฒด๋ฅผ ์„ค๋ช…ํ•˜๋Š” ์ •๋ณด ๋ผ๊ณ  ๋ณผ ์ˆ˜๋„ ์žˆ์ง€๋งŒ, ์ฑ…์ž„ ์ค‘์‹ฌ์œผ๋กœ ๋ฐ”๋ผ๋ณด์ž. - ์ฑ…์ž„์˜ ์ผ๋ถ€๋ฅผ ์œ„์ž„๋ฐ›์„ ๊ฐ์ฒด - ๊ด€๋žŒ๋ฃŒ ๊ณ„์‚ฐ์„ ์œ„ํ•จ๋ฐ›์„ ์˜ํ™” ๊ฐ์ฒด ### p147 #### ๋ฉ”์„œ๋“œ ์‹œ๊ทธ๋‹ˆ์ฒ˜ ๊ฒฐ์ • - ๋ฉ”์‹œ์ง€๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์ฑ…์ž„์˜ ์ผ๋ถ€๋ฅผ ์œ„์ž„๋ฐ›์„ ๊ฐ์ฒด์— ๋Œ€ํ•œ ์ถฉ๋ถ„ํ•œ ์‚ฌ์ „ ์ •๋ณด ์—†๋Š” ์ƒํƒœ์—์„œ ์œ„์ž„๋ฐ›๋Š” ๊ฐ์ฒด์˜ ๋ฉ”์„œ๋“œ ์‹œ๊ทธ๋‹ˆ์ฒ˜ ๊ฒฐ์ • ### p152 #### ๋ณ€๊ฒฝ์˜ ์ด์œ ๊ฐ€ ์—ฌ๋Ÿฌ๊ฐ€์ง€์ธ ์ €์‘์ง‘๋„ ๊ฐ์ฒด ํ›„๋ณด - ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๊ฐ€ ํ•œ ๊บผ๋ฒˆ์— ์ดˆ๊ธฐํ™”๋˜์ง€ ์•Š๊ณ  ์ดˆ๊ธฐํ™”๋˜๋Š” ์‹œ์ ์ด ๋‹ค๋ฅธ ๊ฐ์ฒด - ๋ชจ๋“  ๋ฉ”์„œ๋“œ๊ฐ€ ๋ชจ๋“  ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๋ฅผ ๊ณ ๋ฃจ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ์ผ๋ถ€ ๋ฉ”์„œ๋“œ๋Š” ์ผ๋ถ€ ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๋งŒ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฐ์ฒด - ์ˆœ๋ฒˆ ์กฐ๊ฑด๊ณผ ๊ธฐ๊ฐ„ ์กฐ๊ฑด์„ ํ•œ ๋ชธ์— ๊ฐ€์ง€๊ณ  ์žˆ๋Š” DiscountCondition ### p155 #### ๋‹จ์ˆœํ•œ ํด๋ž˜์Šค ๋ถ„๋ฆฌ๋Š” ๊ฒฐํ•ฉ๋„ ์ฆ๊ฐ€๋กœ ์ด์–ด์งˆ ์ˆ˜ ์žˆ๋‹ค. - ์ˆœ๋ฒˆ ์กฐ๊ฑด๊ณผ ๊ธฐ๊ฐ„ ์กฐ๊ฑด์œผ๋กœ ๋‚˜๋ˆ ์„œ ๊ฐ๊ฐ SequenceCondition๊ณผ PeriodCondition ๊ฐ์ฒด๋กœ ๋‚˜๋ˆ„๋ฉด ์‘์ง‘๋„๋Š” ๋†’์•„์กŒ์ง€๋งŒ, - Movie๋Š” ๊ธฐ์กด์—๋Š” DiscountCondition ํ•˜๋‚˜์—๋งŒ ์˜์กดํ•˜๋‹ค๊ฐ€ ์ด์ œ๋Š” SequenceCondition, PeriodCondition ๋‘ ๊ฐœ์— ์˜์กดํ•˜๊ฒŒ ๋˜๋ฏ€๋กœ ๊ฒฐํ•ฉ๋„๊ฐ€ ์ฆ๊ฐ€ํ–ˆ๋‹ค. - ๋˜ํ•œ ์ƒˆ๋กœ์šด ํ• ์ธ ์กฐ๊ฑด์ด ์ถ”๊ฐ€๋œ๋‹ค๋ฉด Movie์™€ ํ• ์ธ ์กฐ๊ฑด ๊ฐ„์˜ ๊ฒฐํ•ฉ๋„๋Š” ๊ณ„์† ์ฆ๊ฐ€ํ•œ๋‹ค. ### p158 #### Polymorphism ํŒจํ„ด - ๊ฐ์ฒด์˜ ๊ตฌ์ฒด ํƒ€์ž…์„ ๊ฒ€์‚ฌํ•˜๋Š” ์กฐ๊ฑด๋ฌธ ๋Œ€์‹  ๋™์ผํ•œ ๋ฉ”์‹œ์ง€์—๋„ ๊ตฌ์ฒด ํƒ€์ž…์— ๋”ฐ๋ผ ๋‹ค๋ฅด๊ฒŒ ๋™์ž‘ํ•˜๋Š” ๋‹คํ˜•์„ฑ์„ ์ด์šฉํ•˜์ž. - ํ• ์ธ ์กฐ๊ฑด ๋งŒ์กฑ ์—ฌ๋ถ€๋ฅผ SequenceCondition๊ณผ PeriodCondition์˜ ํƒ€์ž…์„ ๊ฒ€์‚ฌํ•ด์„œ ๋ถ„๊ธฐํ•˜๋Š” ๋Œ€์‹ ์—, ํ• ์ธ ์กฐ๊ฑด ๋งŒ์กฑ ์—ฌ๋ถ€๋ผ๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ์—ญํ• (ํ•˜๋‚˜์˜ ํด๋ž˜์Šค๋‚˜ interface)์„ ์ •์˜ํ•˜๊ณ  ์ด ์—ญํ• ์„ ๊ฐ์ž์˜ ๋ฐฉ๋ฒ•์œผ๋กœ ์ˆ˜ํ–‰(์ƒ์†/๊ตฌํ˜„)ํ•  ์ˆ˜ ์žˆ๋Š” ๋‹คํ˜•์„ฑ์„ ์ด์šฉํ•˜๋ฉด, ๊ฐœ๋ณ„ ๊ฐ์ฒด๊ฐ€ ์•„๋‹ˆ๋ผ ํ•˜๋‚˜์˜ ์—ญํ• ์—๋งŒ ์˜์กดํ•˜๊ฒŒ ๋˜๋ฏ€๋กœ ๊ฒฐํ•ฉ๋„ ์ฆ๊ฐ€๋ฅผ ๋ง‰์„ ์ˆ˜ ์žˆ๋‹ค. ### p159 #### Protected Variations ํŒจํ„ด - ๋ณ€ํ•˜๋Š” ๋ถ€๋ถ„์„ ์บก์Аํ™”ํ•ด์„œ ๋ณ€ํ•˜์ง€ ์•Š์•„๋„ ๋˜๋Š” ๋ถ€๋ถ„์„ ๋ณดํ˜ธํ•˜์ž. - 'ํšŒ์ฐจ ํ• ์ธ ์กฐ๊ฑด', '๊ธฐ๊ฐ„ ํ• ์ธ ์กฐ๊ฑด'์€ ๋ณ€ํ•˜๋Š” ๋ถ€๋ถ„์ด๋ฉฐ, ์ด๋ฅผ 'ํ• ์ธ ์กฐ๊ฑด ๋งŒ์กฑ ์—ฌ๋ถ€ ํ™•์ธ' ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›๋Š” ํ•˜๋‚˜์˜ ์ถ”์ƒ ํƒ€์ž…์œผ๋กœ ๋ฌถ์–ด ์บก์Аํ™”ํ•˜๋ฉด ๊ฒฐํ•ฉ๋„ ์ฆ๊ฐ€๋ฅผ ๋ง‰๊ณ  ๋ณ€ํ•˜์ง€ ์•Š์•„๋„ ๋˜๋Š” ๋ถ€๋ถ„์˜ ๋ณ€๊ฒฝ์„ ์œ ๋ฐœํ•˜์ง€ ์•Š๊ฒŒ ๋œ๋‹ค. #### ๋น„์Šทํ•ด๋ณด์ด๋Š” ์œ„ ๋‘ ํŒจํ„ด์˜ ์ ์šฉ ๊ธฐ์ค€ >ํ•˜๋‚˜์˜ ํด๋ž˜์Šค๊ฐ€ ์—ฌ๋Ÿฌ ํƒ€์ž…์˜ ํ–‰๋™์„ ๊ตฌํ˜„ํ•˜๊ณ  ์žˆ๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ธ๋‹ค๋ฉด ํด๋ž˜์Šค๋ฅผ ๋ถ„ํ•ดํ•˜๊ณ  Polymorphism ํŒจํ„ด ์ ์šฉ > >์˜ˆ์ธก ๊ฐ€๋Šฅํ•œ ๋ณ€๊ฒฝ์œผ๋กœ ์ธํ•ด ์—ฌ๋Ÿฌ ํด๋ž˜์Šค๋“ค์ด ๋ถˆ์•ˆ์ •ํ•ด์ง„๋‹ค๋ฉด Protected Variations ํŒจํ„ด ์ ์šฉ - ๊ฒฐ๊ตญ ์ถ”์ƒํ™”๋ฅผ ํ†ตํ•ด ์บก์Аํ™”ํ•œ๋‹ค๋Š” ์ ์—์„œ๋Š” ๋‘ ํŒจํ„ด์ด ๊ฐ™๋‹ค. ### p160 #### ์ถ”์ƒ ํด๋ž˜์Šค์™€ interface - ํ•˜๋‚˜์˜ ์—ญํ• ์— ํ•ด๋‹นํ•œ๋‹ค๋Š” ์ ์—์„œ๋Š” ๊ฐ™๋‹ค. - ํ•˜์œ„ ํƒ€์ž…์— ๊ณต์œ ํ•ด์ค„ ๊ตฌํ˜„์ด ์žˆ๋‹ค๋ฉด ์ถ”์ƒ ํด๋ž˜์Šค, ๊ณต์œ ํ•ด์ค„ ๊ตฌํ˜„์ด ์—†๋‹ค๋ฉด interface ### p163 #### ๋„๋ฉ”์ธ ๊ตฌ์กฐ์™€ ์ฝ”๋“œ ๊ตฌ์กฐ - 1 >๋„๋ฉ”์ธ ๋ชจ๋ธ์€ ๋‹จ์ˆœํžˆ ์„ค๊ณ„์— ํ•„์š”ํ•œ ์šฉ์–ด๋ฅผ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์„ ๋„˜์–ด ์ฝ”๋“œ์˜ ๊ตฌ์กฐ์—๋„ ์˜ํ–ฅ์„ ๋ฏธ์นœ๋‹ค. - ๋„๋ฉ”์ธ ์ „๋ฌธ๊ฐ€์™€ ํ•จ๊ป˜ ๋„์ถœํ•œ ๋„๋ฉ”์ธ ๊ฐœ๋…์œผ๋กœ ์ด๋ฃจ์–ด์ง„ ๋„๋ฉ”์ธ ๋ชจ๋ธ์€ ์ ์ ˆํ•œ ์ฑ…์ž„ ํ• ๋‹น์˜ ๋ฐ”ํƒ•์ด ๋˜๊ณ , ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋Š” ๊ณณ์„ ์˜ˆ์ธกํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ฃผ๋ฏ€๋กœ ์ถ”์ƒํ™”์™€ ์บก์Аํ™”๋ฅผ ๋” ์‰ฝ๊ฒŒ ์ ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ค€๋‹ค. ### p164 #### ์ƒ์†๊ณผ ํ•ฉ์„ฑ - **๋Ÿฐํƒ€์ž„ ๊ต์ฒด๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋‹ค๋ฉด ํ•ฉ์„ฑ์„ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค.** - ์˜ํ™”๋ฅผ ์ƒ์†๋ฐ›์€ '๊ธˆ์•ก ํ• ์ธ ์˜ํ™”'์™€ '๋น„์œจ ํ• ์ธ ์˜ํ™”'๊ฐ€ ์žˆ์„ ๋•Œ '๊ธˆ์•ก ํ• ์ธ ์˜ํ™”' ๊ฐ์ฒด๋ฅผ '๋น„์œจ ํ• ์ธ ์˜ํ™”'๋กœ ๊ต์ฒดํ•ด์•ผ ํ•œ๋‹ค๋ฉด? - '๋น„์œจ ํ• ์ธ ์˜ํ™”'์ฒ˜๋Ÿผ ๋™์ž‘ํ•˜๊ฒŒ ํ•˜๋ ค๋ฉด ๋น„์œจ ํ• ์ธ ์˜ํ™” ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒˆ๋กœ ์ƒ์„ฑํ•˜๊ณ  ํ•„์š”ํ•œ ์ •๋ณด(์˜ํ™”, ์ƒ์˜์‹œ๊ฐ„, ๊ธฐ๋ณธ๊ด€๋žŒ๋ฃŒ ๋“ฑ)๋ฅผ ์ƒˆ๋กœ ์ƒ์„ฑํ•œ ์ธ์Šคํ„ด์Šค์— ์ „๋‹ฌํ•ด์ค˜์•ผ ํ•œ๋‹ค. - ํ•˜์ง€๋งŒ ํ•ฉ์„ฑ์„ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด '๊ธˆ์•ก ํ• ์ธ'์ด๋“  ๋น„์œจ ํ• ์ธ'์ด๋“  ๋ญ๋“  ์˜ํ™”์™€ ๋ถ„๋ฆฌ๋œ 'ํ• ์ธ ์ •์ฑ…'์œผ๋กœ ์ถ”์ƒํ™”ํ•ด์„œ ๋Ÿฐํƒ€์ž„ ๊ต์ฒด๊ฐ€ ๊ฐ€๋Šฅํ•ด์ง„๋‹ค. - **'ํ•ญ์ƒ ์ƒ์†๋ณด๋‹ค ํ•ฉ์„ฑ'๋ณด๋‹ค๋Š” ์„œ๋ธŒ ํƒ€์ž…๊ณผ ๊ณต์œ ํ•ด์•ผํ•  ๊ตฌํ˜„์ด ์žˆ๋Š”๊ฐ€, ๋Ÿฐํƒ€์ž„ ๊ต์ฒด๊ฐ€๋Šฅ์„ฑ์ด ์žˆ๋Š”๊ฐ€๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ ์ ˆํ•œ ๊ฒƒ์„ ์„ ํƒํ•˜๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.** ### p165 #### ๋„๋ฉ”์ธ ๊ตฌ์กฐ์™€ ์ฝ”๋“œ ๊ตฌ์กฐ - 2 - ์ฒ˜์Œ์— ๋„๋ฉ”์ธ ์ „๋ฌธ๊ฐ€์™€ ๋„์ถœํ•œ ๋ชจ๋ธ์—๋Š” '๋น„์œจ ํ• ์ธ ์˜ํ™”', '๊ธˆ์•ก ํ• ์ธ ์˜ํ™”'๋งŒ ์กด์žฌํ–ˆ๊ณ  'ํ• ์ธ ์ •์ฑ…'์€ ๋ณ„๋„๋กœ ์กด์žฌํ•˜์ง€ ์•Š์•˜๋˜ ๊ฐœ๋…์ด๋‹ค. - ์ด์ฒ˜๋Ÿผ ์ฒ˜์Œ์—๋Š” ๋„๋ฉ”์ธ ๊ตฌ์กฐ์—์„œ ์ฝ”๋“œ ๊ตฌ์กฐ๊ฐ€ ๋„์ถœ๋˜์ง€๋งŒ, ์ฝ”๋“œ ๊ตฌ์กฐ์—์„œ ์ƒˆ๋กœ์šด ๋„๋ฉ”์ธ ๊ฐœ๋…์ด ๋„์ถœ๋˜์–ด ๋„๋ฉ”์ธ ๊ตฌ์กฐ๋ฅผ ๊ฐœ์„ ํ•  ์ˆ˜๋„ ์žˆ๋‹ค. ### p168 #### ์–ด๋ ค์šด ์ฑ…์ž„ ์ฃผ๋„ ์„ค๊ณ„์˜ ๋Œ€์•ˆ - ๋™์ž‘ํ•˜๋Š” ์ฝ”๋“œ ์ž‘์„ฑ ์™„๋ฃŒ ํ›„ ๋ฆฌํŒฉํ„ฐ๋ง #### ๋ชฌ์Šคํ„ฐ ๋ฉ”์„œ๋“œ์™€ ์ž‘์€ ๋ฉ”์„œ๋“œ - ๋ชฌ์Šคํ„ฐ ๋ฉ”์„œ๋“œ์˜ ๋‹จ์  - ๋†’์€ ์ฝ”๋“œ ์ดํ•ด ๋น„์šฉ - ๋กœ์ง์˜ ์ผ๋ถ€ ์žฌ์‚ฌ์šฉ ๋ถˆ๊ฐ€ - ์žฌ์‚ฌ์šฉํ•˜๋Š” ์œ ์ผํ•œ ๋ฐฉ๋ฒ•์€ ๋ณต๋ถ™์ด๋ฏ€๋กœ ์ฝ”๋“œ ์ค‘๋ณต ์œ ๋ฐœ - ์ž‘์€ ๋ฉ”์„œ๋“œ์˜ ์žฅ์  - ์‰ฌ์šด ์žฌ์‚ฌ์šฉ(override ํฌํ•จ) - ์ฝ”๋“œ ์ž์ฒด๊ฐ€ ์ฃผ์„ ์—ญํ•  - ์ž‘์€ ๋ฉ”์„œ๋“œ์˜ ์žฅ์ ์€ ์ด๋ฆ„์„ ์ž˜ ์ง€์—ˆ์„ ๋•Œ ๊ทน๋Œ€ํ™”๋œ๋‹ค. ### p171 #### ๋ชฌ์Šคํ„ฐ ๋ฉ”์„œ๋“œ ๋ถ„๋ฆฌ ํ›„ ํšจ๊ณผ - public ๋ฉ”์„œ๋“œ๋Š” ์ƒ์œ„ ์ˆ˜์ค€์˜ ๋ช…์„ธ๋ฅผ ์ฝ๋Š” ๋А๋‚Œ - ์ด๋ฆ„์„ ์ž˜ ์ง€์€ ์ž‘์€ ๋ฉ”์„œ๋“œ๋“ค์€ ์ฃผ์„์„ ์ฝ๋Š” ๋А๋‚Œ - ์ž‘์€ ๋ฉ”์„œ๋“œ๋Š” ๋ณ€๊ฒฝ ์ด์œ ๊ฐ€ ํ•˜๋‚˜ - ์ž‘์€ ๋ฉ”์„œ๋“œ๋Š” ํ•˜๋‚˜์˜ ์ฑ…์ž„๋งŒ์„ ๊ฐ€์ง€๋ฏ€๋กœ ์ด๋™(๋ฆฌํŒฉํ„ฐ๋ง)์ด ์‰ฌ์›Œ์ง„๋‹ค + ๋ชฌ์Šคํ„ฐ ๋ฉ”์„œ๋“œ์—์„œ๋Š” ๋กœ์ปฌ ๋ณ€์ˆ˜๋กœ ์ฒ˜๋ฆฌ๋˜๋˜ ๊ฒƒ์ด ์ž‘์€ ๋ฉ”์„œ๋“œ๋กœ ๋ถ„๋ฆฌ๋˜๋ฉด์„œ ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๊ฐ€ ๋  ์ˆ˜ ์žˆ๋Š”๋ฐ, - ์ด๋Ÿฐ ๋ณ€์ˆ˜๊ฐ€ ๊ฐ์ฒด์˜ ์ฑ…์ž„ ์™„์ˆ˜์— ํ•„์š”ํ•œ ์ ์ ˆํ•œ ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๋ผ๋ฉด ์‘์ง‘๋„๋ฅผ ๋†’์ด๋Š” ๊ฒฐ๊ณผ๋ฅผ ๊ฐ€์ ธ์˜ค์ง€๋งŒ, - ์ฑ…์ž„ ์™„์ˆ˜์— ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค๋ฉด ๋‹ค๋ฅธ ๊ฐ์ฒด๋กœ ๋ถ„๋ฆฌํ•ด์•ผํ•  ํ›„๋ณด๊ฐ€ ๋˜๊ธฐ๋„ ํ•œ๋‹ค. - ๋‹ค๋ฅธ ๊ฐ์ฒด์˜ ์ ‘๊ทผ์ž ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ž‘์€ ๋ฉ”์„œ๋“œ๋Š” ๋‹ค๋ฅธ ๊ฐ์ฒด๋กœ ์˜ฎ๊ฒจ์•ผ ํ•  ์œ ๋ ฅํ•œ ํ›„๋ณด ## 06. ๋ฉ”์‹œ์ง€์™€ ์ธํ„ฐํŽ˜์ด์Šค - ๋””๋ฏธํ„ฐ์˜ ๋ฒ•์น™, ๋ฌป์ง€ ๋ง๊ณ  ์‹œ์ผœ๋ผ, ์˜๋„๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ์ธํ„ฐํŽ˜์ด์Šค, ๋ช…๋ น-์ฟผ๋ฆฌ ๋ถ„๋ฆฌ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํ™œ์šฉํ•ด์„œ ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์„ค๊ณ„ํ•˜๋ฉด ๊ฐ์ฒด์˜ ์ž์œจ์„ฑ์„ ๋†’์ผ ์ˆ˜ ์žˆ๋‹ค. - ์ด ๋„ค ๊ฐ€์ง€๋„ ์ฑ…์ž„์„ ๊ณ ๋ คํ•˜์ง€ ์•Š๊ณ  ๋ฌด๋ถ„๋ณ„ํ•˜๊ฒŒ ์ ์šฉํ•˜๋ฉด ๋ถ€์ž‘์šฉ์ด ๋‚˜ํƒ€๋‚˜๋ฏ€๋กœ, ์ ์ ˆํ•œ ์ฑ…์ž„ ์œ ์ง€๊ฐ€ ์ด ๋„ค ๊ฐ€์ง€๋ณด๋‹ค ๋” ๊ทผ๋ณธ์ ์ธ ์›๋ฆฌ๋‹ค. ### p171 - p181 #### ๋ฉ”์‹œ์ง€ - ๊ฐ์ฒด์˜ ์œ ์ผํ•œ ์˜์‚ฌ์†Œํ†ต ์ˆ˜๋‹จ - operation + argument #### ๋ฉ”์‹œ์ง€ ์ „์†ก - ๋‹ค๋ฅธ ๊ฐ์ฒด์—๊ฒŒ ํ˜‘๋ ฅ์„ ์š”์ฒญํ•˜๋Š” ๊ฒƒ - ์ˆ˜์‹ ์ž + ๋ฉ”์‹œ์ง€ #### ๋ฉ”์„œ๋“œ - ๋ฉ”์‹œ์ง€๋ฅผ ์ˆ˜์‹ ํ•œ ๊ฐ์ฒด๊ฐ€ ์ฑ…์ž„์„ ์™„์ˆ˜ํ•˜๊ธฐ ์œ„ํ•ด ์ž์œจ์ ์œผ๋กœ ์‹คํ–‰ํ•˜๋Š” ํ•จ์ˆ˜ ๋˜๋Š” ํ”„๋กœ์‹œ์ € - ๋ฉ”์‹œ์ง€๋Š” ์Œ๋ฐฉ์˜ ์˜์‚ฌ์†Œํ†ต ์ˆ˜๋‹จ - ๋ฉ”์„œ๋“œ๋Š” ์ผ๋ฐฉ์˜ ๋ฌธ์ œํ•ด๊ฒฐ ์ˆ˜๋‹จ #### ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค - ๊ฐ์ฒด๊ฐ€ ์˜์‚ฌ์†Œํ†ต์„ ์œ„ํ•ด ์™ธ๋ถ€์— ๊ณต๊ฐœํ•˜๋Š” ๋ฉ”์‹œ์ง€์˜ ์ง‘ํ•ฉ #### ์˜คํผ๋ ˆ์ด์…˜ - ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค์— ํฌํ•จ๋œ ๋ฉ”์‹œ์ง€ #### ์ด ์ •๋ฆฌ >ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด์˜ ๊ด€์ ์—์„œ ๊ฐ์ฒด๊ฐ€ ๋‹ค๋ฅธ ๊ฐ์ฒด์—๊ฒŒ ๋ฉ”์‹œ์ง€๋ฅผ ์ „์†กํ•˜๋ฉด ๋Ÿฐํƒ€์ž„ ์‹œ์Šคํ…œ์€ ๋ฉ”์‹œ์ง€ ์ „์†ก์„ ์˜คํผ๋ ˆ์ด์…˜ ํ˜ธ์ถœ๋กœ ํ•ด์„ํ•˜๊ณ  ๋ฉ”์‹œ์ง€๋ฅผ ์ˆ˜์‹ ํ•œ ๊ฐ์ฒด์˜ ์‹ค์ œ ํƒ€์ž…์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์ ์ ˆํ•œ ๋ฉ”์„œ๋“œ๋ฅผ ์ฐพ์•„ ์‹คํ–‰ํ•œ๋‹ค. - ๋ฉ”์‹œ์ง€ ์ „์†ก == ์ˆ˜์‹  ๊ฐ์ฒด์˜ ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค์˜ ์˜คํผ๋ ˆ์ด์…˜ ํ˜ธ์ถœ - ์ˆ˜์‹  ๊ฐ์ฒด๋Š” ์˜คํผ๋ ˆ์ด์…˜์ด ํ˜ธ์ถœ๋˜๋ฉด ์ ํ•ฉํ•œ ๋ฉ”์„œ๋“œ๋ฅผ ์ž์œจ์ ์œผ๋กœ ์„ ํƒํ•ด์„œ ์‹คํ–‰ ### p183 #### ๋””๋ฏธํ„ฐ์˜ ๋ฒ•์น™(Law of Demeter) - ๋””๋ฏธํ„ฐ๋Š” ํ”„๋กœ์ ํŠธ ์ด๋ฆ„ >ํด๋ž˜์Šค ๋‚ด๋ถ€์˜ ๋ฉ”์„œ๋“œ๋Š” ์•„๋ž˜ ์กฐ๊ฑด์„ ๋งŒ์กฑํ•˜๋Š” ์ธ์Šคํ„ด์Šค์—๋งŒ ๋ฉ”์‹œ์ง€๋ฅผ ์ „์†กํ•˜๋„๋ก ๊ตฌํ˜„ >- this >- this์˜ ์†์„ฑ >- this์˜ ์†์„ฑ์ธ ์ปฌ๋ ‰์…˜์˜ ์š”์†Œ >- ๋ฉ”์„œ๋“œ๋กœ ์ „๋‹ฌ๋œ ํŒŒ๋ผ๋ฏธํ„ฐ >- ๋ฉ”์„œ๋“œ ๋‚ด์˜ ์ง€์—ญ ๊ฐ์ฒด - `aaa.getBbb().getCcc().getDdd()..`์™€ ๊ฐ™์ด ์บก์Аํ™”๋ฅผ ์ €ํ•ดํ•˜๋Š” ๋ฐฉ์‹์˜ ์‚ฌ์šฉ์„ ์ œํ•œ - ๋Œ€์‹ ์— `aaa.doB() -> bbb.doC() -> ccc.doD()` ์™€ ๊ฐ™์€ ์ž์œจ์„ฑ ์žˆ๋Š” ์œ„์ž„์„ ์„ ํ˜ธ ### p187 #### Tell, don't ask - ๋ฐ์ดํ„ฐ๋ฅผ ์š”๊ตฌํ•˜์ง€ ๋ง๊ณ  ์ž‘์—…์„ ์š”์ฒญํ•˜๋ผ ์™€ ๊ฐ™์€ ๋ง์ธ ๋“ฏ ### p190 #### ์˜๋„๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ์ธํ„ฐํŽ˜์ด์Šค(Intention Revealing Interface) - '์–ด๋–ป๊ฒŒ'๊ฐ€ ์•„๋‹ˆ๋ผ '๋ฌด์—‡'์„ ๋‚˜ํƒ€๋‚ด๋„๋ก ๋ฉ”์„œ๋“œ ์ด๋ฆ„์„ ๊ฒฐ์ •ํ•˜์ž - ์–ด๋–ค ๊ตฌํ˜„์ด ์žˆ๋‹ค๋ฉด ๋™์ž‘์€ ๊ฐ™๋˜ ๋ฐฉ์‹์ด ์™„์ „ํžˆ ๋‹ค๋ฅธ ๊ตฌํ˜„์„ ํ•˜๋‚˜ ๋– ์˜ฌ๋ฆฌ๊ณ , ๊ทธ ๋‘˜์— ๊ฐ™์€ ๋ฉ”์„œ๋“œ ์ด๋ฆ„์„ ๋ถ™์ธ๋‹ค๊ณ  ์ƒ์ƒ๋ณด์ž. ๊ทธ ๋‘˜ ๋ชจ๋‘์— ์–ด์ƒ‰ํ•˜์ง€ ์•Š์€ ์ด๋ฆ„์ด ์žˆ๋‹ค๋ฉด ์˜๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ์ข‹์€ ์ด๋ฆ„์ผ ๊ฒƒ์ด๋‹ค. ### p192 #### getter์˜ ํํ•ด >`audience.getBag().minusAmount(ticket.getFee());` > >ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค์— getBag์„ ํฌํ•จ์‹œํ‚ค๋Š” ์ˆœ๊ฐ„ ๊ฐ์ฒด์˜ ๊ตฌํ˜„์ด ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํ†ตํ•ด ์™ธ๋ถ€๋กœ ์ƒˆ์–ด๋‚˜๊ฐ€ ๋ฒ„๋ฆฌ๊ณ  ๋งŒ๋‹ค. - getter๊ฐ€ ์ด๋ฆ„๋งŒ์œผ๋กœ ๋ณด๋ฉด ๋ณ€๊ฒฝ์„ ์ผ์œผํ‚ค์ง€ ์•Š์„ ๊ฒƒ ๊ฐ™์ง€๋งŒ, ์‹ค์€ getter๋ฅผ ํ†ตํ•ด ๋ณ€๊ฒฝ ๊ถŒํ•œ์„ ์™ธ๋ถ€์— ์ฃผ๋Š” ๊ฒƒ๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋‹ค. ### p197 #### ์ธํ„ฐํŽ˜์ด์Šค ์„ค๊ณ„ ์›์น™ ํšจ๊ณผ ๊ฐ„๋‹จ ์š”์•ฝ - ๋””๋ฏธํ„ฐ ๋ฒ•์น™์€ ์บก์Аํ™”๋ฅผ ์œ„๋ฐ˜ํ•˜๋Š” ๋ฉ”์‹œ์ง€๊ฐ€ ์ธํ„ฐํŽ˜์ด์Šค์— ํฌํ•จ๋˜๋Š” ๊ฒƒ ์–ต์ œ - ๋ฌป์ง€ ๋ง๊ณ  ์‹œ์ผœ๋ผ ์›์น™์€ ๋””๋ฏธํ„ฐ ๋ฒ•์น™์ด ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์ง€์ผœ์ง€๊ฒŒ ๋งŒ๋“ค๋ฉฐ ์ž์œจ์„ฑ์„ ๋†’์ด๋Š” ํšจ๊ณผ - ์˜๋„๋ฅผ ๋“œ๋Ÿฌ๋‚ด๋Š” ์ธํ„ฐํŽ˜์ด์Šค ์›์น™์€ ์˜์‚ฌ์†Œํ†ต ๋น„์šฉ์„ ๋‚ฎ์ถ”๊ณ  ๊ตฌํ˜„๊ณผ ๋ถ„๋ฆฌ๋˜๊ฒŒ ๋งŒ๋“œ๋Š” ํšจ๊ณผ ### p200 #### ๋””๋ฏธํ„ฐ ๋ฒ•์น™์ด ํ•ญ์ƒ ์ข‹์€ ๊ฒฐ๊ณผ๋งŒ์„ ๋‚ซ์ง€๋Š” ์•Š๋Š”๋‹ค - ๋ฌป์ง€ ์•Š๊ณ  ์‹œํ‚ค๊ธฐ ์œ„ํ•ด ๋Œ€์ƒ **๊ฐ์ฒด ๋‚ด์˜ ์œ„์ž„ ๋ฉ”์„œ๋“œ๋กœ ๋ฌด๋ถ„๋ณ„ํ•˜๊ฒŒ ์ด๋™ํ•ด์„œ ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค์— ํฌํ•จ์‹œํ‚ค๋ฉด, ๊ฒฐ๊ณผ์ ์œผ๋กœ ํ•˜๋‚˜์˜ ๊ฐ์ฒด๊ฐ€ ์—ฌ๋Ÿฌ ์ฑ…์ž„์„ ๊ฐ€์ง€๋ฉด์„œ ์‘์ง‘๋„๊ฐ€ ๋‚ฎ์•„์งˆ ์ˆ˜๋„ ์žˆ๋‹ค.** - ์œ„์ž„ ๋ฉ”์„œ๋“œ๋กœ ์ด๋™ ์‹œ ๊ฐ์ฒด์˜ ์ฑ…์ž„๊ณผ์˜ ๋ถ€ํ•ฉ๋„์— ๋Œ€ํ•ด ํ•œ ๋ฒˆ ๋” ๊ณ ๋ฏผ ํ•„์š” ### p202 #### ํ”„๋กœ์‹œ์ €์™€ ํ•จ์ˆ˜ - ํ”„๋กœ์‹œ์ €๋Š” ๋‚ด๋ถ€ ์ƒํƒœ๋ฅผ ๋ณ€๊ฒฝ(๋ถ€์ˆ˜ํšจ๊ณผ)ํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•  ์ˆ˜ ์—†๋‹ค. - ๋‚ด๋ถ€ ์ƒํƒœ๊ฐ€ ๋ณ€๊ฒฝ๋˜๋ฏ€๋กœ ํ˜ธ์ถœ๋  ๋–„๋งˆ๋‹ค ๋‹ค๋ฅธ ๊ฐ’์ด ๋ฐ˜ํ™˜๋  ์ˆ˜๋„ ์žˆ๋‹ค. ๋”ฐ๋ผ์„œ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•˜์ง€ ์•Š๋Š” ๊ฒƒ์ด ๋ถˆํ•„์š”ํ•œ ํ˜ผ๋™์„ ๋ง‰๋Š”๋‹ค. - ์ฐธ์กฐ ํˆฌ๋ช…์„ฑ ์—†์Œ - ํ•จ์ˆ˜๋Š” ๋‚ด๋ถ€ ์ƒํƒœ๋ฅผ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์—†์œผ๋ฉฐ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค. - ์•„๋ฌด๋ฆฌ ํ˜ธ์ถœ๋˜๋„ ๋‚ด๋ถ€ ์ƒํƒœ ๋ณ€๊ฒฝ์ด ์—†์œผ๋ฏ€๋กœ ๊ฐ™์€ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•˜๋ฏ€๋กœ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•ด๋„ ๊ดœ์ฐฎ๋‹ค. - ์ฐธ์กฐ ํˆฌ๋ช…์„ฑ ์žˆ์Œ ### p212 #### ์ฐธ์กฐ ํˆฌ๋ช…์„ฑ >ํ‘œํ˜„์‹ e๊ฐ€ ์žˆ์„ ๋•Œ ๋ชจ๋“  e๋ฅผ e์˜ ๊ฐ’์œผ๋กœ ๊ต์ฒดํ•˜๋”๋ผ๋„ ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€์ง€ ์•Š๋Š” ํŠน์ง• - '๋ชจ๋“  e'๋ผ ํ•จ์€ ํ‘œํ˜„์‹ e๊ฐ€ ์—ฌ๋Ÿฌ ๊ตฐ๋ฐ ์กด์žฌํ•จ, ์ฆ‰ ์—ฌ๋Ÿฌ ๋ฒˆ ํ˜ธ์ถœ๋จ์„ ์˜๋ฏธ - ์—ฌ๋Ÿฌ ๋ฒˆ ํ˜ธ์ถœ๋˜๋”๋ผ๋„ ํ•ญ์ƒ ๊ฐ™์€ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•˜๋ฉด ๋ชจ๋“  e๋ฅผ e์˜ ๊ฐ’์œผ๋กœ ๊ต์ฒดํ•ด๋„ ์ „์ฒด ๊ฒฐ๊ณผ๊ฐ€ ๋‹ฌ๋ผ์ง€์ง€ ์•Š์Œ ## 07. ๊ฐ์ฒด ๋ถ„ํ•ด - ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…์—๋Š” ์ƒ์†/๋‹คํ˜•์„ฑ ๊ฐœ๋…์ด ์—†์œผ๋ฉฐ, ์˜คํผ๋ ˆ์ด์…˜ ๊ธฐ์ค€์œผ๋กœ ํƒ€์ž…์„ ์ถ”์ƒํ™”(ํ•˜๋‚˜์˜ ํƒ€์ž…์œผ๋กœ ์—ฌ๋Ÿฌ ํƒ€์ž…์„ ํ†ตํ•จํ•˜๊ณ  ์ˆจ๊น€)ํ•œ๋‹ค. - ํด๋ž˜์Šค๋Š” ์ƒ์†/๋‹คํ˜•์„ฑ ๊ฐœ๋…์ด ์žˆ์–ด์„œ, ํƒ€์ž… ๊ธฐ์ค€์œผ๋กœ ์˜คํผ๋ ˆ์ด์…˜์„ ์ถ”์ƒํ™”(ํ•˜๋‚˜์˜ ์˜คํผ๋ ˆ์ด์…˜์ด ํƒ€์ž…์— ๋”ฐ๋ผ ์—ฌ๋Ÿฌ ๊ตฌํ˜„์„ ๊ฐ€์ง)ํ•œ๋‹ค. - ํƒ€์ž… ์ถ”๊ฐ€ ์••๋ ฅ์ด ํด ๋•Œ๋Š” ํด๋ž˜์Šค๊ฐ€, ์˜คํผ๋ ˆ์ด์…˜ ์ถ”๊ฐ€ ์••๋ ฅ์ด ํด ๋•Œ๋Š” ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…์ด ๋” ๋‚˜์€ ์„ ํƒ ### p218 #### ํ”„๋กœ์‹œ์ € ์ถ”์ƒํ™”(Procedure Abstaction)๊ณผ ๋ฐ์ดํ„ฐ ์ถ”์ƒํ™”(Data Abstraction) >ํ”„๋กœ์‹œ์ € ์ถ”์ƒํ™”๋Š” ์†Œํ”„ํŠธ์›จ์–ด๊ฐ€ ๋ฌด์—‡์„ ํ•˜๋Š”์ง€ ์ถ”์ƒํ™”ํ•œ๋‹ค. >๋ฐ์ดํ„ฐ ์ถ”์ƒํ™”๋Š” ์†Œํ”„ํŠธ์›จ์–ด๊ฐ€ ๋ฌด์—‡์„ ์•Œ์•„์•ผ ํ•˜๋Š”์ง€ ์ถ”์ƒํ™”ํ•œ๋‹ค. - ํ”„๋กœ์‹œ์ € ์ถ”์ƒํ™”๋Š” ์†Œํ”„ํŠธ์›จ์–ด๊ฐ€ ์–ด๋–ป๊ฒŒ ํ•˜๋Š”์ง€ ์ถ”์ƒํ™”ํ•œ๋‹ค. ๊ฐ€ ๋” ์ ์ ˆํ•˜์ง€ ์•Š๋‚˜ ์‹ถ๋‹ค. ### p220 #### ๊ธฐ๋Šฅ ๋ถ„ํ•ด ๋ฐฉ์‹ >๊ธฐ๋Šฅ ๋ถ„ํ•ด์˜ ์ดˆ์ ์€ ํ•˜๋‚˜์˜ ๋ฌธ์žฅ์œผ๋กœ ํ‘œํ˜„๋œ ๊ธฐ๋Šฅ์„ ์—ฌ๋Ÿฌ ๊ฐœ์˜ ๋” ์ž‘์€ ๊ธฐ๋Šฅ์œผ๋กœ ๋ถ„ํ•ดํ•˜๋Š” ๊ฒƒ์ด๋‹ค. - ๊ธฐ๋Šฅ ๋ถ„ํ•ด๋Š” ์ƒ์œ„ ๋‹จ๊ณ„์—์„œ ์ถ”์ƒ์ ์œผ๋กœ ๊ธฐ์ˆ ๋œ ๊ธฐ๋Šฅ์„ ํ•˜์œ„ ๋‹จ๊ณ„์—์„œ ๊ตฌ์ฒดํ™”ํ•˜๋Š” ํƒ‘๋‹ค์šด/ํ•˜ํ–ฅ์‹ ์ ‘๊ทผ๋ฒ•์ด๋‹ค. ### p227 ~ p234 #### ๊ธฐ๋Šฅ ๋ถ„ํ•ด ๋ฐฉ์‹์˜ ๋‹จ์  - What(๋ฐ์ดํ„ฐ)์ด ์•„๋‹ˆ๋ผ How์™€ Order(์ ˆ์ฐจ)์— ์ง‘์ค‘ํ•˜๊ฒŒ ๋งŒ๋“ค์–ด์„œ, - ์ •๋ณด ๊ฐ์ถค์ด ์ž˜ ์ง€์ผœ์ง€์ง€ ์•Š์œผ๋ฏ€๋กœ, - ๊ฒฐํ•ฉ๋„๊ฐ€ ๋†’๊ณ  ์žฌ์‚ฌ์šฉ์„ฑ์ด ๋‚ฎ์€ ์ฝ”๋“œ๊ฐ€ ๋งŒ๋“ค์–ด์ง„๋‹ค. #### ๊ธฐ๋Šฅ ๋ถ„ํ•ด๊ฐ€ ์ ํ•ฉํ•œ ๊ฒฝ์šฐ - ํ˜‘๋ ฅ ๊ด€๊ณ„๊ฐ€ ์–ด๋А ์ •๋„ ์„ค๊ณ„๋œ ์ดํ›„ ์ •ํ•ด์ง„ ์ฑ…์ž„์„ ๊ตฌํ˜„ํ•˜๋Š” ๋ฐ ์ ํ•ฉ - ์ฆ‰, ๋ชจ๋“ˆ ๋‚ด๋ถ€์˜ ๊ตฌํ˜„ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐ ์ ํ•ฉ ### p235 #### ์ •๋ณด ๊ฐ์ถค๊ณผ ๋ชจ๋“ˆ >๋ชจ๋“ˆ์€ ์„œํ”„ ํ”„๋กœ๊ทธ๋žจ์ด๋ผ๊ธฐ๋ณด๋‹ค ์ฑ…์ž„์˜ ํ• ๋‹น์ด๋‹ค. > >David Parnas - ๋ชจ๋“ˆ์€ ๋‹จ์ˆœํžˆ ๊ธฐ๋Šฅ์„ ๋ถ„๋ฆฌํ•ด์„œ ๋ฌถ์–ด๋†“์€ ์„œ๋ธŒ ํ”„๋กœ๊ทธ๋žจ์ด ์•„๋‹ˆ๋ผ, ์ฑ…์ž„ ํ• ๋‹น์— ๋”ฐ๋ผ์„œ ๋ถˆํ•„์š”ํ•œ ์ •๋ณด๋ฅผ ์™ธ๋ถ€๋กœ๋ถ€ํ„ฐ ๊ฐ์ถ”๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ๋ถ„๋ฆฌ ๋‹จ์œ„๋‹ค. - ์ž์ฃผ ๋ณ€๊ฒฝ๋˜๋Š” ๋ถ€๋ถ„(๋ฐ์ดํ„ฐ์™€ ๊ตฌํ˜„)์„ ๋ชจ๋“ˆ ๋‚ด๋ถ€๋กœ ๊ฐ์ถ”๊ณ , ๋œ ๋ณ€๊ฒฝ๋˜๋Š” ๋ถ€๋ถ„(๊ทœ์•ฝ)์„ ์™ธ๋ถ€์— ๋…ธ์ถœํ•œ๋‹ค. ### p236 #### ๋ฐ์ดํ„ฐ ์บก์Аํ™”์™€ ์ •๋ณด ๊ฐ์ถค >๋ฐ์ดํ„ฐ์™€ ๋ฉ”์„œ๋“œ๋ฅผ ํ•˜๋‚˜์˜ ๋‹จ์œ„๋กœ ํ†ตํ•ฉํ•˜๊ณ  ํผ๋ธ”๋ฆญ ๋ฉ”์„œ๋“œ๋ฅผ ํ†ตํ•ด์„œ๋งŒ ์ ‘๊ทผํ•˜๋„๋ก ํ—ˆ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ฐ์ดํ„ฐ ์บก์Аํ™”(data encapsulation)๋ผ๊ณ  ํ•œ๋‹ค. ์ •๋ณด ์€๋‹‰๊ณผ ๋ฐ์ดํ„ฐ ์บก์Аํ™”๋Š” ๋™์ผํ•œ ๊ฐœ๋…์ด ์•„๋‹ˆ๋‹ค. ๋ณ€๊ฒฝ๊ณผ ๊ด€๋ จ๋œ ๋น„๋ฐ€์„ ๊ฐ์ถ˜๋‹ค๋Š” ์ธก๋ฉด์—์„œ ์ •๋ณด ์€๋‹‰๊ณผ ์บก์Аํ™”๋Š” ๋™์ผ ๊ฐœ๋…์„ ๊ฐ€๋ฆฌํ‚ค๋Š” ๋‘ ๊ฐ€์ง€ ๋‹ค๋ฅธ ์šฉ์–ด์ง€๋งŒ ๋ฐ์ดํ„ฐ ์บก์Аํ™”๋Š” ๋น„๋ฐ€์˜ ํ•œ ์ข…๋ฅ˜์ธ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ์ถ”๋Š” ์บก์Аํ™”์˜ ํ•œ ์ข…๋ฅ˜์ผ ๋ฟ์ด๋‹ค. - ์ด์ œ์„œ์•ผ ๋ฐ์ดํ„ฐ ์บก์Аํ™”์™€ ์ •๋ณด ๊ฐ์ถค์„ ๊ตฌ๋ถ„ํ•ด์ฃผ๋‹ค๋‹ˆ.. - ๊ทธ๋Ÿฐ๋ฐ ๋งˆ์ง€๋ง‰ '๋ฐ์ดํ„ฐ ์บก์Аํ™”๋Š” ๋น„๋ฐ€์˜ ํ•œ ์ข…๋ฅ˜์ธ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ์ถ”๋Š” ์บก์Аํ™”์˜ ํ•œ ์ข…๋ฅ˜์ผ ๋ฟ์ด๋‹ค.'๋ผ๋Š” ์„ค๋ช…์„ ๋ณด๋ฉด ์—ฌ์ „ํžˆ ์บก์Аํ™”๋ฅผ ์ •๋ณด ๊ฐ์ถค๊ณผ ๊ฐ™๊ฒŒ ๋˜๋Š” ์ •๋ณด ๊ฐ์ถค์— ํฌํ•จ๋˜๋Š” ๊ฐœ๋…์œผ๋กœ ๋ณด๋Š” ๊ฒƒ ๊ฐ™๋‹ค. - ์ด ์„ค๋ช…๋ณด๋‹ค๋Š” p20 ์ •๋ฆฌ ๋ถ€๋ถ„์— ๋‚˜์˜จ๋Œ€๋กœ, **์บก์Аํ™”๋Š” ์ž์œจ์„ฑ ํ™•๋ณด ์žฅ์น˜, ์ •๋ณด ๊ฐ์ถค์€ ์ž์œจ์„ฑ ๋ณดํ˜ธ ์žฅ์น˜**๋ผ๊ณ  ์ดํ•ดํ•˜๋Š” ๊ฒƒ์ด ๋‚˜์€ ๋“ฏ ### p239 #### ๋ชจ๋“ˆ์˜ ์˜์˜ >๋ชจ๋“ˆ์ด ์ •๋ณด ์€๋‹‰์ด๋ผ๋Š” ๊ฐœ๋…์„ ํ†ตํ•ด ๋ฐ์ดํ„ฐ๋ผ๋Š” ์กด์žฌ๋ฅผ ์„ค๊ณ„์˜ ์ค‘์‹ฌ ์š”์†Œ๋กœ ๋ถ€๊ฐ์‹œ์ผฐ๋‹ค #### ๋ชจ๋“ˆ๊ณผ ํ•˜ํ–ฅ์‹ ๊ธฐ๋Šฅ ๋ถ„ํ•ด์™€์˜ ์ฐจ์ด - ํ•˜ํ–ฅ์‹ ๊ธฐ๋Šฅ๋ถ„ํ•ด๋Š” ๋ฉ”์ธ ํ•จ์ˆ˜๋ฅผ ์ •์˜ํ•˜๊ณ  ํ•„์š”์— ๋”ฐ๋ผ ๋” ์„ธ๋ถ€์ ์ธ ํ•จ์ˆ˜๋กœ ๋ถ„ํ•ด - **๋ชจ๋“ˆ์€ ๊ฐ์ถฐ์•ผ ํ•  ๋ฐ์ดํ„ฐ๋ฅผ ๋จผ์ € ๊ฒฐ์ •ํ•˜๊ณ  ์ด ๋ฐ์ดํ„ฐ๋ฅผ ์กฐ์ž‘ํ•  ํ•จ์ˆ˜๋ฅผ ๋‚˜์ค‘์— ๊ฒฐ์ •** #### ๋ชจ๋“ˆ์˜ ๋‹จ์  - ์ธ์Šคํ„ด์Šค ๊ฐœ๋…์ด ์—†๋‹ค. - ์ฆ‰ ๋ถ„๋ฆฌ ๋‹จ์œ„๋‚˜ ๋ฒ”์œ„์ผ ๋ฟ ์‹ค์ œ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ์‹ค์ฒดํ™”๊ฐ€ ์—†๋‹ค. -> ์‹ค์ฒดํ™” ๊ฐ€๋Šฅํ•œ ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…(Abstract Data Type)์ด ํ•„์š” ### p240 #### ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…(Abstract Data Type) >๊ธฐ๋Šฅ ๋ถ„ํ•ด์˜ ์‹œ๋Œ€์—๋Š” ํ”„๋กœ์‹œ์ € ์ถ”์ƒํ™”๊ฐ€ ์ฃผ๋กœ ์‚ฌ์šฉ๋์œผ๋ฉฐ, ์ด ์‹œ๊ธฐ์˜ ์–ธ์–ด์—๋Š” ์ƒˆ๋กœ์šด ํƒ€์ž…์„ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒƒ์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๊ฑฐ๋‚˜ ์ œํ•œ์ ์ด์—ˆ๋‹ค. #### Barbara Liskov๊ฐ€ 1974๋…„์— ๋ฐ์ดํ„ฐ ์ถ”์ƒํ™” ๊ฐœ๋… ์ œ์•ˆ >์ถ”์ƒ ๋ฐ์ดํ„ฐ ๊ฐ์ฒด๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ํ”„๋กœ๊ทธ๋ž˜๋จธ๋Š” ์˜ค์ง ๊ฐ์ฒด๊ฐ€ ์™ธ๋ถ€์— ์ œ๊ณตํ•˜๋Š” ํ–‰์œ„์—๋งŒ ๊ด€์‹ฌ์„ ๊ฐ€์ง€๋ฉฐ, ํ–‰์œ„๊ฐ€ ๊ตฌํ˜„๋˜๋Š” ์„ธ๋ถ€์ ์ธ ์‚ฌํ•ญ์— ๋Œ€ํ•ด์„œ๋Š” ๋ฌด์‹œํ•œ๋‹ค. ๊ฐ์ฒด๊ฐ€ ์ €์žฅ์†Œ ๋‚ด์—์„œ ์–ด๋–ป๊ฒŒ ํ‘œํ˜„๋˜๋Š”์ง€์™€ ๊ฐ™์€ ๊ตฌํ˜„ ์ •๋ณด๋Š” ์˜ค์ง ์˜คํผ๋ ˆ์ด์…˜์„ ์–ด๋–ป๊ฒŒ ๊ตฌํ˜„ํ•  ๊ฒƒ์ธ์ง€์— ์ง‘์ค‘ํ•  ๋•Œ๋งŒ ํ•„์š”ํ•˜๋‹ค. ๊ฐ์ฒด์˜ ์‚ฌ์šฉ์ž๋Š” ์ด ์ •๋ณด๋ฅผ ์•Œ๊ฑฐ๋‚˜ ์ œ๊ณต๋ฐ›์„ ํ•„์š”๊ฐ€ ์—†๋‹ค. ### p245 ~ 247 #### ํด๋ž˜์Šค์™€ ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…์˜ ์ฐจ์ด - ํด๋ž˜์Šค๋Š” ์ƒ์†๊ณผ ๋‹คํ˜•์„ฑ์„ ์ง€์›ํ•œ๋‹ค. - ์ƒ์†๊ณผ ๋‹คํ˜•์„ฑ์„ ์ง€์›ํ•˜๋ฉด ๊ฐ์ฒด์ง€ํ–ฅ(Object-Oriented), ์ƒ์†/๋‹คํ˜•์„ฑ ์—†๋Š” ์ถ”์ƒ ๋ฐ์ดํ„ฐ ๊ธฐ๋ฐ˜ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์€ ๊ฐ์ฒด๊ธฐ๋ฐ˜(Object-Based) ํ”„๋กœ๊ทธ๋ž˜๋ฐ - **๊ฐ์ฒด์ง€ํ–ฅ ํด๋ž˜์Šค๋Š” ํƒ€์ž…์„ ๊ธฐ์ค€์œผ๋กœ ์ ˆ์ฐจ๋ฅผ ์ถ”์ƒํ™”ํ•˜๊ณ , ๊ฐ์ฒด๊ธฐ๋ฐ˜ ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…์€ ์˜คํผ๋ ˆ์ด์…˜์„ ๊ธฐ์ค€์œผ๋กœ ํƒ€์ž…์„ ์ถ”์ƒํ™”ํ•œ๋‹ค.** - ์ง์› ํด๋ž˜์Šค๋Š” ์ƒ์†์„ ํ™œ์šฉํ•ด์„œ ์ •๊ทœ์ง์›/์ž„์‹œ์ง์›์œผ๋กœ ํƒ€์ž…์„ ๊ตฌ๋ถ„ํ•˜๊ณ  ๊ฐ ํƒ€์ž… ์•ˆ์— ๊ฐ์ž์— ๋งž๋Š” ์˜คํผ๋ ˆ์ด์…˜์„ ์Šค์Šค๋กœ ๊ฐ–๊ณ  ์žˆ๋‹ค. - ์ง์› ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…์€ ์˜คํผ๋ ˆ์ด์…˜์„ ๊ธฐ์ค€์œผ๋กœ ํ•ด๋‹น ์˜คํผ๋ ˆ์ด์…˜์„ ๊ฐ–๋Š” ํƒ€์ž…์„ ํ•˜๋‚˜๋กœ ํ†ตํ•ฉํ•œ๋‹ค. - ๋ฌผ๋ฆฌ์ ์œผ๋กœ ํ•˜๋‚˜์˜ ํƒ€์ž…์„ ์‚ฌ์šฉํ•˜๋ฉด์„œ ๊ทธ ์•ˆ์— ๋…ผ๋ฆฌ์ ์œผ๋กœ ํƒ€์ž…์„ ๊ตฌ๋ถ„ํ•˜๋Š” ๋ณ€์ˆ˜๊ฐ€ ํฌํ•จ๋ผ ์žˆ๋‹ค๋ฉด, ํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ํ•˜๋”๋ผ๋„ ์‹ค์งˆ์ ์œผ๋กœ๋Š” ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…์„ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ๋ณผ ์ˆ˜ ์žˆ๋‹ค. - ์˜ˆ๋ฅผ ๋“ค์–ด ๊ฐœ๋ฐœ์ž๋ฅผ ํ•˜๋‚˜์˜ ํด๋ž˜์Šค๋กœ ํ‘œํ˜„ํ•˜๋ฉด์„œ ๊ทธ ์•ˆ์— `lang` ๊ฐ™์€ ๋ณ€์ˆ˜๋ฅผ ๋‘๊ณ  Java, Python, C# ๊ฐ™์€ ๊ฐ’์„ ๋‘๊ณ  ์˜คํผ๋ ˆ์ด์…˜ ๋‚ด์—์„œ `lang` ๊ฐ’์— ๋”ฐ๋ผ ๋™์ž‘์„ ๊ตฌ๋ถ„ํ•œ๋‹ค๋ฉด ์ด๋Š” ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…์— ํ•ด๋‹นํ•œ๋‹ค. ### p251 #### ์–ธ์ œ ์–ด๋А ๊ฑธ ์“ธ๊นŒ - **ํƒ€์ž… ์ถ”๊ฐ€ ๋ณ€๊ฒฝ ์••๋ ฅ์ด ๋” ํด ๊ฒฝ์šฐ ๊ฐ์ฒด์ง€ํ–ฅ ํด๋ž˜์Šค** - ํƒ€์ž… ์ถ”๊ฐ€ ์‹œ ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…์˜ ๊ฒฝ์šฐ ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ์— ์ƒˆ ํƒ€์ž…์— ๋Œ€ํ•œ ์ฝ”๋“œ๊ฐ€ ์ถ”๊ฐ€๋ผ์•ผ ํ•˜๋ฏ€๋กœ ๋ณ€๊ฒฝ ์˜ํ–ฅ ํผ - **์˜คํผ๋ ˆ์ด์…˜ ์ถ”๊ฐ€ ๋ณ€๊ฒฝ ์••๋ ฅ์ด ๋” ํด ๊ฒฝ์šฐ ๊ฐ์ฒด๊ธฐ๋ฐ˜ ์ถ”์ƒ ๋ฐ์ดํ„ฐ ํƒ€์ž…** - ์˜คํผ๋ ˆ์ด์…˜ ์ถ”๊ฐ€ ์‹œ ํด๋ž˜์Šค์˜ ๊ฒฝ์šฐ ์ƒ์† ๊ณ„์ธต์— ์†ํ•˜๋Š” ๋ชจ๋“  ํด๋ž˜์Šค์— ์˜คํผ๋ ˆ์ด์…˜ ์ถ”๊ฐ€๋ผ์•ผ ํ•˜๋ฏ€๋กœ ๋ณ€๊ฒฝ ์˜ํ–ฅ ํผ ## 08. ์˜์กด์„ฑ ๊ด€๋ฆฌํ•˜๊ธฐ - ์˜์กด ๊ด€๊ณ„๋Š” ํ˜‘๋ ฅ์„ ๊ทผ๊ฐ„์œผ๋กœ ํ•˜๋Š” ๊ฐ์ฒด์ง€ํ–ฅ์—์„œ๋Š” ํ•„์—ฐ์ ์œผ๋กœ ๋ฐœ์ƒํ•˜๋ฉฐ, ๊ธฐํ”ผ ๋Œ€์ƒ์ด ์•„๋‹ˆ๋ผ ๊ด€๋ฆฌ ๋Œ€์ƒ - ๊ฐ€๋Šฅํ•œํ•œ ์ถ”์ƒ๋„๊ฐ€ ๋†’์€ ๋Œ€์ƒ์— ์˜์กดํ•˜๊ฒŒ ํ•ด์•ผ, - ๊ฒฐํ•ฉ๋„๊ฐ€ ๋œ ๋†’์•„์ง€๊ณ  - ์ถ”๊ฐ€๋˜๋Š” ์š”๊ตฌ์‚ฌํ•ญ์— ๋กœ์ง ์ถ”๊ฐ€๊ฐ€ ์•„๋‹ˆ๋ผ ์ปจํ…์ŠคํŠธ ํ™•์žฅ์œผ๋กœ ๋Œ€์‘ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋œ๋‹ค. - ์•„๋ฌด๋ฐ์„œ๋‚˜ new๋กœ ์ง์ ‘ ์ƒ์„ฑํ•˜์ง€ ๋ง๊ณ , - **๊ตฌ์ฒด์„ฑ์„ ๊ฒฐ์ •ํ•˜๋Š” ์—ญํ• ์„ ๊ฐ€์ง„ ์ชฝ์—์„œ ์ง์ ‘ ๊ตฌ์ฒดํด๋ž˜์Šค๋ฅผ ์ƒ์„ฑํ•ด์„œ ์ถ”์ƒํ™”์— ์˜์กดํ•˜๋Š” ์ชฝ์— ์ „๋‹ฌ(์ฃผ์ž…)ํ•˜๊ณ ,** - **์˜์กดํ•˜๋Š” ์ชฝ์—์„œ๋Š” ๊ทธ๋ƒฅ ์ถ”์ƒํ™”์—๋งŒ ์˜์กดํ•˜๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ด ๊ฒฐํ•ฉ๋„ ์ƒ์Šน์„ ๋‚ฎ์ถ”๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค.** ### p257 #### ์˜์กด์„ฑ์ด๋ž€? >์˜์กด์„ฑ์ด๋ž€ ์˜์กดํ•˜๊ณ  ์žˆ๋Š” ๋Œ€์ƒ์˜ ๋ณ€๊ฒฝ์— ์˜ํ–ฅ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ๋Š” ๊ฐ€๋Šฅ์„ฑ์ด๋‹ค. - ์กฐ๊ธˆ ์ง€๋‚˜์นœ ํ‘œํ˜„์ด ์•„๋‹๊นŒ? ์˜์กด์˜ ๊ฒฐ๊ณผ ์˜์กดํ•˜๋Š” ๋Œ€์ƒ์˜ ๋ณ€๊ฒฝ์— ์˜ํ–ฅ์„ ๋ฐ›๊ฒŒ ๋˜์ง€๋งŒ, ์˜์กดํ•˜๋Š” ๋Œ€์ƒ์ด ์บก์Аํ™”๊ฐ€ ๋งค์šฐ ์ž˜ ๋ผ ์žˆ์–ด์„œ ์˜์กด ๋Œ€์ƒ์˜ ๋ณ€๊ฒฝ์— ์˜ํ–ฅ์„ ์•ˆ ๋ฐ›๋Š”๋‹ค๊ณ  ํ•˜๋”๋ผ๋„ ์˜์กด์ด๋ผ๋Š” ๊ด€๊ณ„ ์ž์ฒด๋Š” ์—ฌ์ „ํžˆ ์กด์žฌํ•œ๋‹ค. - ์ผ๋‹จ dependency๋Š” ์˜์กด์„ฑ๋ณด๋‹ค๋Š” ์˜์กด ๊ด€๊ณ„๋กœ ์˜ฎ๊ธฐ๋Š” ๊ฒŒ ๋Œ€๋ถ€๋ถ„ ๋” ์ ํ•ฉํ•˜๋‹ค๊ณ  ์ƒ๊ฐ. ### p263 #### ์˜์กด์„ฑ ์„ค์ • ๋ฐฉ์‹ >- ์ƒ์„ฑ์ž ๋ฐฉ์‹(์ƒ์„ฑ์ž ์ฃผ์ž…) > - ์˜์กดํ•˜๋Š” ๊ฐ์ฒด๊ฐ€ ์ƒ์„ฑ๋  ๋•Œ ์˜์กด์„ฑ์„ ํ™•์ • > - ๊ฐ์ฒด ์ƒํƒœ๊ฐ€ ์ƒ์„ฑ ์งํ›„๋ถ€ํ„ฐ ์•ˆ์ •์  >- setter ๋ฐฉ์‹(setter ์ฃผ์ž…) > - ๊ฐ์ฒด ์ƒ์„ฑ ์ดํ›„์— ์˜์กด์„ฑ์„ ํ™•์ •ํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ ์œ ์—ฐ > - ์ƒ์„ฑ ์งํ›„ set ๋˜๊ธฐ ์ „๊นŒ์ง€ ๊ฐ์ฒด ์ƒํƒœ ๋ถˆ์•ˆ์ • >- parameter ๋ฐฉ์‹(๋ฉ”์„œ๋“œ ์ฃผ์ž…) > - ํŠน์ • operation์„ ์ˆ˜ํ–‰ํ•  ๋•Œ๋งŒ ์˜์กดํ•  ๋•Œ ์ ํ•ฉ > - ์ง€์†์  ํ˜‘๋ ฅ ๊ด€๊ณ„๊ฐ€ ์•„๋‹ˆ๋ผ ์ผ์‹œ์ /์ž„์‹œ์  ํ˜‘๋ ฅ ๊ด€๊ณ„์— ์‚ฌ์šฉ >- ์ƒ์„ฑ์ž + setter ๋ฐฉ์‹๋„ ๊ฐ€๋Šฅ ### p270 #### ์˜์กด์„ฑ ๋ถ„๋ฅ˜ >- ๋ช…์‹œ์ (explicit) ์˜์กด์„ฑ > - ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค์— ๋…ธ์ถœ๋˜๋Š” ์˜์กด์„ฑ > - ์˜ˆ) ์ƒ์„ฑ์ž์˜ ํŒŒ๋ผ๋ฏธํ„ฐ >- ์ˆจ๊ฒจ์ง„(hidden) ์˜์กด์„ฑ > - ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค์— ๋…ธ์ถœ๋˜์ง€ ์•Š๋Š” ์˜์กด์„ฑ > - ์˜ˆ) ์™ธ๋ถ€์— ๋…ธ์ถœ์•Š๊ณ  ์ง์ ‘ ์˜์กด๋Œ€์ƒ์„ (new๋กœ) ์ง์ ‘ ์ƒ์„ฑํ•˜๋Š” ๊ฒฝ์šฐ - **๋ช…์‹œ์  ์˜์กด์„ฑ์ด๋ผ์•ผ๋งŒ ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํ†ตํ•ด ์ปดํŒŒ์ผํƒ€์ž„ ์˜์กด์„ฑ์„ ๋Ÿฐํƒ€์ž„ ์˜์กด์„ฑ์œผ๋กœ ๊ต์ฒดํ•  ์ˆ˜ ์žˆ๋‹ค.** ### p271 #### new๋Š” ํ•ด๋กญ๋‹ค >์ƒ์„ฑํ•  ๊ตฌ์ฒดํด๋ž˜์Šค๋ฅผ ์•Œ์•„์•ผ ํ•œ๋‹ค. -> ๊ฒฐํ•ฉ๋„ ์ฆ๊ฐ€ >new๋กœ ํ˜ธ์ถœํ•  ์ƒ์„ฑ์ž์˜ ํŒŒ๋ผ๋ฏธํ„ฐ ์ •๋ณด๋ฅผ ์•Œ์•„์•ผ ํ•œ๋‹ค. -> ๊ฒฐํ•ฉ๋„ ์ฆ๊ฐ€ #### ์ฆ‰, **new๋Š” ๊ฒฐํ•ฉ๋„๋ฅผ ๋†’์ด๋ฏ€๋กœ** ~~์ƒˆ~~**ํ•ด๋กญ๋‹ค.** - ๋ฌผ๋ก  ์จ์•ผํ•  ๋•Œ๋Š” ์จ์•ผ์ง€. ๋‹ค๋งŒ ๊ฒฐํ•ฉ๋„๋ฅผ ๋ถˆํ•„์š”ํ•˜๊ฒŒ ๋†’์ด๋Š” ๊ฑด ์•„๋‹Œ์ง€ ํ•œ ๋ฒˆ ๋’ค๋Œ์•„๋ด์•ผ. - ์ž˜ ๋ณ€ํ•˜์ง€ ์•Š๋Š” ๋Œ€์ƒ(์˜ˆ: SDK)์„ ์ง์ ‘ ์ƒ์„ฑํ•˜๋Š” ๊ฒƒ์€ ๊ฒฐํ•ฉ๋„๊ฐ€ ๋†’์•„์ง€์ง€๋งŒ ๊ทธ์— ๋”ฐ๋ฅธ ์‹ค์งˆ์  ํํ•ด๋Š” ์ ๋‹ค. - **๊ตฌ์ฒด์„ฑ์„ ๊ฒฐ์ •ํ•˜๋Š” ์—ญํ• ์„ ๊ฐ€์ง„ ์ชฝ์—์„œ ์ง์ ‘ ๊ตฌ์ฒดํด๋ž˜์Šค๋ฅผ ์ƒ์„ฑํ•ด์„œ ์ถ”์ƒํ™”์— ์˜์กดํ•˜๋Š” ์ชฝ์— ์ „๋‹ฌ(์ฃผ์ž…)ํ•˜๊ณ ,** - **์˜์กดํ•˜๋Š” ์ชฝ์—์„œ๋Š” ๊ทธ๋ƒฅ ์ถ”์ƒํ™”์—๋งŒ ์˜์กดํ•˜๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ด ๊ฒฐํ•ฉ๋„ ์ƒ์Šน์„ ๋‚ฎ์ถ”๋Š” ๋ฐฉ๋ฒ•** ### p279 #### ์ปจํ…์ŠคํŠธ ํ™•์žฅ >- ์š”๊ธˆ ํ• ์ธ, ๋น„์œจ ํ• ์ธ์ด ์•„๋‹ˆ๋ผ ํ• ์ธ์ด ์—†๋Š” ํ• ์ธ ์ •์ฑ…, ์š”๊ธˆ+๋น„์œจ ๋ณตํ•ฉ ํ• ์ธ ์ •์ฑ…์€ ์–ด๋–ป๊ฒŒ ํ•  ๊ฒƒ์ธ๊ฐ€? >- ํ• ์ธ์ด ์—†๋Š” ํ• ์ธ ์ •์ฑ…์€ `discountPolicy == null`๋กœ ๋ถ„๊ธฐ์ฒ˜๋ฆฌํ•˜๋ฉด, ์ด๋Š” ์‚ฌ์‹ค ์ƒ ์˜ˆ์™ธ ์ผ€์ด์Šค๊ฐ€ ์ถ”๊ฐ€๋˜๋Š” ๊ฒƒ >- ์˜ˆ์™ธ ์ผ€์ด์Šค๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒƒ์€ ์—ฐ๊ฒฐ๋œ ๋‹ค๋ฅธ ์ฝ”๋“œ์—๋„ ์˜ํ–ฅ์„ ๋ฏธ์นœ๋‹ค >- ์˜ˆ์™ธ ์ผ€์ด์Šค๋ฅผ ์ถ”๊ฐ€ํ•˜์ง€ ๋ง๊ณ  ์ถ”์ƒ ํด๋ž˜์Šค์ธ DiscountPolicy๋ฅผ ์ƒ์†๋ฐ›์€ NoneDiscountPolicy๋ฅผ ๋งŒ๋“ค์–ด์„œ ์‚ฌ์šฉํ•˜๋ฉด ์˜ˆ์™ธ ์ผ€์ด์Šค ์ถ”๊ฐ€ ์—†์ด, ๊ธฐ์กด ํ˜‘๋ ฅ ๋ฐฉ์‹ ๋ณ€๊ฒฝ ์—†์ด๋„ Movie์— ํ• ์ธ์ด ์—†๋Š” ํ• ์ธ ์ •์ฑ…๋„ ์ ์šฉ ๊ฐ€๋Šฅ >- ์š”๊ธˆ+๋น„์œจ ๋ณตํ•ฉ ํ• ์ธ ์ •์ฑ…๋„ ์˜ˆ์™ธ ์ผ€์ด์Šค๋กœ ํ•˜์ง€ ๋ง๊ณ  OverlappedDiscountPolicy๋ฅผ ๋งŒ๋“ค์–ด์„œ ๋ณตํ•ฉ ํ• ์ธ ์ •์ฑ…๋„ ์ ์šฉ ๊ฐ€๋Šฅ #### ์ปจํ…์ŠคํŠธ ํ™•์žฅ์ด๋ž€ ๋Œ€๋žต.. - **์ถ”๊ฐ€๋˜๋Š” ์š”๊ตฌ ์‚ฌํ•ญ์— ๋Œ€ํ•ด ๊ธฐ์กด ์ฝ”๋“œ์— ๊ฐœ๋ณ„ ๋กœ์ง์„ ์ถ”๊ฐ€ํ•ด์„œ ๋Œ€์‘ํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ,** - **์˜์กด ๋Œ€์ƒ์ด ๋˜๋Š” ์ถ”์ƒ์ฒด๋ฅผ ํ™•์žฅํ•˜๋Š” ๊ตฌ์ƒ์ฒด๋ฅผ ์ถ”๊ฐ€ํ•ด์„œ ๊ธฐ์กด ์ฝ”๋“œ ์ˆ˜์ • ์—†์ด๋„ ์ƒˆ๋กœ ์ถ”๊ฐ€๋˜๋Š” ์š”๊ตฌ์‚ฌํ•ญ์„ ์ถฉ์กฑํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ** ## 09. ์œ ์—ฐํ•œ ์„ค๊ณ„ - **์œ ์—ฐํ•œ ์„ค๊ณ„๋ž€ ๋ณ€ํ•˜๋Š” ์š”๊ตฌ์‚ฌํ•ญ์— ๋Œ€ํ•ด ์ฝ”๋“œ์˜ ๋ณ€๊ฒฝ์€ ์ตœ์†Œํ™”ํ•˜๋ฉด์„œ๋„ ๊ธฐ๋Šฅ์€ ์ตœ๋Œ€ํ•œ ํ™•์žฅํ•  ์ˆ˜ ์žˆ๋Š” ์„ค๊ณ„** - OCP, ์ƒ์„ฑ-์‚ฌ์šฉ ๋ถ„๋ฆฌ, DIP, DI ๋“ฑ์˜ ์„ค๊ณ„ ์›์น™์„ ์ค€์ˆ˜ํ•˜๋ฉด ์œ ์—ฐํ•œ ์„ค๊ณ„๋ฅผ ๋งŒ๋“œ๋Š” ๋ฐ ๋„์›€์ด ๋œ๋‹ค. - **์œ ์—ฐํ•œ ์„ค๊ณ„๋Š” ์ปดํŒŒ์ผํƒ€์ž„์˜ ์ •์  ํด๋ž˜์Šค ๊ตฌ์กฐ์™€ ๋Ÿฐํƒ€์ž„์˜ ๋™์  ๊ฐ์ฒด ๊ตฌ์กฐ ์‚ฌ์ด์˜ ์ฐจ์ด์— ๋ฐ”ํƒ•์„ ๋‘”๋‹ค.** - ๋”ฐ๋ผ์„œ **์œ ์—ฐํ•œ ์„ค๊ณ„๋Š” ์ •์ ์œผ๋กœ ์ดํ•ดํ•˜๊ธฐ ๋ณต์žกํ•œ ์„ค๊ณ„๋กœ ์ด์–ด์ง€๋Š” ๊ฒŒ ํ•„์—ฐ์ ์ด๋ฏ€๋กœ ์ ˆ๋Œ€์  ์„ ์ด ์•„๋‹ˆ๋ฉฐ, ์‹ค์ œ๋กœ ์œ ์—ฐ์„ฑ์ด ํ•„์š”ํ•œ ๊ณณ์— ์„ ๋ณ„์ ์œผ๋กœ ์ ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.** - ๋™์ž‘ํ•˜๋Š” ์‹œ์Šคํ…œ์—๋Š” ๋„๋ฉ”์ธ ๋ชจ๋ธ ๋ฟ๋งŒ์•„๋‹ˆ๋ผ ๋„คํŠธ์›Œํ‚น, DB ๋“ฑ ๊ธฐ๊ณ„์ /๊ธฐ์ˆ ์  ๊ฐœ๋…๋„ ํ˜ผ์žฌ - ๋”ฐ๋ผ์„œ **๋„๋ฉ”์ธ ๋ชจ๋ธ๋งŒ์œผ๋กœ๋Š” ๋™์ž‘ํ•˜๋Š” ์‹œ์Šคํ…œ ์ „๋ถ€์— ๋Œ€ํ•œ ์ตœ์ ์˜ ์ฑ…์ž„ ํ• ๋‹น์€ ์‚ฌ์‹ค ์ƒ ๋ถˆ๊ฐ€๋Šฅ**ํ•˜๋ฉฐ, **๋„๋ฉ”์ธ ๊ฐœ๋…์„ ๋„˜์–ด์„œ๋Š” ๋ถ€๋ถ„์€ Pure Fabrication์„ ๋งŒ๋“ค์–ด์„œ ์ฑ…์ž„์„ ๋ถ„๋ฐฐํ•˜๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.** ### p282 #### ๊ฐœ๋ฐฉ-ํ์‡„ ์›์น™(Open-Closed Principle, OCP) >์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ์ฒด(ํด๋ž˜์Šค, ๋ชจ๋“ˆ, ํ•จ์ˆ˜ ๋“ฑ๋“ฑ)๋Š” ํ™•์žฅ์— ๋Œ€ํ•ด ์—ด๋ ค ์žˆ์–ด์•ผ ํ•˜๊ณ , ์ˆ˜์ •์— ๋Œ€ํ•ด์„œ๋Š” ๋‹ซํ˜€ ์žˆ์–ด์•ผ ํ•œ๋‹ค. >by Robert C. Martin - ์•„์ฃผ ์‰ฝ๊ณ  ์งง๊ฒŒ ์จ๋ณด๋ฉด, **๋™์ž‘์„ ํ™•์žฅํ•  ์ˆ˜ ์žˆ๋„๋ก ์—ด๋ ค ์žˆ์–ด์•ผ ํ•˜๊ณ , ๋ณ€๊ฒฝ์ด ์™ธ๋ถ€์— ์˜ํ–ฅ์„ ๋ฏธ์น˜์ง€ ์•Š๋„๋ก ๋‹ซํ˜€ ์žˆ์–ด์•ผ ํ•œ๋‹ค.** ### p284 #### OCP์™€ ์˜์กด์„ฑ >์˜์กด์„ฑ ๊ด€์ ์—์„œ OCP๋ฅผ ๋”ฐ๋ฅด๋Š” ์„ค๊ณ„๋ž€, ์ปดํŒŒ์ผํƒ€์ž„ ์˜์กด์„ฑ์„ ์œ ์ง€ํ•˜๋ฉด์„œ ๋Ÿฐํƒ€์ž„ ์˜์กด์„ฑ์˜ ๊ฐ€๋Šฅ์„ฑ์„ ํ™•์žฅํ•˜๊ณ  ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๋Š” ๊ตฌ์กฐ #### OCP์™€ ์ถ”์ƒํ™” - ์ถ”์ƒํ™”๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ๋ถˆํ•„์š”ํ•œ ๊ฒƒ์„ ์ƒ๋žตํ•˜๋Š” ๊ฒƒ - **OCP๋ฅผ ๋”ฐ๋ฅด๋Š” ์ถ”์ƒํ™”๋Š” ๋ณ€ํ•˜์ง€ ์•Š๋Š” ๋ถ€๋ถ„๋งŒ ๋‚จ๊ฒจ๋‘๊ณ , ๋ณ€ํ•˜๋Š” ๋ถ€๋ถ„์„ ์ƒ๋žตํ•˜๋Š” ๊ฒƒ** - ๋ณ€ํ•˜๋Š” ๋ถ€๋ถ„์„ ์ƒ๋žตํ•ด์•ผ ๋‚˜์ค‘์— ๋ณ€ํ•˜๋Š” ๋ถ€๋ถ„์„ ๋‹ด๋‹นํ•˜๋Š” ๊ตฌ์ƒ์ฒด๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด์„œ ํ™•์žฅ ๊ฐ€๋Šฅ ### p287 #### ์ƒ์„ฑ ์‚ฌ์šฉ ๋ถ„๋ฆฌ(Separation use from creation) >๋™์ผํ•œ ํด๋ž˜์Šค ์•ˆ์—์„œ ๊ฐ์ฒด ์ƒ์„ฑ๊ณผ ์‚ฌ์šฉ์ด๋ผ๋Š” ๋‘ ๊ฐ€์ง€ ์ด์งˆ์ ์ธ ๋ชฉ์ ์„ ๊ฐ€์ง„ ์ฝ”๋“œ๊ฐ€ ๊ณต์กดํ•˜๋Š” ๊ฒƒ์ด ๋ฌธ์ œ - ๊ฐ์ฒด๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ชฝ์—์„œ ์ƒ์„ฑ๊นŒ์ง€ ํ•œ๋‹ค๋ฉด ๊ฒฐํ•ฉ๋„๊ฐ€ ๋†’์•„์ ธ์„œ OCP๋ฅผ ์ค€์ˆ˜ํ•˜๊ธฐ ์–ด๋ ค์›Œ์ง„๋‹ค. - ์‚ฌ์šฉํ•˜๋Š” ์ชฝ์—์„œ๋Š” ์ถ”์ƒํ™” ๋œ ํƒ€์ž…์œผ๋กœ ์ „๋‹ฌ๋ฐ›์•„ ์‚ฌ์šฉํ•˜๋ฉด, ๊ทธ ์ถ”์ƒํ™” ๋œ ํƒ€์ž…์ด ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ๋Š” ์—ฌ๋Ÿฌ ์ปจํ…์ŠคํŠธ์—์„œ OCP๋ฅผ ์ค€์ˆ˜ํ•  ์ˆ˜ ์žˆ๋‹ค. ### p289 #### Factory - **๋Ÿฐํƒ€์ž„์— ์–ด๋–ค ๊ตฌ์ƒ์ฒด๋ฅผ ์‚ฌ์šฉํ• ์ง€๋Š” ๋ณดํ†ต ํด๋ผ์ด์–ธํŠธ์—์„œ ๊ฒฐ์ •ํ•˜๋ฏ€๋กœ, ๊ตฌ์ƒ์ฒด์˜ ์ƒ์„ฑ๋„ ํด๋ผ์ด์–ธํŠธ์—์„œ ๋‹ด๋‹นํ•˜๋Š” ๊ฒƒ์ด ์ ํ•ฉ** - ์ƒ์„ฑ ์ž์ฒด๋„ ํด๋ผ์ด์–ธํŠธ์—์„œ ๋–ผ์–ด๋‚ด๊ณ  ์‹ถ๋‹ค๋ฉด, ์ฆ‰ ์ƒ์„ฑ์— ์ฑ…์ž„๋งŒ ๊ฐ€์ง€๋Š” ํด๋ž˜์Šค๋ฅผ Factory๋ผ๊ณ  ํ•œ๋‹ค. ### p291 #### Representational Decomposition >ํ‘œํ˜„์  ๋ถ„ํ•ด๋Š” ๋„๋ฉ”์ธ์— ์กด์žฌํ•˜๋Š” ์‚ฌ๋ฌผ ๋˜๋Š” ๊ฐœ๋…์„ ํ‘œํ˜„ํ•˜๋Š” ๊ฐ์ฒด๋“ค์„ ์ด์šฉํ•ด ์‹œ์Šคํ…œ์„ ๋ถ„ํ•ดํ•˜๋Š” ๊ฒƒ >by Craig Larman >๋„๋ฉ”์ธ ๋ชจ๋ธ์€ ์„ค๊ณ„๋ฅผ ์œ„ํ•œ ์ค‘์š”ํ•œ ์ถœ๋ฐœ์ ์ด์ง€๋งŒ ๋‹จ์ง€ ์ถœ๋ฐœ์ ์ด๋ผ๋Š” ์‚ฌ์‹ค์„ ๋ช…์‹ฌํ•ด์•ผ ํ•œ๋‹ค. - **๋„๋ฉ”์ธ ๋ชจ๋ธ๋งŒ์œผ๋กœ๋Š” ์„ค๊ณ„๋ฅผ ์™„์„ฑํ•  ์ˆ˜ ์—†๋‹ค**๋Š” ์˜๋ฏธ #### Behavioral Decomposition - ๋™์ž‘ํ•˜๋Š” ์‹œ์Šคํ…œ์—๋Š” ๋„คํŠธ์›Œํฌ ํ†ต์‹ , DB ์ ‘๊ทผ์ฒ˜๋Ÿผ ๋„๋ฉ”์ธ ๋ชจ๋ธ๋กœ๋Š” ํ‘œํ˜„๋˜์ง€ ์•Š๋Š” ๊ธฐ๊ณ„์ /๊ธฐ์ˆ ์  ์š”์†Œ๋“ค์ด ์žˆ๋‹ค. - ์ด๋Ÿฐ ๊ด€์ ์—์„œ ์‹œ์Šคํ…œ์„ ๋ถ„ํ•ดํ•˜๋Š” ๊ฒƒ์„ ํ–‰์œ„์  ๋ถ„ํ•ด๋ผ๊ณ  ํ•œ๋‹ค. #### Pure Fabrication >๋„๋ฉ”์ธ๊ณผ ๋ฌด๊ด€ํ•˜๊ฒŒ ์ฑ…์ž„์„ ํ• ๋‹นํ•˜๊ธฐ ์œ„ํ•ด ์ฐฝ์กฐ๋˜๋Š” ๊ฐ์ฒด๋ฅผ Pure Fabrication(์ˆœ์ˆ˜ ๊ฐ€๊ณต๋ฌผ)์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. >by Craig Larman - **๋„๋ฉ”์ธ ๊ฐ์ฒด๋งŒ์œผ๋กœ ์ฑ…์ž„์„ ๋‚˜๋ˆ„๋ฉด, ๊ธฐ๊ณ„์ /๊ธฐ์ˆ ์  ์š”์†Œ์— ๋Œ€ํ•œ ์ฑ…์ž„๋„ ๋„๋ฉ”์ธ ๊ฐ์ฒด์— ํ• ๋‹น๋  ์ˆ˜ ๋ฐ–์— ์—†์œผ๋ฏ€๋กœ ์‘์ง‘๋„ ์ €ํ•˜, ๊ฒฐํ•ฉ๋„ ์ƒ์Šน ๋“ฑ์˜ ๋ฌธ์ œ ๋ฐœ์ƒ** >์–ด๋–ค ํ–‰๋™์„ ์ถ”๊ฐ€ํ•˜๋ ค๊ณ  ํ•˜๋Š”๋ฐ ์ด ํ–‰๋™์„ ์ฑ…์ž„์งˆ ๋งˆ๋•…ํ•œ ๋„๋ฉ”์ธ ๊ฐœ๋…์ด ์กด์žฌํ•˜์ง€ ์•Š๋Š”๋‹ค๋ฉด Pure Fabrication์„ ์ถ”๊ฐ€ํ•˜๊ณ  ์—ฌ๊ธฐ์— ์ฑ…์ž„์„ ํ• ๋‹นํ•˜๋ผ ### p292 #### Pure Fabrication ํŒจํ„ด๊ณผ Information Expert ํŒจํ„ด >Information Expert ํŒจํ„ด์— ๋”ฐ๋ผ ์ฑ…์ž„์„ ํ• ๋‹นํ•œ ๊ฒฐ๊ณผ๊ฐ€ ๋ฐ”๋žŒ์งํ•˜์ง€ ์•Š์„ ๊ฒฝ์šฐ ๋Œ€์•ˆ์œผ๋กœ Pure Fabrication์„ ์‚ฌ์šฉ - Information Expert ํŒจํ„ด์—์„œ Information์ด๋ž€ ๋„๋ฉ”์ธ ๋ชจ๋ธ ๊ด€์ ์—์„œ์˜ ์ •๋ณด๋ฅผ ์˜๋ฏธํ•œ๋‹ค. - ๋”ฐ๋ผ์„œ **๋„๋ฉ”์ธ ๊ฐœ๋…์—๋งŒ ์˜์กดํ•ด์„œ ์ฑ…์ž„์„ ํ• ๋‹นํ•œ ๊ฒฐ๊ณผ๊ฐ€ ๋‚ฎ์€ ์‘์ง‘๋„, ๋†’์€ ๊ฒฐํ•ฉ๋„๋กœ ๊ท€๊ฒฐ๋œ๋‹ค๋ฉด Pure Fabrication ํŒจํ„ด์„ ๋– ์˜ฌ๋ฆฌ์ž.** ### p293 #### ์˜์กด์„ฑ ์ฃผ์ž… >์˜์กด์„ฑ์„ ๊ฐ์ฒด์˜ ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค์— ๋ช…์‹œ์ ์œผ๋กœ ๋“œ๋Ÿฌ๋‚ด์„œ ํ•„์š”ํ•œ ๋Ÿฐํƒ€์ž„ ์˜์กด์„ฑ์„ ์™ธ๋ถ€์—์„œ ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ• - ๋‚œ ๊ทธ๋ž˜๋„ ์˜์กด ๊ด€๊ณ„ ์ฃผ์ž…์œผ๋กœ ๋ถ€๋ฅด๋ จ๋‹ค. ### p294 #### ์ธํ„ฐํŽ˜์ด์Šค ์ฃผ์ž… - ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฐฉ์‹์ด๋ฉฐ, interface๋ฅผ ํ†ตํ•ด ๋” ๋ช…์‹œ์ ์œผ๋กœ ์„ ์–ธํ•˜๋ฏ€๋กœ ํ‘œํ˜„์€ ๋‹ค๋ฅด์ง€๋งŒ, ๊ฐ์ฒด๊ฐ€ ์ƒ์„ฑ๋œ ํ›„์— ์ฃผ์ž…๋œ๋‹ค๋Š” ๊ด€์ ์—์„œ๋Š” setter ์ฃผ์ž…๊ณผ ๊ฐ™๋‹ค. ```java public interface XXXInjectable { public void inject(XXX xxx); } public YYY implements XXXInjectable { private XXX xxx; @Override public void inject(XXX xxx) { this.xxx = xxx; } } ``` ### p296 #### ์ˆจ๊ฒจ์ง„ ์˜์กด์„ฑ๊ณผ Service Locator ํŒจํ„ด - Service Locator ํŒจํ„ด์„ ์‚ฌ์šฉํ•˜๋ฉด ์˜์กด ๊ด€๊ณ„๊ฐ€ ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค์— ๋“œ๋Ÿฌ๋‚˜์ง€ ์•Š์œผ๋ฏ€๋กœ ์ˆจ๊ฒจ์ง„ ์˜์กด์„ฑ์ด ์กด์žฌํ•˜๊ฒŒ ๋œ๋‹ค. - ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค์— ์˜์กดํ•˜๋Š” ๋‹ค๋ฅธ ๋ถ€๋ถ„์—์„œ๋Š” ์ˆจ๊ฒจ์ง„ ์˜์กด์„ฑ์ด ํ•ด์†Œ๋˜์ง€ ์•Š์€ ๋ถˆ์™„์ „ํ•œ ๊ฐ์ฒด๋ฅผ ์‚ฌ์šฉํ•  ์œ„ํ—˜ ์กด์žฌ - ์ปดํŒŒ์ผํƒ€์ž„์—๋Š” ๋ฐœ์ƒํ•˜์ง€ ์•Š๊ณ  ๋Ÿฐํƒ€์ž„์— ๋ฐœ์ƒํ•˜๋ฏ€๋กœ ์ข‹์ง€ ์•Š์Œ - ์ˆจ๊ฒจ์ง„ ์˜์กด์„ฑ์„ ์•ˆ๋‹ค๋Š” ๊ฒƒ์€ ๋‚ด๋ถ€๋ฅผ ์•ˆ๋‹ค๋Š” ๊ฒƒ์ด๋ฏ€๋กœ ์ •๋ณด ๊ฐ์ถค ์›์น™ ์œ„๋ฐฐ๋ฅผ ์ˆ˜๋ฐ˜ํ•˜๋ฏ€๋กœ ์ข‹์ง€ ์•Š์Œ ### p303 #### ์˜์กด์„ฑ ์—ญ์ „ ์›์น™(Dependency Injection Principle) >๊ตฌ์กฐ์  ๋ถ„์„ ์„ค๊ณ„ ๊ฐ™์€ ์ „ํ†ต์ ์ธ ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ ๋ฐฉ๋ฒ•์—์„œ๋Š” ์ƒ์œ„ ๋ชจ๋“ˆ์ด ํ•˜์œ„ ๋ชจ๋“ˆ์— ์˜์กดํ•˜๋Š” ๊ฒฝํ–ฅ์ด ์žˆ๋‹ค. >์ด๋ฅผ ์—ญ์ „์‹œ์ผœ์„œ ํ•˜์œ„ ๋ชจ๋“ˆ์ด ์ƒ์œ„ ๋ชจ๋“ˆ์— ์˜์กดํ•˜๋„๋ก ํ•ด์•ผ ํ•˜์œ„ ๋ชจ๋“ˆ์—์„œ ๋ฐœ์ƒํ•˜๋Š” ๋ณ€๊ฒฝ์ด ์ƒ์œ„ ๋ชจ๋“ˆ์— ์ „ํŒŒ๋˜์ง€ ์•Š๋Š”๋‹ค. ### DIP์™€ ํŒจํ‚ค์ง€ >- ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์˜์กดํ•˜๋Š” ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ๊ทธ ์ธํ„ฐํŽ˜์ด์Šค ๊ตฌํ˜„์ฒด์™€ ๊ฐ™์€ ํŒจํ‚ค์ง€์— ๋‘๋Š” ๊ฒƒ์ด ์ „ํ†ต์  ๋ฐฉ์‹ >- ์ด ๋ถ€๋ถ„๋„ ์—ญ์ „์‹œ์ผœ์„œ ์ธํ„ฐํŽ˜์ด์Šค๋Š” ๊ทธ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์†ํ•œ ํŒจํ‚ค์ง€์— ๋‘์–ด์•ผ, ํด๋ผ์ด์–ธํŠธ๊ฐ€ ํ•˜์œ„ ๋ชจ๋“ˆ์ด ์žˆ๋Š” ํŒจํ‚ค์ง€์— ์˜์กดํ•˜์ง€ ์•Š๊ฒŒ ๋œ๋‹ค. - ๊ทธ๋Ÿผ ๊ตฌํ˜„์ฒด๊ฐ€ ์†ํ•œ ํŒจํ‚ค์ง€์—์„œ๋Š” ์ปดํŒŒ์ผํƒ€์ž„์— ๊ทธ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์–ด๋–ป๊ฒŒ ์ธ์‹ํ•˜๋‚˜? - **๊ตฌํ˜„์ฒด๊ฐ€ ์†ํ•œ ํŒจํ‚ค์ง€๋Š” ํ•˜์œ„ ํŒจํ‚ค์ง€์ด๋ฉฐ, ํ•˜์œ„ ํŒจํ‚ค์ง€๊ฐ€ ์ธํ„ฐํŽ˜์ด์Šค๊ฐ€ ์†ํ•œ ์ƒ์œ„ ํŒจํ‚ค์ง€์— ์˜์กดํ•˜๋Š” ๊ฒƒ์€ ๋ฌธ์ œ๋˜์ง€ ์•Š์Œ** - ์ฆ‰ ๊ตฌํ˜„์ฒด๊ฐ€ ์†ํ•œ ํ•˜์œ„ ํŒจํ‚ค์ง€๊ฐ€ ์ธํ„ฐํŽ˜์ด์Šค๊ฐ€ ์†ํ•œ ์ƒ์œ„ ํŒจํ‚ค์ง€์— ์˜์กดํ•˜๊ฒŒ ํ•˜๋ฉด ์ปดํŒŒ์ผํƒ€์ž„์— ๋ฌธ์ œ ์—†์ด ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ธ์‹ํ•  ์ˆ˜ ์žˆ๋‹ค. ### p305 #### ์œ ์—ฐ์„ฑ๊ณผ ๋ณต์žก์„ฑ >์œ ์—ฐ์„ฑ์€ ํ•ญ์ƒ ๋ณต์žก์„ฑ์„ ์ˆ˜๋ฐ˜ํ•œ๋‹ค. ์œ ์—ฐํ•˜์ง€ ์•Š์€ ์„ค๊ณ„๋Š” ๋‹จ์ˆœํ•˜๊ณ  ๋ช…ํ™•ํ•˜๋‹ค. ์œ ์—ฐํ•œ ์„ค๊ณ„๋Š” ๋ณต์žกํ•˜๊ณ  ์•”์‹œ์ ์ด๋‹ค. - ๊ทธ๋ ‡๋‹ค. ์Šคํ”„๋ง์ด๋‚˜ ํ•˜์ด๋ฒ„๋„ค์ดํŠธ ๋“ฑ ์ฃผ์š” ํ”„๋ ˆ์ž„์›Œํฌ์˜ ์†Œ์Šค๋ฅผ ๊ฐ€๋” ๋ณด๋‹ค๋ณด๋ฉด, ๊ฒฐํ•ฉ๋„๋Š” ๋‚ฎ๊ณ , ์‘์ง‘๋„๋Š” ๋†’๊ณ , ์œ ์—ฐ์„ฑ์€ ๋†’์€ ์ข‹์€ ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๊ฒ ์ง€๋งŒ ๋‹จ์ˆœํ•˜๊ฒŒ ์ƒ๊ฐํ•˜๋ฉด ๋„ˆ๋ฌด ๋ณต์žกํ•˜๊ฒŒ ์–ฝํ˜€์žˆ์–ด์„œ ์ดํ•ดํ•˜๊ธฐ ์–ด๋ ค์šด ๋ฉด์ด ์žˆ๋‹ค. >์„ค๊ณ„๊ฐ€ ์œ ์—ฐํ• ์ˆ˜๋ก ํด๋ž˜์Šค ๊ตฌ์กฐ์™€ ๊ฐ์ฒด ๊ตฌ์กฐ ์‚ฌ์ด์˜ ๊ฑฐ๋ฆฌ๋Š” ์ ์  ๋ฉ€์–ด์ง„๋‹ค. - ์œ ์—ฐ์„ฑ์€ ๊ฒฐ๊ตญ ๋Ÿฐํƒ€์ž„์— ๊ตฌ์ƒ์ฒด๋ฅผ ๊ต์ฒดํ•  ์ˆ˜ ์žˆ์Œ์„ ์˜๋ฏธํ•˜๋ฉฐ, ์ด๋Š” ์ปดํŒŒ์ผํƒ€์ž„์˜ ์ •์  ํด๋ž˜์Šค ๊ตฌ์กฐ์™€ ๋Ÿฐํƒ€์ž„์˜ ๋™์  ๊ฐ์ฒด ๊ตฌ์กฐ๊ฐ€ ๋‹ค๋ฅด๋‹ค๋Š” ์‚ฌ์‹ค์— ๋ฐ”ํƒ•์„ ๋‘”๋‹ค. ๋”ฐ๋ผ์„œ ์œ ์—ฐ์„ฑ์ด ๋†’์•„์ง€๋ฉด ํด๋ž˜์Šค ๊ตฌ์กฐ์™€ ๊ฐ์ฒด ๊ตฌ์กฐ ์‚ฌ์ด์˜ ๊ฑฐ๋ฆฌ๊ฐ€ ๋ฉ€์–ด์ง„๋‹ค. ### p307 #### ์˜์กด์„ฑ๊ณผ ์—ญํ• , ์ฑ…์ž„, ํ˜‘๋ ฅ ์˜์กด์„ฑ์„ ๊ด€๋ฆฌํ•ด์•ผ ํ•˜๋Š” ์ด์œ ๋Š” ๊ฒฐ๊ตญ ๋ณ€๊ฒฝ์˜ ์ „ํŒŒ๋ฅผ ์ตœ์†Œํ™”ํ•˜๋Š” ๋ฐ ์žˆ๊ณ , ๋ณ€๊ฒฝ์˜ ์ „ํŒŒ๋ฅผ ์ตœ์†Œํ™”ํ•˜๋ ค๋ฉด ์—ญํ• , ์ฑ…์ž„, ํ˜‘๋ ฅ์— ๋จผ์ € ์ค‘์ ์„ ๋‘๊ณ  ๊ฐ์ฒด์˜ ์ƒ์„ฑ์€ ๋‚˜์ค‘์— ๊ฒฐ์ •ํ•ด์•ผ ํ•œ๋‹ค. ## 10. ์ƒ์†๊ณผ ์ฝ”๋“œ ์žฌ์‚ฌ์šฉ - ์ค‘๋ณต์„ ์ œ๊ฑฐํ•˜๊ธฐ ์œ„ํ•ด ํƒ€์ž… ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ , ํƒ€์ž… ์ฝ”๋“œ๋ฅผ ์กฐ๊ฑด์œผ๋กœ ๋กœ์ง์„ ๋ถ„๊ธฐํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์‘์ง‘๋„๋ฅผ ๋‚ฎ์ถ”๊ณ  ๊ฒฐํ•ฉ๋„๋ฅผ ๋†’์ด๋ฉฐ ๊ฐ์ฒด์ง€ํ–ฅ์ ์ด์ง€ ์•Š๋‹ค. - **์˜ค๋กœ์ง€ ์ค‘๋ณต์„ ์ œ๊ฑฐํ•˜๊ธฐ ์œ„ํ•ด ์ƒ์†์ด๋ผ๋Š” ๊ฐ์ฒด์ง€ํ–ฅ์˜ ๋„๊ตฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ๋Œ€๊ฐœ ๋ฐ”๋žŒ์งํ•˜์ง€ ์•Š๋‹ค.** - ์™œ๋ƒํ•˜๋ฉด ์ƒ์†์€ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ณธ์—ฐ์˜ ๋‹จ์ ์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. - **๋ถ€๋ชจ ํด๋ž˜์Šค๋Š” ์–ด๋–ค ๋ฉ”์„œ๋“œ๊ฐ€ ์ž์‹ ํด๋ž˜์Šค์—์„œ override ๋˜๋Š”์ง€ ๋ชจ๋ฅด๋ฏ€๋กœ, ๋ถ€๋ชจ ๋ณ€๊ฒฝ ์‹œ override ๊ด€๋ จ ๋‚ด์šฉ์„ ๋ชจ๋‘ ๋ถ„์„ํ•ด์•ผ ํ•˜๋ฉฐ, ์ด๋Š” ์ •๋ณด ๊ฐ์ถค๊ณผ ์บก์Аํ™”๋ฅผ ๊นจ๊ฒŒ ๋œ๋‹ค.** - **์ผ๋ฐ˜ ๊ฐ์ฒด ์ฐธ์กฐ๋Š” ๋‹จ๋ฐฉํ–ฅ์ด์ง€๋งŒ, ๋ถ€๋ชจ-์ž์‹ ๊ด€๊ณ„์—์„œ๋Š” ์ฝ”๋“œ์— ๋“œ๋Ÿฌ๋‚˜์ง€ ์•Š์€ ์ฑ„๋กœ ์–‘๋ฐฉํ–ฅ ํ˜ธ์ถœ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.** - **๋ถ€๋ชจ ํด๋ž˜์Šค์— ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๊ฐ€ ์ถ”๊ฐ€๋˜๋ฉด ์ž์‹ ํด๋ž˜์Šค์—๋„ ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜ ๊ด€๋ จ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด์•ผ ํ•œ๋‹ค.** - ๋”ฐ๋ผ์„œ **์ƒ์†์€ ๋„๋ฉ”์ธ ๊ฐœ๋…์ƒ ์ƒ์† ๊ด€๊ณ„๊ฐ€ ๋ช…ํ™•ํ•  ๋•Œ๋งŒ ์ œํ•œ์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๊ณ , ์ค‘๋ณต ์ œ๊ฑฐ ๋ฐ ์ฝ”๋“œ ์žฌ์‚ฌ์šฉ์„ ์œ„ํ•ด์„œ๋Š” ์ƒ์†๋ณด๋‹ค ํ•ฉ์„ฑ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ๋‚ซ๋‹ค.** - **์ƒ์†์„ ์‚ฌ์šฉํ•˜๋”๋ผ๋„ `abstract` ํ‚ค์›Œ๋“œ๋ฅผ ํด๋ž˜์Šค์™€ ๋ฉ”์„œ๋“œ์— ์ ์ ˆํžˆ ์‚ฌ์šฉํ•ด์„œ ์˜๋„๋ฅผ ๋ช…ํ™•ํžˆ ๋“œ๋Ÿฌ๋‚ด๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.** ### p309 #### ์ค‘๋ณต ์ฝ”๋“œ >์š”๊ตฌ์‚ฌํ•ญ์ด ๋ณ€๊ฒฝ๋์„ ๋•Œ ๋‘ ์ฝ”๋“œ๋ฅผ ํ•จ๊ป˜ ์ˆ˜์ •ํ•ด์•ผ ํ•œ๋‹ค๋ฉด ์ด ์ฝ”๋“œ๋Š” ์ค‘๋ณต์ด๋‹ค. >ํ•จ๊ป˜ ์ˆ˜์ •ํ•  ํ•„์š”๊ฐ€ ์—†๋‹ค๋ฉด ์ค‘๋ณต์ด ์•„๋‹ˆ๋‹ค. - ๋‚ด์šฉ์ ์œผ๋กœ ๊ฐ™๋‹ค๊ณ  ํ•˜๋”๋ผ๋„ ์‚ฌ์šฉ๋˜๋Š” ์œ„์น˜์™€ ์‹œ์ ์ด ๋‹ค๋ฅด๋‹ค๋ฉด ์š”๊ตฌ์‚ฌํ•ญ์ด ๋ณ€๊ฒฝ๋์„ ๋•Œ ํ•จ๊ป˜ ์ˆ˜์ •๋˜์ง€ ์•Š๋Š” ๋•Œ๋„ ์žˆ๋‹ค. - ์ด๋Ÿฐ ์ค‘๋ณต์€ ์ œ๊ฑฐํ•ด์•ผํ•  ํ•ด๋กœ์šด ์ค‘๋ณต์ด ์•„๋‹ˆ๋ผ, ๊ทธ์ € ํ˜„ ์‹œ์ , ํ˜„ ์ƒํ™ฉ์—์„œ ํ•˜๋Š” ์ผ์ด ๊ฐ™์„ ๋ฟ์ด๋‹ค. ### p314 #### ์ค‘๋ณต์˜ ํํ•ด - ๋น„์Šทํ•œ ๊ธฐ๋Šฅ/์—ญํ• ์„ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฐ€์žฅ ์‰ฌ์šด ๋ฐฉ๋ฒ•์€ ๋ณต๋ถ™. ๋”ฐ๋ผ์„œ ๋ณต๋ถ™์˜ ๊ฐ•๋ ฅํ•œ ์œ ํ˜น์„ ๋ฟŒ๋ฆฌ์น˜์ง€ ๋ชปํ•˜๋ฉด ์ค‘๋ณต ์ฝ”๋“œ๊ฐ€ ์•„์ฃผ ์‰ฝ๊ฒŒ ์ž๋ผ๋‚œ๋‹ค. - **์ค‘๋ณต๋œ ์ฝ”๋“œ์— ๋ณ€๊ฒฝ์ด ํ•„์š”ํ•˜๋ฉด ์ค‘๋ณต๋œ ๋ชจ๋“  ๊ณณ์— ๋ณ€๊ฒฝ์„ ์ ์šฉํ•ด์•ผํ•˜์ง€๋งŒ, ๋ณ€๊ฒฝ์„ ์ ์šฉํ•˜๋Š” ์ž…์žฅ์—์„œ๋Š” ์ค‘๋ณต๋œ ๋ชจ๋“  ๊ณณ์„ ํŒŒ์•…ํ•ด์„œ ๋ชจ๋‘ ์ ์šฉํ•œ๋‹ค๋Š” ๋ณด์žฅ์ด ์—†์œผ๋ฏ€๋กœ, ๋ณ€๊ฒฝ์ด ์ ์šฉ๋˜์ง€ ์•Š์€ ๊ณณ์—์„œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.** - **์ค‘๋ณต๋œ ๊ณณ์„ ๋ชจ๋‘ ํŒŒ์•…ํ•˜๊ณ  ์ ์šฉํ•ด์„œ ์˜ค๋ฅ˜๊ฐ€ ์—†๋‹ค ํ•˜๋”๋ผ๋„ ๊ฒฐ๊ตญ ์ค‘๋ณต์„ ์ฆํญ์‹œํ‚จ ๊ฒฐ๊ณผ๋ฐ–์— ์•ˆ ๋œ๋‹ค.** ### p316 #### ํƒ€์ž… ์ฝ”๋“œ - ์ค‘๋ณต์„ ํ”ผํ•˜๊ธฐ ์œ„ํ•œ ๊ฐ€์žฅ ๊ฐ„๋‹จํ•œ ๋ฐฉ๋ฒ• - ์ค‘๋ณต๋˜๋Š” ๋ถ€๋ถ„์€ ํ•˜๋‚˜๋กœ ํ•ฉ์น˜๊ณ , ์ค‘๋ณต๋˜์ง€ ์•Š๋Š” ๋ถ€๋ถ„์€ ํƒ€์ž…์„ ์กฐ๊ฑด์œผ๋กœ ๋ถ„๊ธฐํ•ด์„œ ์ฒ˜๋ฆฌ - ๋‚ฎ์€ ์‘์ง‘๋„, ๋†’์€ ๊ฒฐํ•ฉ๋„๋กœ ์ด์–ด์ง ### p320 #### ์ƒ์†์˜ ๋‹จ์  >์ผ๋ฐ˜ ์š”๊ธˆ ๊ณ„์‚ฐ์ด ๋ถ€๋ชจ ํด๋ž˜์Šค, ์‹ฌ์•ผ ์š”๊ธˆ ๊ณ„์‚ฐ์ด ์ž์‹ ํด๋ž˜์Šค์ธ ์‚ฌ๋ก€ > - `์ผ๋ฐ˜ ์‹œ๊ฐ„๋Œ€์˜ ์ผ๋ฐ˜ ์š”๊ธˆ + ์‹ฌ์•ผ ์‹œ๊ฐ„๋Œ€์˜ ์ผ๋ฐ˜ ์š”๊ธˆ`์ด ์•„๋‹ˆ๋ผ `์ „์ฒด ์‹œ๊ฐ„๋Œ€์˜ ์ผ๋ฐ˜ ์š”๊ธˆ - ์‹ฌ์•ผ ์‹œ๊ฐ„๋Œ€์˜ ์ผ๋ฐ˜ ์š”๊ธˆ`์œผ๋กœ ๊ณ„์‚ฐํ•˜๋Š” ์ผ€์ด์Šค - ์ž์‹ ํด๋ž˜์Šค ์ž‘์„ฑ์ž๊ฐ€ ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ ๋‚ด๋ถ€ ๊ตฌํ˜„์— ๋Œ€ํ•ด ์ •ํ™•ํ•œ ์ง€์‹์„ ๊ฐ€์ ธ์•ผ ํ•œ๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•œ๋‹ค. - ์ด๋Š” ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ ๋ณ€๊ฒฝ์ด ๋‹ซํ˜€์žˆ์ง€ ์•Š๊ณ  ์ž์‹ ํด๋ž˜์Šค์— ์—ด๋ ค ์žˆ๋‹ค๋Š” ์˜๋ฏธ์ด๋ฉฐ, ๋ชจ๋“  ์ž์‹ ํด๋ž˜์Šค์— ๋ฏธ์น˜๋Š” ์˜ํ–ฅ์„ ๋ถ„์„ํ•ด์•ผ ์•ˆ์ „์„ฑ์„ ๋ณด์žฅํ•  ์ˆ˜ ์žˆ๋‹ค. - ์ค‘๋ณต ์ œ๊ฑฐ๋ฅผ ์œ„ํ•ด ์ƒ์†์„ ์‚ฌ์šฉํ–ˆ์ง€๋งŒ, ์„ธ๊ธˆ ๋ถ€๊ณผ๋ผ๋Š” ์š”๊ตฌ์‚ฌํ•ญ ์ถฉ์กฑ์„ ์œ„ํ•ด ๋ถ€๋ชจ ํด๋ž˜์Šค์™€ ์ž์‹ ํด๋ž˜์Šค ๋ชจ๋‘์— ์ค‘๋ณต ์ฝ”๋“œ ์ž‘์„ฑ >์ž์‹ ํด๋ž˜์Šค ๋ฉ”์„œ๋“œ ์•ˆ์—์„œ super ์ฐธ์กฐ๋ฅผ ์ด์šฉํ•ด ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ ๋ฉ”์„œ๋“œ๋ฅผ ์ง์ ‘ ํ˜ธ์ถœํ•  ๊ฒฝ์šฐ ๋‘ ํด๋ž˜์Šค๋Š” ๊ฐ•ํ•˜๊ฒŒ ๊ฒฐํ•ฉ๋œ๋‹ค. - ์ด ๋ถ€๋ถ„์€ ๋ถ€์—ฐ ์„ค๋ช…์ด ์žˆ์œผ๋ฉด ์ข‹๊ฒ ๋‹ค. ์ƒ์† ์ž์ฒด๊ฐ€ ๊ตฌ์กฐ์ ์œผ๋กœ ๊ฐ•๊ฒฐํ•ฉ์„ ๋ง‰์ง€ ๋ชปํ•˜๋Š” ํ•œ๊ณ„๊ฐ€ ์žˆ๋Š” ๊ฒƒ์ด์ง€, super ์ฐธ์กฐ๋ฅผ ํ†ตํ•œ ํ˜ธ์ถœ์ด ๊ฐ•๊ฒฐํ•ฉ์„ ์œ ๋ฐœํ•˜๋Š” ๊ฑธ๊นŒ? ### p323 #### Fragile Base Class ๋ฌธ์ œ - ์ฑ…์—๋Š” ์ฝ”๋“œ๊ฐ€ ์—†๋Š”๋ฐ ์œ„ํ‚คํ”ผ๋””์•„์— ์žˆ๋Š” [Fragile Base Class](https://en.wikipedia.org/wiki/Fragile_base_class) ์˜ˆ์ œ๋ฅผ ๋ณด๋ฉด ๋” ์‰ฝ๊ฒŒ ์•Œ ์ˆ˜ ์žˆ๋‹ค. ```java class Super { private int counter = 0; void inc1() { counter++; // inc2(); ๋กœ ๋ฐ”๊พผ๋‹ค๋ฉด? } void inc2() { counter++; } } class Sub extends Super { @Override void inc2() { inc1(); } } ``` - ์•„๋ž˜์™€ ๊ฐ™์ด ์ผ์ƒ์ ์ธ Super, Sub ๊ด€๊ณ„๋กœ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์„ ๋•Œ, ```java Super super = new Sub(); ``` - Super ์— ์žˆ๋Š” `void inc1() { counter++; }`๋ฅผ `void inc1() { inc2(); }`๋กœ ๋ณ€๊ฒฝํ•˜๋ฉด ์–ด๋–ป๊ฒŒ ๋ ๊นŒ? - ์ด๋Š” ๊ฒฐ๊ตญ `void inc1() { sub.inc2(); }`๊ฐ€ ๋˜๋ฏ€๋กœ `sub.inc2() -> super.inc2() -> sub.inc2() ...` ์ด๋Ÿฐ ๋ฌดํ•œ๋ฃจํ”„๊ฐ€ ๋œ๋‹ค. - ๋ถ€๋ชจ ํด๋ž˜์Šค์—์„œ ํ˜ธ์ถœํ•˜๋Š” ๋ถ€๋ชจ ํด๋ž˜์Šค ๋‚ด์˜ non-private ๋ฉ”์„œ๋“œ๊ฐ€ ์ž์‹ ํด๋ž˜์Šค์—์„œ override ๋˜์–ด์žˆ๋Š”์ง€ ์•„๋‹Œ์ง€ ๋ถ€๋ชจ ํด๋ž˜์Šค ๋‚ด์—์„œ๋Š” ์•Œ ์ˆ˜๊ฐ€ ์—†๋‹ค. - ์‹ฌ์ง€์–ด **๋ถ€๋ชจ ํด๋ž˜์Šค๋Š” abstract๋กœ ์„ ์–ธ๋˜์ง€ ์•Š๋Š” ํ•œ ์ž๊ธฐ๊ฐ€ ๋ถ€๋ชจ ํด๋ž˜์Šค์ธ์ง€ ์กฐ์ฐจ๋„ ๋ชจ๋ฅธ๋‹ค.** - **override๊ฐ€ ๋˜์–ด ์žˆ์ง€ ์•Š๋‹ค๊ณ  ๊ฐ€์ •ํ•˜๊ณ  ๋ฐ˜์˜ํ•œ ์ˆ˜์ •์‚ฌํ•ญ์€, ์œ„์™€ ๊ฐ™์ด ์‹ค์ œ๋กœ๋Š” override ๋ผ์žˆ๋Š” ๊ฒฝ์šฐ์—๋Š” ์˜ค๋ฅ˜๋ฅผ ๋ฐœ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค.** - ๋”ฐ๋ผ์„œ ๋ณ€๊ฒฝํ•ด๋„ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š์Œ์„ ๋ณด์žฅํ•˜๋ ค๋ฉด ๋ชจ๋“  ์ž์‹ ํด๋ž˜์Šค๋ฅผ ์กฐ์‚ฌํ•ด์„œ override ์—ฌ๋ถ€์™€ ๊ทธ์— ๋”ฐ๋ฅธ ์˜ค๋™์ž‘ ์—ฌ๋ถ€๋ฅผ ๋ชจ๋‘ ์ ๊ฒ€ํ•ด์•ผ ํ•œ๋‹ค. - ์ฆ‰, **์ •์ƒ ๋™์ž‘์„ ๋ณด์žฅํ•˜๋ ค๋ฉด ์ž์‹ ํด๋ž˜์Šค์˜ ๊ตฌ์ฒด ๋‚ด์šฉ์„ ์•Œ์•„์•ผ๋งŒ ํ•˜๋ฏ€๋กœ ๊ฒฐํ•ฉ๋„๊ฐ€ ๋†’์•„์ง„๋‹ค.** #### (์ฑ…์— ์—†๋Š” ๋‚ด์šฉ) ์ผ๋ฐ˜์ ์ธ ๊ฐ์ฒด ์ฐธ์กฐ์™€ ์ƒ์† ๊ด€๊ณ„ ์ฐธ์กฐ์˜ ์ฐจ์ด - ์•„๋ž˜์™€ ๊ฐ™์€ ์ผ๋ฐ˜์ ์ธ ๊ฐ์ฒด ์ฐธ์กฐ๋Š” ๋‹จ๋ฐฉํ–ฅ์ด๋‹ค. A๋Š” B๋ฅผ ์•Œ์ง€๋งŒ B๋Š” A๋ฅผ ๋ชจ๋ฅธ๋‹ค. ```java class A { private B b; public void a1() { b.b1(); } } class B { public void b1() { ... } } ``` - ํ•˜์ง€๋งŒ ์œ„ Fragile Base Class์—์„œ ์‚ดํŽด๋ณธ ๊ฒƒ์ฒ˜๋Ÿผ, ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ non-private ๋ฉ”์„œ๋“œ๋Š” ์ž์‹ ํด๋ž˜์Šค์—์„œ override ๋  ์ˆ˜ ์žˆ๊ณ , ๋ถ€๋ชจ ํด๋ž˜์Šค์—์„œ๋Š” ์ž์‹ ํด๋ž˜์Šค์—์„œ override ๋œ ๋ฉ”์„œ๋“œ๋ฅผ ํ˜ธ์ถœํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ **์ƒ์† ๊ด€๊ณ„์—์„œ๋Š” ์–‘๋ฐฉํ–ฅ ํ˜ธ์ถœ์ด ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋‹ค.** ### p324 #### ๋ถˆํ•„์š”ํ•œ ์ธํ„ฐํŽ˜์ด์Šค ์ƒ์† >- Stack์ด Vector๋ฅผ ์ƒ์†ํ•œ ์‚ฌ๋ก€ > - Stack์—์„œ add(index, value), remove(index)๋„ ๊ฐ€๋Šฅ >- Properties๊ฐ€ Map์„ ์ƒ์†ํ•œ ์‚ฌ๋ก€ > - Properties์—์„œ put(stringKey, nonStringValue)๋กœ ๊ฐ’ ๋„ฃ๊ธฐ ๊ฐ€๋Šฅ > - Properties์—์„œ get(stringKey)์˜ ๊ฐ’์ด nonStringValue์ด๋ฉด ์‹ค์ œ null์ด ์•„๋‹Œ ๋ฐ๋„ null ๋ฐ˜ํ™˜ > >**๋‹จ์ˆœํžˆ ์ฝ”๋“œ๋ฅผ ์žฌ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋ถˆํ•„์š”ํ•œ ์˜คํผ๋ ˆ์ด์…˜์ด ์ธํ„ฐํŽ˜์ด์Šค์— ์Šค๋ฉฐ๋“ค๋„๋ก ๋ฐฉ์น˜ํ•ด์„œ๋Š” ์•ˆ ๋œ๋‹ค.** ### p326 #### ๋ฉ”์„œ๋“œ ์˜ค๋ฒ„๋ผ์ด๋”ฉ ์˜ค์ž‘์šฉ >Effective Java์— ๋‚˜์˜จ HashSet, InstrumentedHashSet์˜ ์›์†Œ count ์‚ฌ๋ก€ - ์œ„ ์ผ๋ฐ˜์ ์ธ ๊ฐ์ฒด ์ฐธ์กฐ์™€ ์ƒ์† ๊ด€๊ณ„ ์ฐธ์กฐ์˜ ์ฐจ์ด์—์„œ ์„ค๋ช…ํ•œ ๊ฒƒ์ฒ˜๋Ÿผ ๋‚ด๋ถ€๋ฅผ ์•Œ์•„์•ผ๋งŒ ์•ˆ์ „์„ฑ์„ ๋ณด์žฅ๋ฐ›์„ ์ˆ˜ ์žˆ๋‹ค๋ฉด, ๊ฐ์ฒด์ง€ํ–ฅ์˜ ์ •๋ณด ๊ฐ์ถค, ์บก์Аํ™”๋Š” ๊นจ์ง„๋‹ค. ### p329 #### ๋ถ€๋ชจ ํด๋ž˜์Šค์™€ ์ž์‹ ํด๋ž˜์Šค ๋™์‹œ ์ˆ˜์ • ๋ฌธ์ œ >-๋…ธ๋ž˜ ๋ชฉ๋ก๋งŒ ๊ด€๋ฆฌํ•˜๋˜ Playlist, PersonalPlayList์—์„œ > - Playlist์— <singer, title>์ด ์ถ”๊ฐ€๋˜๋ฉด PersonalPlaylist์—๋„ ์ˆ˜์ •์ด ํ•„์š”ํ•ด์ง€๋Š” ์‚ฌ๋ก€ - override๊ฐ€ ์—†๋Š” ๋ฐ๋„ ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ!! - **๋ถ€๋ชจ ํด๋ž˜์Šค์— ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๊ฐ€ ์ถ”๊ฐ€๋˜๋ฉด ์ž์‹ ํด๋ž˜์Šค์—๋Š” ์ด๋ฅผ ์ดˆ๊ธฐํ™”ํ•ด์ค„ ์ฝ”๋“œ๊ฐ€ ๋ฐ˜๋“œ์‹œ ์ถ”๊ฐ€๋ผ์•ผํ•˜๋Š” ๊ฒฐํ•ฉ์ด ๋ฐœ์ƒํ•˜๋ฉฐ, ์ด๋ฅผ ์šฐํšŒํ•  ๋ฐฉ๋ฒ•์€ ์—†๋‹ค.** ### p332 #### ์ƒ์†์„ ์“ฐ๋ฉด์„œ๋„ ์•ˆ์ •์„ฑ์„ ๋†’์ด๋Š” ๋ฆฌํŒฉํ„ฐ๋ง >1. ๋ถ€๋ชจ, ์ž์‹์—์„œ ์ฐจ์ด๋‚˜๋Š” ๋ถ€๋ถ„์„ ๊ฐ๊ฐ ๋ณ„๋„์˜ private ๋ฉ”์„œ๋“œ๋กœ ๋ถ„๋ฆฌ > - ๊ตฌํ˜„์€ ๋‹ค๋ฅด์ง€๋งŒ signature๋Š” ๊ฐ™๋‹ค. >2. ์ฐจ์ด๋‚˜๋Š” ๋ถ€๋ถ„์„ ๋œ์–ด๋‚ธ ๊ฒฐ๊ณผ ๊ณตํ†ต๋˜๋Š” ๋ถ€๋ถ„(์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜ ํฌํ•จ)์„ abstract ํด๋ž˜์Šค๋กœ ์˜ฌ๋ฆผ > - abstract ํ‚ค์›Œ๋“œ๊ฐ€ ์ƒ์†์ด ๋œ๋‹ค๋Š” ๋ช…ํ™•ํ•œ ์˜๋„๋ฅผ ๋“œ๋Ÿฌ๋‚ธ๋‹ค. >3. 1์—์„œ ๋ถ„๋ฆฌ๋œ ๋ฉ”์„œ๋“œ์˜ signature ๊ทธ๋Œ€๋กœ abstract ํด๋ž˜์Šค์— abstract ๋ฉ”์„œ๋“œ๋กœ ์„ ์–ธ > - abstract ํ‚ค์›Œ๋“œ๊ฐ€ ์ž์‹ ํด๋ž˜์Šค์—์„œ override ๋œ๋‹ค๋Š” ๋ช…ํ™•ํ•œ ์˜๋„๋ฅผ ๋“œ๋Ÿฌ๋‚ธ๋‹ค. - `abstract` ํ‚ค์›Œ๋“œ๋ฅผ ํด๋ž˜์Šค์™€ ๋ฉ”์„œ๋“œ์— ์ ์ ˆํžˆ ์‚ฌ์šฉํ•ด์„œ ์ƒ์† ๊ตฌ์กฐ์—์„œ ๋ฐœ์ƒํ•˜๋Š” ๋ถˆ์•ˆ์ •์„ฑ์„ ์ค„์ธ๋‹ค. - ์ƒ์œ„ `abstract` ํด๋ž˜์Šค์—์„œ๋Š” `abstract`๋กœ ์„ ์–ธ๋œ ์ถ”์ƒ ๋ฉ”์„œ๋“œ์—๋งŒ ์˜์กดํ•  ๋ฟ ํ•˜์œ„ ๊ตฌ์ฒด ํด๋ž˜์Šค์— ์˜์กดํ•˜์ง€ ์•Š๋Š”๋‹ค. - ํ•˜์œ„ ๊ตฌ์ฒด ํด๋ž˜์Šค์— ์˜์กดํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ ํ•˜์œ„ ๊ตฌ์ฒด ํด๋ž˜์Šค๋ฅผ ํ†ตํ•ด ๊ธฐ๋Šฅ ํ™•์žฅ์ด ๊ฐ€๋Šฅํ•˜๋„๋ก ์—ด์–ด๋‘”๋‹ค. - ์™ธ๋ถ€์—์„œ๋Š” ํ•˜์œ„ ๊ตฌ์ฒด ํด๋ž˜์Šค๊ฐ€ ์•„๋‹ˆ๋ผ ์ƒ์œ„ ์ถ”์ƒ ํด๋ž˜์Šค์— ์˜์กดํ•œ๋‹ค. ### p345 #### ์ƒ์†, ์ž˜ ์จ์•ผ.. >์ƒ์†์€ ์ฝ”๋“œ ์ค‘๋ณต์„ ์ œ๊ฑฐํ•˜๊ณ  ์žฌ์‚ฌ์šฉ์„ฑ์„ ๋†’์ผ ์ˆ˜ ์žˆ๋Š” ๊ฐ€์žฅ ์œ ๋ช…ํ•œ ๋ฐฉ๋ฒ• >ํ•˜์ง€๋งŒ ์ƒ์†์˜ ์˜ค๋‚จ์šฉ์€ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ดํ•ดํ•˜๊ณ  ํ™•์žฅํ•˜๊ธฐ ์–ด๋ ต๊ฒŒ ๋งŒ๋“ ๋‹ค. - ์ƒ์†์€ ์ฝ”๋“œ ์žฌ์‚ฌ์šฉ๋งŒ์„ ๋ชฉ์ ์œผ๋กœ ์ ์šฉํ•˜๊ธฐ์—” ๋‹จ์ ์ด ๋งŽ๋‹ค. - **๊ฐœ๋…์ƒ ์ƒ์†์ด ๋ช…ํ™•ํ•œ ๊ฒฝ์šฐ์—๋งŒ ์ œํ•œ์ ์œผ๋กœ ์ƒ์†์„ ์‚ฌ์šฉํ•˜๊ณ , ์ฝ”๋“œ ์žฌ์‚ฌ์šฉ์ด ๋ชฉ์ ์ด๋ผ๋ฉด ์ƒ์†๋ณด๋‹ค ํ•ฉ์„ฑ์„ ์‚ฌ์šฉํ•˜์ž.** ## 11. ํ•ฉ์„ฑ๊ณผ ์œ ์—ฐํ•œ ์„ค๊ณ„ - ๊ตฌํ˜„ ์ƒ์†์€ ์กฐํ•ฉ์ด ๋งŽ์•„์ง€๋ฉด ์„œ๋ธŒํด๋ž˜์Šค๊ฐ€ ๋งŽ์•„์ง€๊ณ  ์ค‘๋ณต ์ฝ”๋“œ๋„ ๋งŽ์•„์ง„๋‹ค. - ํ•ฉ์„ฑ์€ ์ปดํŒŒ์ผํƒ€์ž„์—๋Š” ์ธํ„ฐํŽ˜์ด์Šค์—๋งŒ ์˜์กดํ•˜๊ณ  ๋Ÿฐํƒ€์ž„์— ๊ตฌํ˜„์ฒด๋ฅผ ์ฃผ์ž…ํ•ด์„œ ์“ธ ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ ๋ถˆํ•„์š”ํ•œ ๊ฒฐํ•ฉ๋„ ์ƒ์Šน์ด ๋ฐœ์ƒํ•˜์ง€ ์•Š๋Š”๋‹ค. - **์ƒ์†์€ ๋ถ€๋ชจํด๋ž˜์Šค์˜ ๊ตฌํ˜„๋ถ€๋ฅผ ์žฌ์‚ฌ์šฉ, ํ•ฉ์„ฑ์€ ํฌํ•จ๋˜๋Š” ๊ฐ์ฒด์˜ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์žฌ์‚ฌ์šฉ** ### p347 #### ์žฌ์‚ฌ์šฉ์˜ ๋Œ€์ƒ >์ƒ์†์€ ๋ถ€๋ชจ ํด๋ž˜์Šค ์•ˆ์— ๊ตฌํ˜„๋œ ์ฝ”๋“œ ์ž์ฒด๋ฅผ ์žฌ์‚ฌ์šฉ >ํ•ฉ์„ฑ์€ ํฌํ•จ๋˜๋Š” ๊ฐ์ฒด์˜ ํผ๋ธ”๋ฆญ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์žฌ์‚ฌ์šฉ - ๊ฒฐ๊ตญ ํ•ฉ์„ฑ์„ ์‚ฌ์šฉํ•˜๋ฉด ๋Ÿฐํƒ€์ž„์— ์˜์กด ๊ด€๊ณ„๋ฅผ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์–ด ๋” ์œ ์—ฐํ•œ ์„ค๊ณ„ ### p352 #### ๋ชฝํ‚ค ํŒจ์น˜ - ํŠน์ • ๋ชจ๋“ˆ(ํด๋ž˜์Šค ๋“ฑ)์— ๋Œ€ํ•œ ์ˆ˜์ • ๊ถŒํ•œ์ด ์—†๋”๋ผ๋„ ํ˜„์žฌ ์‹คํ–‰ ์ค‘์ธ ํ™˜๊ฒฝ์— ํ•œํ•ด์„œ ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ• - ๋ฃจ๋น„์˜ Open Class, C#์˜ Extension Method, Scala์˜ Implicit Conversion ๋“ฑ์ด ๋ชฝํ‚ค ํŒจ์น˜์˜ ์˜ˆ๋ผ๊ณ  ํ•จ. - ์ž๋ฐ”๋Š” ๋ชฝํ‚ค ํŒจ์น˜๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š์ง€๋งŒ Byte Code Instrumentation์ด๋‚˜ AOP๋กœ ๋น„์Šทํ•œ ํšจ๊ณผ๋ฅผ ๋‚ผ ์ˆ˜ ์žˆ๋‹ค. ### p353 #### ์ƒ์†์œผ๋กœ ์ธํ•œ ์กฐํ•ฉ์˜ ํญ๋ฐœ์ ์ธ ์ฆ๊ฐ€ - ์š”๊ธˆ ํ• ์ธ๊ณผ ์„ธ๊ธˆ ๋ถ€๊ณผ ๋“ฑ์˜ ๋‹ค์–‘ํ•œ ์กฐํ•ฉ์ด ํ•„์š”ํ•  ๋•Œ ์ƒ์†์„ ์‚ฌ์šฉํ•˜๋ฉด ๊ฐ ์กฐํ•ฉ๋งˆ๋‹ค ์„œ๋ธŒํด๋ž˜์Šค๋ฅผ ๋งŒ๋“ค์–ด์•ผ ํ•˜๋ฏ€๋กœ ํด๋ž˜์Šค์˜ ์ˆ˜๊ฐ€ ํญ๋ฐœ์ ์œผ๋กœ ์ฆ๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค. - ์ด๋ ‡๊ฒŒ ํด๋ž˜์Šค๊ฐ€ ๋งŽ์•„์ง€๋ฉด ์ค‘๋ณต ์ฝ”๋“œ๋„ ๋งŽ์•„์ง€๊ฒŒ ๋œ๋‹ค. - **์ค‘๋ณต์„ ์ œ๊ฑฐํ•  ๋ชฉ์ ์œผ๋กœ ์ƒ์†์ด๋ผ๋Š” ๋ฐฉ๋ฒ•์„ ์„ ํƒํ–ˆ๋Š”๋ฐ ๊ฒฐ๊ณผ์ ์œผ๋กœ ์ค‘๋ณต์ด ์ฆ๊ฐ€ํ•˜๋Š” ์•„์ด๋Ÿฌ๋‹ˆ** ### p368 #### ํ•ฉ์„ฑ ๊ด€๊ณ„๋กœ ๋ณ€๊ฒฝํ•˜๊ธฐ - ์‹ค์ œ ์š”๊ตฌ์‚ฌํ•ญ์— ๋งž๊ฒŒ ์—ฌ๋Ÿฌ ์ •์ฑ… ์ ์šฉ ๋ฐฉ์‹์„ ๊ฐ์ฒด ๋‹จ์œ„๋กœ ๋‚˜๋ˆ„์–ด ์˜์กด๊ด€๊ณ„๋ฅผ ๋ณด๊ณ  ๊ทœ์น™ ํŒŒ์•… - ๊ทœ์น™์— ๋”ฐ๋ผ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ถ”์ถœํ•˜๊ณ , ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํฌํ•จํ•˜๋Š” ํ•ฉ์„ฑ ๊ด€๊ณ„ ๊ตฌ์„ฑ - ์ •์ฑ…์˜ ๊ตฌ์ฒด ๊ตฌํ˜„์€ ์ธํ„ฐํŽ˜์ด์Šค ๊ตฌํ˜„์ฒด์—์„œ ์ž‘์„ฑ - ๋Ÿฐํƒ€์ž„์—์„œ ์‹ค์ œ ์‚ฌ์šฉ๋  ๊ตฌํ˜„์ฒด๋ฅผ ์ธํ„ฐํŽ˜์ด์Šค์— ์ฃผ์ž… ### p379 #### ๋ฏน์Šค์ธ - ์Šค์นผ๋ผ๋กœ ์„ค๋ช…ํ•˜๋‹ˆ ์ž˜ ์ดํ•ด๊ฐ€.. ๊ฑ ํŒจ์Šค.. ## 12. ๋‹คํ˜•์„ฑ - ํฌ๊ฒŒ 2๊ฐœ, ์„ธ๋ถ€์ ์œผ๋กœ 4๊ฐœ์˜ ๋‹คํ˜•์„ฑ์œผ๋กœ ๋ถ„๋ฅ˜ ๊ฐ€๋Šฅ - ์ผ๋ฐ˜์ ์œผ๋กœ ๋‹คํ˜•์„ฑ์ด๋ผ๊ณ  ํ•˜๋ฉด ๋Œ€๋ถ€๋ถ„ ๋ฉ”์„œ๋“œ ์˜ค๋ฒ„๋ผ์ด๋”ฉ์„ ํ†ตํ•œ ๋‹คํ˜•์„ฑ์„ ๊ฐ€๋ฆฌํ‚ด - ๋ฉ”์„œ๋“œ๋Š” ์ธ์Šคํ„ด์Šค ๋ณ„๋กœ ๋”ฐ๊ณ  ๊ฐ€์ ธ์•ผํ•  ์ด์œ ๊ฐ€ ์—†์œผ๋ฏ€๋กœ ์ธ์Šคํ„ด์Šค๋ณ„ ๊ณต๊ฐ„์ด ์•„๋‹ˆ๋ผ ํด๋ž˜์Šค ์ •๋ณด ๊ณต๊ฐ„์— ํฌํ•จ๋ผ ์žˆ์Œ - self -> class -> parent -> parent -> ... ์™€ ๊ฐ™์ด **๋ฉ”์‹œ์ง€๋ฅผ ์ˆ˜์‹ ํ•œ ๊ฐ์ฒด์—์„œ๋ถ€ํ„ฐ ์ƒ์† ๊ด€๊ณ„ ์œ„์ชฝ ๋ฐฉํ–ฅ์œผ๋กœ ๋ฉ”์„œ๋“œ๋ฅผ ์ฐพ์Œ** - ์ž์‹ ํด๋ž˜์Šค์˜ ๋ฉ”์„œ๋“œ๊ฐ€ ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ ๋ฉ”์„œ๋“œ๋ฅผ ๋ฎ์–ด์“ฐ๋Š” ๊ฒƒ๊ฐ™์€ ํšจ๊ณผ๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋Š” ์ด์œ  - **self๋Š” ํ•ญ์ƒ ๋ฉ”์„œ๋“œ๋ฅผ ์ฒ˜์Œ ์ˆ˜์‹ ํ•œ ๊ฐ์ฒด๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋ฉฐ, ์ƒ์† ๊ด€๊ณ„ ์œ„์ชฝ์œผ๋กœ ๋ฉ”์„œ๋“œ๋ฅผ ์ฐพ์•„๊ฐˆ ๋•Œ self ์ฐธ์กฐ๋„ ํ•จ๊ป˜ ์ „๋‹ฌ๋จ** - ๋ถ€๋ชจ ํด๋ž˜์Šค์—์„œ ์ž์‹ ํด๋ž˜์Šค์˜ ๋ฉ”์„œ๋“œ๋ฅผ ํ˜ธ์ถœํ•  ์ˆ˜ ์žˆ๋Š” ์ด์œ  - ์ƒ์†์€ ํด๋ž˜์Šค๋ฅผ ํ†ตํ•ด์„œ๋งŒ ๊ฐ€๋Šฅํ•œ ๊ฐœ๋…์ด ์•„๋‹˜. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์ฒ˜๋Ÿผ ํด๋ž˜์Šค๊ฐ€ ์•„๋‹Œ ํ”„๋กœํ† ํƒ€์ž…์„ ํ†ตํ•ด์„œ๋„ ์ƒ์† ๊ตฌํ˜„ ๊ฐ€๋Šฅ ### p389 #### ์ƒ์† ์‚ฌ์šฉ ๊ธฐ์ค€ >๋‹จ์ˆœํžˆ ์ฝ”๋“œ๋ฅผ ์žฌ์‚ฌ์šฉํ•  ๋ชฉ์ ์ด๋ฉด ์ƒ์†์„ ์‚ฌ์šฉํ•˜์ง€ ๋ง์•„์•ผ ํ•œ๋‹ค. >๋‹คํ˜•์„ฑ์„ ์œ„ํ•ด์„œ๋ผ๋ฉด ์ƒ์†์„ ๊ณ ๋ คํ•ด๋ณผ๋งŒํ•˜๋‹ค. ### p390 #### ๋‹คํ˜•์„ฑ์˜ ์ข…๋ฅ˜ ``` ๋‹คํ˜•์„ฑ - [Universal, Adhoc] Universal - [Parametric, Inclusion] Parametric: ์ œ๋„ค๋ฆญ์„ ํ†ตํ•œ ๋‹คํ˜•์„ฑ Inclusion: ๋ฉ”์„œ๋“œ ์˜ค๋ฒ„๋ผ์ด๋”ฉ์„ ํ†ตํ•œ ๋‹คํ˜•์„ฑ. ์„œ๋ธŒํƒ€์ž… ๋‹คํ˜•์„ฑ์ด๋ผ๊ณ ๋„ ๋ถ€๋ฅธ๋‹ค. Adhoc - [Overloading, Coercion] Overloading: ๋ฉ”์„œ๋“œ ์˜ค๋ฒ„๋กœ๋”ฉ Coercion: ๋ฌธ์ž + ์ˆซ์ž ์‹œ ๊ฐ•์ œ๋กœ ๋ฌธ์ž์—ด ์—ฐ๊ฒฐ ์ˆ˜ํ–‰ ``` ### p400 #### ์ƒ์†์˜ ๊ฐœ๋…์  ๊ตฌ์กฐ >์ƒ์†์„ ์ธ์Šคํ„ด์Šค ๊ด€์ ์—์„œ ๋ฐ”๋ผ๋ณผ ๋•Œ๋Š” ๊ฐœ๋…์ ์œผ๋กœ ์ž์‹ ํด๋ž˜์Šค์˜ ์ธ์Šคํ„ด์Šค ์•ˆ์— ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ ์ธ์Šคํ„ด์Šค๊ฐ€ ํฌํ•จ๋˜๋Š” ๊ฒƒ์œผ๋กœ ์ƒ๊ฐํ•˜๋Š” ๊ฒƒ์ด ์œ ์šฉํ•˜๋‹ค. - ์Šค์ฝ”ํ”„์™€๋Š” ํ˜ผ๋™ํ•˜์ง€ ๋ง์ž #### ๋ฐ์ดํ„ฐ์™€ ํ–‰๋™์˜ ๋ฌผ๋ฆฌ์  ์ฐจ์ด >๊ฐ์ฒด์˜ ๊ฒฝ์šฐ ์ธ์Šคํ„ด์Šค ๋ณ„๋กœ ๋‹ค๋ฅธ ์ƒํƒœ๋ฅผ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋„๋ก ์ธ์Šคํ„ด์Šค ๋ณ„๋กœ ๋…๋ฆฝ์ ์ธ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ํ• ๋‹น๋ฐ›์•„ ์ƒํƒœ๋ฅผ ์ €์žฅ >๋ฉ”์„œ๋“œ๋Š” ์ธ์Šคํ„ด์Šค ๋ณ„๋กœ ๋‹ค๋ฅด์ง€ ์•Š์œผ๋ฏ€๋กœ ๋™์ผํ•œ ํด๋ž˜์Šค์˜ ์ธ์Šคํ„ด์Šค๋ผ๋ฆฌ ๊ณต์œ  ๊ฐ€๋Šฅ >๋”ฐ๋ผ์„œ ๋ฉ”์„œ๋“œ๊ฐ€ ํฌํ•จ๋œ ํด๋ž˜์Šค ์ •๋ณด๋Š” ํ•œ ๋ฒˆ๋งŒ ๋ฉ”๋ชจ๋ฆฌ์— ๋กœ๋”ฉํ•˜๊ณ , ์ธ์Šคํ„ด์Šค ๋ณ„๋กœ ํด๋ž˜์Šค๋ฅผ ๊ฐ€๋ฆฌํ‚ค๊ฒŒ ํ•˜๋Š” ํฌ์ธํ„ฐ๋ฅผ ๊ฐ–๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ด ๊ฒฝ์ œ์  - ๊ฐ์ž ๋‹ค๋ฅธ ์ƒํƒœ๋ฅผ ๋‚˜ํƒ€๋‚ด์•ผํ•˜๋Š” ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๋Š” ์ธ์Šคํ„ด์Šค ๋ณ„ ๋…๋ฆฝ์  ๋ฉ”๋ชจ๋ฆฌ์— ์ €์žฅ - ๊ฐ™์€ ํด๋ž˜์Šค์˜ ๋ฉ”์„œ๋“œ๋Š” ์ธ์Šคํ„ด์Šค ๋ณ„๋กœ ๋‹ค๋ฅผ ํ•„์š”๊ฐ€ ์—†์œผ๋ฏ€๋กœ ํด๋ž˜์Šค ์ •๋ณด ํ•œ ๊ณณ์— ์ €์žฅํ•˜๊ณ  ์ธ์Šคํ„ด์Šค์—๊ฒŒ ๋ชจ๋‘ ๊ณต์œ  ### p402, p408 #### ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์€ ๊ฐ์ฒด๊ฐ€ ์ด๋ฅผ ์ฒ˜๋ฆฌํ•  ๋ฉ”์„œ๋“œ๋ฅผ ์ฐพ๋Š” ๊ณผ์ • - ๊ฐ์ฒด๊ฐ€ ๋ฉ”์‹œ์ง€๋ฅผ ์ˆ˜์‹ ํ•˜๋ฉด ์ปดํŒŒ์ผ๋Ÿฌ๋Š” self ์ฐธ์กฐ๋ฅผ ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•˜๊ณ  ๋ฉ”์‹œ์ง€๋ฅผ ์ˆ˜์‹ ํ•œ ๊ฐ์ฒด๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋„๋ก ์„ค์ •ํ•œ๋‹ค. - ๊ฐ์ฒด๋Š” ๋ฉ”์„œ๋“œ ์ •๋ณด๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ํด๋ž˜์Šค์— ๋Œ€ํ•œ ์ฐธ์กฐ(class๋ผ๊ณ  ํ•˜์ž)๋ฅผ ๊ฐ–๋Š”๋‹ค. - self๊ฐ€ ๊ฐ€๋ฆฌํ‚ค๋Š” ๊ฐ์ฒด๊ฐ€ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” class๋ฅผ ํ†ตํ•ด ํด๋ž˜์Šค ์ •๋ณด์—์„œ ๋ฉ”์„œ๋“œ ์‹œ๊ทธ๋‹ˆ์ฒ˜ ๊ธฐ์ค€์œผ๋กœ ๋ฉ”์„œ๋“œ๋ฅผ ์ฐพ์•„์„œ ์žˆ์œผ๋ฉด ์‹คํ–‰ - ์—†์œผ๋ฉด ํด๋ž˜์Šค์˜ ๋ถ€๋ชจ ํด๋ž˜์Šค๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋Š” ์ฐธ์กฐ(parent๋ผ๊ณ  ํ•˜์ž)๋ฅผ ํ†ตํ•ด ๋ถ€๋ชจ ํด๋ž˜์Šค์—์„œ ๋ฉ”์„œ๋“œ๋ฅผ ์ฐพ๋Š”๋‹ค. - **parent๊ฐ€ ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ ์ธ์Šคํ„ด์Šค๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋Š” ๊ฑธ๊นŒ ์•„๋‹ˆ๋ฉด ๋ถ€๋ชจ ํด๋ž˜์Šค๋ฅผ ๊ฐ€๋ฆฌํ‚ฌ๊นŒ?** - parent์— ์—†์œผ๋ฉด parent์˜ parent์ธ ํด๋ž˜์Šค์—์„œ ๋ฉ”์„œ๋“œ๋ฅผ ์ฐพ๊ณ  ์—†์œผ๋ฉด ๋‹ค์‹œ parent... ๋ฐ˜๋ณต - ์ตœ์ƒ์œ„ ํด๋ž˜์Šค(Object)์—๋„ ์—†์œผ๋ฉด ์—๋Ÿฌ ๋ฐœ์ƒ **์ž์‹ ํด๋ž˜์Šค ์ธ์Šคํ„ด์Šค๋ฅผ ๋ถ€๋ชจ ํด๋ž˜์Šค ์ธ์Šคํ„ด์Šค์— ํ• ๋‹นํ•ด์„œ ์—…์บ์ŠคํŒ… ๋˜๋”๋ผ๋„, ๋ฉ”์„œ๋“œ ํ˜ธ์ถœ ์‹œ ์ž์‹ ํด๋ž˜์Šค์˜ ๋ฉ”์„œ๋“œ๊ฐ€ ๋จผ์ € ํ˜ธ์ถœ๋˜๋Š” ์ด์œ ๋Š”, ๋ฉ”์„œ๋“œ ์‹๋ณ„ ๊ณผ์ •์ด ์œ„์•„ ๊ฐ™์ด ์ด๋ค„์ง€๊ธฐ ๋•Œ๋ฌธ.** ### p424 #### super ์ฐธ์กฐ >(๋ฉ”์„œ๋“œ ํ˜ธ์ถœ์— ์‚ฌ์šฉ๋˜๋Š”) super ์ฐธ์กฐ์˜ ์ •ํ™•ํ•œ ์˜๋„๋Š” '์ง€๊ธˆ ์ด ํด๋ž˜์Šค์˜ ๋ถ€๋ชจ ํด๋ž˜์Šค์—์„œ๋ถ€ํ„ฐ ๋ฉ”์„œ๋“œ ํƒ์ƒ‰์„ ์‹œ์ž‘ํ•˜์„ธ์š”'๋‹ค. - ์ž๋ฐ”์—์„œ๋Š” `super`๋กœ ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ `rotected` ๋“ฑ ๋ณผ ์ˆ˜ ์žˆ๊ฒŒ ์„ ์–ธ๋œ ๋ณ€์ˆ˜์—๋„ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ, `super`๊ฐ€ ๊ผญ ๋ฉ”์„œ๋“œ ํƒ์ƒ‰์—๋งŒ ์‚ฌ์šฉ๋˜๋Š” ๊ฒƒ์€ ์•„๋‹˜ ### p425 #### ์ƒ์†๊ณผ super ์ฐธ์กฐ - self๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์€ ๊ฐ์ฒด๋ฅผ ๊ฐ€๋ฆฌํ‚จ๋‹ค. - ์ƒ์†์—์„œ๋Š” ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์€ ๊ฐ์ฒด๊ฐ€ ์ž์‹ ์ด ํฌํ•จํ•˜๊ณ  ์žˆ๋Š” ๋ถ€๋ชจ ๊ฐ์ฒด์— ์ž์‹ ์„ ๊ฐ€๋ฆฌํ‚ค๋Š” self ์ฐธ์กฐ๋ฅผ ๋ถ€๋ชจ ๊ฐ์ฒด์— ์ž๋™์œผ๋กœ ์ „๋‹ฌํ•ด์ค€๋‹ค๊ณ  ์ƒ๊ฐํ•ด๋„ ๋ฌด๋ฐฉ - ๋ถ€๋ชจ ๊ฐ์ฒด๋Š” ๋˜ ๊ทธ ๋ถ€๋ชจ ๊ฐ์ฒด์—๊ฒŒ self ์ฐธ์กฐ๋ฅผ ์ „๋‹ฌ - **๊ฒฐ๊ตญ self๋Š” ๊ฐ์ฒด๋Š” ์ƒ์† ๊ตฌ์กฐ ์•ˆ์— ์žˆ๋Š” ์–ด๋””์—์„œ๋‚˜, ์ตœ์ดˆ์— ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์€ ๊ฐ์ฒด๋ฅผ ๊ฐ€๋ฆฌํ‚จ๋‹ค.** ### p429 #### ํฌ์›Œ๋”ฉ๊ณผ ์œ„์ž„ >์ž์‹ ์ด ์ˆ˜์‹ ํ•œ ๋ฉ”์‹œ์ง€๋ฅผ ๋‹ค๋ฅผ ๊ฐ์ฒด์—๊ฒŒ ๋™์ผํ•˜๊ฒŒ ์ „๋‹ฌํ•ด์„œ ์ฒ˜๋ฆฌ๋ฅผ ์š”์ฒญํ•˜๋Š” ๊ฒƒ์„ ์œ„์ž„(delegation)์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. - ์—ฌ๊ธฐ์—์„œ ๋งํ•˜๋Š” ์œ„์ž„์ด ๊ฐ์ฒด์ง€ํ–ฅ์—์„œ ์ผ๋ฐ˜์ ์œผ๋กœ ๋งํ•˜๋Š” ์œ„์ž„์ธ์ง€ ๋ชจ๋ฅด๊ฒ ์Œ - ๋™์ผํ•˜๊ฒŒ ์ „๋‹ฌํ•ด์•ผ๋งŒ ์œ„์ž„์ด๊ณ , ๋ฐ›์€ ๋ฉ”์‹œ์ง€์˜ ์ „์ฒด์ ์ธ ์ฒ˜๋ฆฌ๋ฅผ ์œ„ํ•ด ํŠน์ • ๋ถ€๋ถ„์˜ ์ฒ˜๋ฆฌ๋ฅผ ๋‹ค๋ฅธ ๊ฐ์ฒด์—๊ฒŒ ๋งก๊ธฐ๋Š” ๊ฒƒ์€ ์œ„์ž„์ด ์•„๋‹Œ ๊ฑด๊ฐ€? >๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์€ ๊ฐ์ฒด๊ฐ€ ๋ฐ›์€ ๋ฉ”์‹œ์ง€์˜ ์ฒ˜๋ฆฌ๋ฅผ ๋‹ค๋ฅธ ๊ฐ์ฒด์—๊ฒŒ ์š”์ฒญํ•˜๋ฉด์„œ, > - self๋ฅผ ๋‹ค๋ฅธ ๊ฐ์ฒด์—๊ฒŒ ์ „๋‹ฌํ•˜๋ฉด ์œ„์ž„ > - self๋ฅผ ์ „๋‹ฌํ•˜์ง€ ์•Š์œผ๋ฉด ํฌ์›Œ๋”ฉ(forwarding) - ์ƒ์†์€ self ์ „๋‹ฌ์„ ์–ธ์–ด์—์„œ ์ง€์›ํ•ด์ฃผ๋ฏ€๋กœ ํŽธ๋ฆฌ - ๊ทธ๋Ÿฐ๋ฐ self๋ฅผ ์ „๋‹ฌํ•˜์ง€ ์•Š๋Š” ํฌ์›Œ๋”ฉ์ด๋ผ๋Š” ๊ฒŒ ์ž๋ฐ”์—์„œ๋„ ์กด์žฌํ•˜๋Š” ๊ฑด์ง€ ๋ชจ๋ฅด๊ฒ ์Œ ### p430 #### ํ”„๋กœํ† ํƒ€์ž…(prototype) ๊ธฐ๋ฐ˜ ๊ฐ์ฒด์ง€ํ–ฅ - ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์˜ ํ”„๋กœํ† ํƒ€์ž… ์ฒด์ธ - ํด๋ž˜์Šค ๊ธฐ๋ฐ˜ ์ƒ์†์€ ์ปดํŒŒ์ผ ํƒ€์ž„์— ์ •์ ์œผ๋กœ ๊ฒฐ์ •๋˜๋Š”๋ฐ ๋ฐ˜ํ•ด, ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์˜ ํ”„๋กœํ† ํƒ€์ž… ์ฒด์ธ ๊ธฐ๋ฐ˜ ์ƒ์†์€ ๋Ÿฐํƒ€์ž„์— ๋™์ ์œผ๋กœ ๊ฒฐ์ • - super์™€ ๋น„์Šทํ•˜๊ฒŒ `[[Prototype]]`(์ŠคํŽ™์—์„œ ์‚ฌ์šฉ๋˜๋Š” ํ‘œํ˜„) ๋˜๋Š” V8 ์—”์ง„์ด๋‚˜ nodejs์—์„œ๋Š” `__proto__`๋ฅผ ํ†ตํ•ด ์—ฐ์‡„์ ์œผ๋กœ ๋ถ€๋ชจ ๊ฐ์ฒด๋ฅผ ๋”ฐ๋ผ๊ฐ€๋ฉฐ ์‹๋ณ„์ž๋ฅผ ์ฐพ์Œ - self ์ฐธ์กฐ์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ํ”„๋กœํ† ํƒ€์ž… ์•ˆ์—์„œ `this`๋ฅผ ํ†ตํ•ด ์‹ค์ œ ๋ฉ”์‹œ์ง€๋ฅผ ์ˆ˜์‹ ํ•œ ๊ฐ์ฒด๋ฅผ ์ฐธ์กฐํ•  ์ˆ˜ ์žˆ์Œ - ์ •ํ™•ํ•œ ๋‚ด์šฉ์€ ใ…https://meetup.toast.com/posts/104 ์ฐธ๊ณ 
{ "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 dddddddd link An,data16 0100 111001 011nnn unlk An 0100 111001 100nnn move An,USP (sup) 0100 111001 101nnn move USP,An (sup) 0100 111001 110000 reset (sup) 0100 111001 110001 nop 0100 111001 110010 dddddddd dddddddd stop #data16 (sup) 0100 111001 110011 rte (sup) 0100 111001 110100 rtd (010) 0100 111001 110101 rts 0100 111001 110110 trapv 0100 111001 110111 rtr 0100 111001 111010 nnnn0000 00000000 movec SFC,Rn (010,sup) 0100 111001 111010 nnnn0000 00000001 movec DFC,Rn (010,sup) 0100 111001 111010 nnnn0000 00000010 movec CACR,Rn (020,sup) 0100 111001 111010 nnnn1000 00000000 movec USP,Rn (010,sup) 0100 111001 111010 nnnn1000 00000001 movec VBR,Rn (010,sup) 0100 111001 111010 nnnn1000 00000010 movec CAAR,Rn (020,sup) 0100 111001 111010 nnnn1000 00000011 movec MSP,Rn (020,sup) 0100 111001 111010 nnnn1000 00000100 movec ISP,Rn (020,sup) 0100 111001 111011 nnnn0000 00000000 movec Rn,SFC (010,sup) 0100 111001 111011 nnnn0000 00000001 movec Rn,DFC (010,sup) 0100 111001 111011 nnnn0000 00000010 movec Rn,CACR (020,sup) 0100 111001 111011 nnnn1000 00000000 movec Rn,USP (010,sup) 0100 111001 111011 nnnn1000 00000001 movec Rn,VBR (010,sup) 0100 111001 111011 nnnn1000 00000010 movec Rn,CAAR (020,sup) 0100 111001 111011 nnnn1000 00000011 movec Rn,MSP (020,sup) 0100 111001 111011 nnnn1000 00000100 movec Rn,ISP (020,sup) 0100 nnn100 aaaaaa chk.l a,Dn (020) 0100 nnn110 aaaaaa chk.w a,Dn 0100 nnn111 aaaaaa lea a,An 0100 100111 000nnn extb Dn (020) 0100 111010 aaaaaa jsr a 0100 111011 aaaaaa jmp a 0101 ddd0zz aaaaaa addq.z #data3,a (data3 = 8,1..7) 0101 ddd1zz aaaaaa subq.z #data3,a (data3 = 8,1..7) 0101 cccc11 aaaaaa sCC a 0101 cccc11 001nnn llllllll llllllll dbCC Dn,label 0101 cccc11 111010 dddddddd dddddddd trapCC #operand.w (020) 0101 cccc11 111011 longword trapCC #operand.l (020) 0101 cccc11 111100 trapCC (020) 0110 0000 llllllll bra label 0110 0001 llllllll bsr label 0110 cccc llllllll bCC label 0111 nnn0 dddddddd moveq #data8,Dn 1000 nnn0zz aaaaaa or.z a,Dn 1000 nnn011 aaaaaa divu.w a,Dn 1000 nnn1zz aaaaaa or.z Dn,a 1000 nnn111 aaaaaa divs.w a,Dn 1000 ddd100 000sss sbcd Ds,Dd 1000 ddd100 001sss sbcd -(As),-(Ad) 1000 ddd101 000sss dddddddd dddddddd pack Ds,Dd,#adj (020) 1000 ddd101 001sss dddddddd dddddddd pack -(As),-(Ad),#adj (020) 1000 ddd110 000sss dddddddd dddddddd unpk Ds,Dd,#adj (020) 1000 ddd110 001sss dddddddd dddddddd unpk -(As),-(Ad),#adj (020) 1001 nnn0zz aaaaaa sub.z a,Dn 1001 nnn1zz aaaaaa sub.z Dn,a 1001 nnnz11 aaaaaa suba.z a,An 1001 ddd1zz 000sss subx.z Ds,Dd 1001 ddd1zz 001sss subx.z -(As),-(Ad) 1011 nnn0zz aaaaaa cmp.z a,Dn 1011 nnn1zz aaaaaa eor.z a,Dn 1011 nnnz11 aaaaaa cmpa.z a,An 1011 ddd1zz 000sss cmpm.z Ds,Dd 1011 ddd1zz 001sss cmpm.z (As)+,(Ad)+ 1100 nnn0zz aaaaaa and.z a,Dn 1100 nnn011 aaaaaa mulu.w a,Dn 1100 nnn1zz aaaaaa and.z Dn,a 1100 nnn111 aaaaaa muls.w a,Dn 1100 ddd100 000sss abcd Ds,Dd 1100 ddd100 001sss abcd -(As),-(Ad) 1100 ddd101 000sss exg Ds,Dd 1100 ddd101 001sss exg As,Ad 1100 ddd110 001sss exg As,Dd 1101 nnn0zz aaaaaa add.z a,Dn 1101 nnn1zz aaaaaa add.z Dn,a 1101 nnnz11 aaaaaa adda.z a,An 1101 ddd1zz 000sss addx.z Ds,Dd 1101 ddd1zz 001sss addx.z -(As),-(Ad) 1110 ccc0zz 000nnn asrd.z #ccc,Dn 1110 ccc1zz 000nnn asld.z #ccc,Dn 1110 ccc0zz 001nnn lsrd.z #ccc,Dn 1110 ccc1zz 001nnn lsld.z #ccc,Dn 1110 ccc0zz 010nnn roxrd.z #ccc,Dn 1110 ccc1zz 010nnn roxld.z #ccc,Dn 1110 ccc0zz 011nnn rord.z #ccc,Dn 1110 ccc1zz 011nnn rold.z #ccc,Dn 1110 ccc0zz 100nnn asrd.z Dc,Dn 1110 ccc1zz 100nnn asld.z Dc,Dn 1110 ccc0zz 101nnn lsrd.z Dc,Dn 1110 ccc1zz 101nnn lsld.z Dc,Dn 1110 ccc0zz 110nnn roxrd.z Dc,Dn 1110 ccc1zz 110nnn roxld.z Dc,Dn 1110 ccc0zz 111nnn rord.z Dc,Dn 1110 ccc1zz 111nnn rold.z Dc,Dn 1110 000011 aaaaaa asrd a 1110 000111 aaaaaa asld a 1110 001011 aaaaaa lsrd a 1110 001111 aaaaaa lsld a 1110 010011 aaaaaa roxrd a 1110 010111 aaaaaa roxld a 1110 011011 aaaaaa rord a 1110 011111 aaaaaa rold a 1110 100011 aaaaaa 0000dooo oofwwwww bftst a[offs:wid] (020) 1110 100111 aaaaaa 0nnndooo oofwwwww bfextu a[offs:wid],Dn (020) 1110 101011 aaaaaa 0000dooo oofwwwww bfchg a[offs:wid] (020) 1110 101111 aaaaaa 0nnndooo oofwwwww bfexts a[offs:wid],Dn (020) 1110 110011 aaaaaa 0000dooo oofwwwww bfclr a[offs:wid] (020) 1110 110111 aaaaaa 0nnndooo oofwwwww bfffo a[offs:wid],Dn (020) 1110 111011 aaaaaa 0000dooo oofwwwww bfset a[offs:wid] (020) 1110 111111 aaaaaa 0nnndooo oofwwwww bfins Dn,a[offs:wid] (020) 1111 000000 aaaaaa 0000100f 00000000 pmove[fd] a,tt0 (030,sup) 1111 000000 aaaaaa 0000110f 00000000 pmove[fd] a,tt1 (030,sup) 1111 000000 aaaaaa 0000101f 00000000 pmove tt0,a (030,sup) 1111 000000 aaaaaa 0000111f 00000000 pmove tt1,a (030,sup) 1111 000000 aaaaaa 001000r0 000fffff pload fc,a (851,030,sup) 1111 000000 aaaaaa 00100100 mmmfffff pflusha (851,sup) 1111 000000 aaaaaa 00110000 mmmfffff pflush fc,#mask (851,sup) 1111 000000 aaaaaa 00111000 mmmfffff pflush fc,#mask,a (851,sup) 1111 000000 aaaaaa 0100000f 00000000 pmove[fd] a,tc (030,sup) 1111 000000 aaaaaa 0100100f 00000000 pmove[fd] a,srp (030,sup) 1111 000000 aaaaaa 0100110f 00000000 pmove[fd] a,crp (030,sup) 1111 000000 aaaaaa 0100001f 00000000 pmove tc,a (030,sup) 1111 000000 aaaaaa 0100101f 00000000 pmove srp,a (030,sup) 1111 000000 aaaaaa 0100111f 00000000 pmove crp,a (030,sup) 1111 000000 aaaaaa 01000000 00000000 pmove a,tc (851,sup) 1111 000000 aaaaaa 01000100 00000000 pmove a,drp (851,sup) 1111 000000 aaaaaa 01001000 00000000 pmove a,srp (851,sup) 1111 000000 aaaaaa 01001100 00000000 pmove a,crp (851,sup) 1111 000000 aaaaaa 01010000 00000000 pmove a,cal (851,sup) 1111 000000 aaaaaa 01010100 00000000 pmove a,val (851,sup) 1111 000000 aaaaaa 01011000 00000000 pmove a,scc (851,sup) 1111 000000 aaaaaa 01011100 00000000 pmove a,ac (851,sup) 1111 000000 aaaaaa 01000010 00000000 pmove tc,a (851,sup) 1111 000000 aaaaaa 01000110 00000000 pmove drp,a (851,sup) 1111 000000 aaaaaa 01001010 00000000 pmove srp,a (851,sup) 1111 000000 aaaaaa 01001110 00000000 pmove crp,a (851,sup) 1111 000000 aaaaaa 01010010 00000000 pmove cal,a (851,sup) 1111 000000 aaaaaa 01010110 00000000 pmove val,a (851,sup) 1111 000000 aaaaaa 01011010 00000000 pmove scc,a (851,sup) 1111 000000 aaaaaa 01011110 00000000 pmove ac,a (851,sup) 1111 000000 aaaaaa 01100000 00000000 pmove a,mmusr (030,sup) 1111 000000 aaaaaa 01100010 00000000 pmove mmusr,a (030,sup) 1111 000000 aaaaaa 100lll00 000fffff ptestw fc,a,#level (851,030,sup) 1111 000000 aaaaaa 100lll10 000fffff ptestr fc,a,#level (851,030,sup) 1111 000000 aaaaaa 100lll01 rrrfffff ptestw fc,a,#level,An (851,030,sup) 1111 000000 aaaaaa 100lll11 rrrfffff ptestr fc,a,#level,An (851,030,sup) 1111 000000 aaaaaa 10100000 00000000 pflushr a (851,sup) 1111 000001 001nnn 00000000 00cccccc pdbCC.w Dn,label (851,sup) 1111 000001 aaaaaa 00000000 00cccccc psCC (851,sup) 1111 00001z cccccc w [w] pbCC.z label (851,sup) 1111 000100 aaaaaa psave a (851,sup) 1111 000101 aaaaaa prestore a (851,sup) 1111 001000 aaaaaa 011nnnmmm kkkkkkk fmove.p fpm,a{,Dn|#k} (88x,040) 1111 010000 000nnn pflushn (An) (040,sup) 1111 010000 001nnn pflush (An) (040,sup) 1111 010000 010nnn pflushan (040,sup) 1111 010000 011nnn pflusha (040,sup) 1111 0100cc 001nnn cinvl caches,(An) (sup,040) 1111 0100cc 010nnn cinvp caches,(An) (sup,040) 1111 0100cc 011nnn cinva caches (sup,040) 1111 0100cc 101nnn cpushl caches,(An) (sup,040) 1111 0100cc 110nnn cpushp caches,(An) (sup,040) 1111 0100cc 111nnn cpusha caches (sup,040) 1111 010101 001nnn ptestw An (040,sup) 1111 010101 101nnn ptestr An (040,sup) 1111 100000 000000 00000001 11000000 lpstop #data (cpu32) 1111 100000 000mmm 0xxx0000 zz000yyy tblu.z Dym:Dyn,Dx 1111 100000 000mmm 0xxx0100 zz000yyy tblun.z Dym:Dyn,Dx 1111 100000 aaaaaa 0xxx0001 zz000000 tblu.z a,Dx 1111 100000 aaaaaa 0xxx0101 zz000000 tblun.z a,Dx 1111 100000 000mmm 0xxx1000 zz000yyy tbls.z Dym:Dyn,Dx 1111 100000 000mmm 0xxx1100 zz000yyy tblsn.z Dym:Dyn,Dx 1111 100000 aaaaaa 0xxx1001 zz000000 tbls.z a,Dx 1111 100000 aaaaaa 0xxx1101 zz000000 tblsn.z a,Dx 1111 100001 111010 00000000 00cccccc ptrapCC #oper.w (851) 1111 100001 111011 00000000 00cccccc ptrapCC #oper.l (851) 1111 100001 111100 00000000 00cccccc ptrapCC (851) 1111 ccc000 aaaaaa CPgen a,user-defined (020) 1111 ccc001 aaaaaa 00000000 00cccccc CPsCC (020) 1111 ccc001 001nnn 00000000 00cccccc CPdbCC Dn,disp16 (020) 1111 ccc001 111010 00000000 00cccccc CPtrapCC #oper.w (020) 1111 ccc001 111011 00000000 00cccccc CPtrapCC #oper.l (020) 1111 ccc001 111100 00000000 00cccccc CPtrapCC (020) 1111 ccc01z cccccc dddddddd dddddddd CPbCC.z disp16 (020) 1111 ccc100 aaaaaa CPsave a (020,sup) 1111 ccc101 aaaaaa CPrestore a (020,sup) 1111 ccc000 000000 010111nnn rrrrrrr fmovecr.l #ccc,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0000001 fint.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0000010 fsinh.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0000011 fintrz.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0000110 flognp1.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0001001 ftanh.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0001010 fatan.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0001100 fasin.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0001101 fatanh.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0001110 fsin.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0001111 ftan.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0010000 fetox.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0010001 ftwotox.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0010010 ftentox.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0010100 flogn.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0010101 flog10.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0010110 flog2.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0011001 fcosh.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0011100 facos.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0011101 fcos.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0011110 fgetexp.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0011111 fgetman.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0100001 fmod.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0100100 fsgldiv.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0100101 frem.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0100110 fscale.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0100111 fsglmul.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmsss 0110ccc fsincos.z fpm/a,fpc:fps (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0111000 fcmp.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn 0111010 ftst.z fpm/a (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn g???d?? fabs.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn g000d00 fmove.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn g000d0x fsqrt.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn g011d10 fneg.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn g100d00 fdiv.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn g100d10 fadd.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn g100d11 fmul.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 0r0mmmnnn g101d00 fsub.z fpm/a,fpn (88x,040) 1111 ccc000 aaaaaa 100001000 0000000 fmove.l a,fpiar (88x,040) 1111 ccc000 aaaaaa 100010000 0000000 fmove.l a,fpsr (88x,040) 1111 ccc000 aaaaaa 100100000 0000000 fmove.l a,fpcr (88x,040) 1111 ccc000 aaaaaa 100csi00 00000000 fmovem.z a,list (88x,040) 1111 ccc000 aaaaaa 101001000 0000000 fmove.l fpiar,a (88x,040) 1111 ccc000 aaaaaa 101010000 0000000 fmove.l fpsr,a (88x,040) 1111 ccc000 aaaaaa 101100000 0000000 fmove.l fpcr,a (88x,040) 1111 ccc000 aaaaaa 101csi00 00000000 fmovem.z list,a (88x,040) 1111 ccc000 aaaaaa 110m0000 rrrrrrrr fmovem.z a,list (88x,040) 1111 ccc000 aaaaaa 110m1000 0nnn0000 fmovem.z a,Dn (88x,040) 1111 ccc000 aaaaaa 111m0000 rrrrrrrr fmovem.z list,a (88x,040) 1111 ccc000 aaaaaa 111m1000 0mmm0000 fmovem.z Dm,a (88x,040) 1111 ccc001 001nnn 00000000 00cccccc fdbCC.z Dn,disp16 (88x,040) 1111 ccc001 111010 00000000 00cccccc ftrapCC #oper.w (88x,040) 1111 ccc001 111011 00000000 00cccccc ftrapCC #oper.l (88x,040) 1111 ccc001 111100 00000000 00cccccc ftrapCC (88x,040) 1111 ccc001 aaaaaa 00000000 00cccccc fsCC.b (88x,040) 1111 ccc010 000000 00000000 00000000 fnop (88x,040) 1111 ccc01z cccccc dddddddd dddddddd fbCC.z disp16 (88x,040) 1111 ccc100 aaaaaa fsave a (88x,040,sup) 1111 ccc101 aaaaaa frestore a (88x,040,sup) coprocessor primitives (020) 1p100100 00000000 busy cpd00001 llllllll transfer multiple coprocessor registers cpd0001s 00000000 transfer status register and scanpc 1p000100 00000000 supervisor check cpd00110 00000000 transfer multiple processor registers cp000111 00000000 transfer operation word cp00100i 000000ft null cp001010 00000000 evaluate and transfer effective address cpd01100 0000nnnn transfer single main processor register cpd01101 00000000 transfer main processor control register cpd1110l llllllll transfer to/from top of stack cp001111 llllllll transfer from instruction stream cpd10aaa llllllll evaluate effective address and transfer data 0p011101 vvvvvvvv take mid-instruction exception 0p011110 vvvvvvvv take post-instruction exception cp100000 llllllll write to previously evaluated effective address subfields: ddd data3 (1..8) zz 00=b, 01=w, 10=l ss 01=b, 10=w, 11=l z 0=w, 1=l s 0=l, 1=w llllllll if $00 -> 16 bits label follows llllllll if $ff -> 32 bits label follows (020) d bitfields: 0 offset is imm, 1 offs = Dr f bitfields: 0 width is imm, 1 width = Dr addressing modes (aaaaaa): 000 nnn Dn 001 nnn An 010 nnn (An) 011 nnn (An)+ 100 nnn -(An) 101 nnn dddddddd dddddddd (d16,An) 110 nnn iiiiz000 dddddddd (d8,An,Ri.z) iiiizss0 dddddddd (d8,An,Ri.z*scale) (020) iiiizss1 bfxx0iii (bd,An,Ri.z*scale) (020) 1 1 = base register suppressed 1 1 = index operand suppressed xx base disp size (01=null disp, 10=word, 11=long) 0 000 ( bd,An,Ri.z*scale ) 0 001 ([bd,An,Ri.z*scale] ) 0 010 ([bd,An,Ri.z*scale],od.w) 0 011 ([bd,An,Ri.z*scale],od.l) 0 100 reserved 0 101 ([bd,An],Ri.z*scale ) 0 110 ([bd,An],Ri.z*scale,od.w) 0 111 ([bd,An],Ri.z*scale,od.l) 1 000 ( bd,An ) 1 001 ([bd,An] ) 1 010 ([bd,An] ,od.w) 1 011 ([bd,An] ,od.l) 111 000 dddddddd dddddddd addr16 111 001 longword addr32 111 010 dddddddd dddddddd d16(PC) 111 011 iiiiz000 dddddddd d8(PC,ix) iiiizss0 dddddddd d8(PC,ix*scale) (020) iiiizss1 bfxx0iii d8(PC,ix*scale) (020) 111 100 imm/implied flags: 0000 t allways 0001 f never 0010 hi 0011 ls 0100 cc 0101 cs 0110 ne 0111 eq 1000 vc 1001 vs 1010 pl 1011 mi 1100 ge 1101 lt 1110 gt 1111 le
{ "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; }; 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; proxyType = 2; remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTGeolocation; }; 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; proxyType = 2; remoteGlobalIDString = 58B5115D1A9E6B3D00147676; remoteInfo = RCTImage; }; 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; proxyType = 2; remoteGlobalIDString = 58B511DB1A9E6C8500147676; remoteInfo = RCTNetwork; }; 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; proxyType = 2; remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; remoteInfo = RCTVibration; }; 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; proxyType = 1; remoteGlobalIDString = 13B07F861A680F5B00A75B9A; remoteInfo = react_native_draftjs_render; }; 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; proxyType = 2; remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTSettings; }; 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3C86DF461ADF2C930047B81A; remoteInfo = RCTWebSocket; }; 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; remoteInfo = React; }; 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; proxyType = 1; remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; remoteInfo = "react_native_draftjs_render-tvOS"; }; 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; remoteInfo = "RCTImage-tvOS"; }; 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28471D9B043800D4039D; remoteInfo = "RCTLinking-tvOS"; }; 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28541D9B044C00D4039D; remoteInfo = "RCTNetwork-tvOS"; }; 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28611D9B046600D4039D; remoteInfo = "RCTSettings-tvOS"; }; 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A287B1D9B048500D4039D; remoteInfo = "RCTText-tvOS"; }; 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28881D9B049200D4039D; remoteInfo = "RCTWebSocket-tvOS"; }; 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28131D9B038B00D4039D; remoteInfo = "React-tvOS"; }; 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3C059A1DE3340900C268FA; remoteInfo = yoga; }; 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3C06751DE3340C00C268FA; remoteInfo = "yoga-tvOS"; }; 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; remoteInfo = cxxreact; }; 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; remoteInfo = "cxxreact-tvOS"; }; 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; remoteInfo = jschelpers; }; 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; remoteInfo = "jschelpers-tvOS"; }; 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; proxyType = 2; remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTAnimation; }; 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; proxyType = 2; remoteGlobalIDString = 2D2A28201D9B03D100D4039D; remoteInfo = "RCTAnimation-tvOS"; }; 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; proxyType = 2; remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RCTLinking; }; 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; proxyType = 2; remoteGlobalIDString = 58B5119B1A9E6C1200147676; remoteInfo = RCTText; }; B94045A121DE8E5B00E4FA3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; remoteInfo = fishhook; }; B94045A321DE8E5B00E4FA3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; remoteInfo = "fishhook-tvOS"; }; B94045B521DE8E5B00E4FA3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = EBF21BDC1FC498900052F4D5; remoteInfo = jsinspector; }; B94045B721DE8E5B00E4FA3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5; remoteInfo = "jsinspector-tvOS"; }; B94045B921DE8E5B00E4FA3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7; remoteInfo = "third-party"; }; B94045BB21DE8E5B00E4FA3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D383D3C1EBD27B6005632C8; remoteInfo = "third-party-tvOS"; }; B94045BD21DE8E5B00E4FA3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 139D7E881E25C6D100323FB7; remoteInfo = "double-conversion"; }; B94045BF21DE8E5B00E4FA3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 3D383D621EBD27B9005632C8; remoteInfo = "double-conversion-tvOS"; }; B94045C121DE8E5B00E4FA3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 9936F3131F5F2E4B0010BF04; remoteInfo = privatedata; }; B94045C321DE8E5B00E4FA3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; proxyType = 2; remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04; remoteInfo = "privatedata-tvOS"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; }; 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = "<group>"; }; 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = "<group>"; }; 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = "<group>"; }; 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; }; 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; }; 00E356EE1AD99517003FC87E /* react_native_draftjs_renderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = react_native_draftjs_renderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 00E356F21AD99517003FC87E /* react_native_draftjs_renderTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = react_native_draftjs_renderTests.m; sourceTree = "<group>"; }; 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; }; 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; }; 13B07F961A680F5B00A75B9A /* react_native_draftjs_render.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = react_native_draftjs_render.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = react_native_draftjs_render/AppDelegate.h; sourceTree = "<group>"; }; 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = react_native_draftjs_render/AppDelegate.m; sourceTree = "<group>"; }; 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = react_native_draftjs_render/Images.xcassets; sourceTree = "<group>"; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = react_native_draftjs_render/Info.plist; sourceTree = "<group>"; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = react_native_draftjs_render/main.m; sourceTree = "<group>"; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; }; 2D02E47B1E0B4A5D006451C7 /* react_native_draftjs_render-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "react_native_draftjs_render-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D02E4901E0B4A5D006451C7 /* react_native_draftjs_render-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "react_native_draftjs_render-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 00E356EB1AD99517003FC87E /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 146834051AC3E58100842450 /* libReact.a in Frameworks */, 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */, 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */, 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 00C302A81ABCB8CE00DB3ED1 /* Products */ = { isa = PBXGroup; children = ( 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, ); name = Products; sourceTree = "<group>"; }; 00C302B61ABCB90400DB3ED1 /* Products */ = { isa = PBXGroup; children = ( 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, ); name = Products; sourceTree = "<group>"; }; 00C302BC1ABCB91800DB3ED1 /* Products */ = { isa = PBXGroup; children = ( 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 00C302D41ABCB9D200DB3ED1 /* Products */ = { isa = PBXGroup; children = ( 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 00C302E01ABCB9EE00DB3ED1 /* Products */ = { isa = PBXGroup; children = ( 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, ); name = Products; sourceTree = "<group>"; }; 00E356EF1AD99517003FC87E /* react_native_draftjs_renderTests */ = { isa = PBXGroup; children = ( 00E356F21AD99517003FC87E /* react_native_draftjs_renderTests.m */, 00E356F01AD99517003FC87E /* Supporting Files */, ); path = react_native_draftjs_renderTests; sourceTree = "<group>"; }; 00E356F01AD99517003FC87E /* Supporting Files */ = { isa = PBXGroup; children = ( 00E356F11AD99517003FC87E /* Info.plist */, ); name = "Supporting Files"; sourceTree = "<group>"; }; 139105B71AF99BAD00B5F7CC /* Products */ = { isa = PBXGroup; children = ( 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 139FDEE71B06529A00C62182 /* Products */ = { isa = PBXGroup; children = ( 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, B94045A221DE8E5B00E4FA3C /* libfishhook.a */, B94045A421DE8E5B00E4FA3C /* libfishhook-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 13B07FAE1A68108700A75B9A /* react_native_draftjs_render */ = { isa = PBXGroup; children = ( 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 13B07FB01A68108700A75B9A /* AppDelegate.m */, 13B07FB51A68108700A75B9A /* Images.xcassets */, 13B07FB61A68108700A75B9A /* Info.plist */, 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 13B07FB71A68108700A75B9A /* main.m */, ); name = react_native_draftjs_render; sourceTree = "<group>"; }; 146834001AC3E56700842450 /* Products */ = { isa = PBXGroup; children = ( 146834041AC3E56700842450 /* libReact.a */, 3DAD3EA31DF850E9000B6D8A /* libReact.a */, 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, B94045B621DE8E5B00E4FA3C /* libjsinspector.a */, B94045B821DE8E5B00E4FA3C /* libjsinspector-tvOS.a */, B94045BA21DE8E5B00E4FA3C /* libthird-party.a */, B94045BC21DE8E5B00E4FA3C /* libthird-party.a */, B94045BE21DE8E5B00E4FA3C /* libdouble-conversion.a */, B94045C021DE8E5B00E4FA3C /* libdouble-conversion.a */, B94045C221DE8E5B00E4FA3C /* libprivatedata.a */, B94045C421DE8E5B00E4FA3C /* libprivatedata-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 5E91572E1DD0AC6500FF2AA8 /* Products */ = { isa = PBXGroup; children = ( 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */, ); name = Products; sourceTree = "<group>"; }; 78C398B11ACF4ADC00677621 /* Products */ = { isa = PBXGroup; children = ( 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 146833FF1AC3E56700842450 /* React.xcodeproj */, 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, ); name = Libraries; sourceTree = "<group>"; }; 832341B11AAA6A8300B99B32 /* Products */ = { isa = PBXGroup; children = ( 832341B51AAA6A8300B99B32 /* libRCTText.a */, 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, ); name = Products; sourceTree = "<group>"; }; 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( 13B07FAE1A68108700A75B9A /* react_native_draftjs_render */, 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* react_native_draftjs_renderTests */, 83CBBA001A601CBA00E9B192 /* Products */, ); indentWidth = 2; sourceTree = "<group>"; tabWidth = 2; }; 83CBBA001A601CBA00E9B192 /* Products */ = { isa = PBXGroup; children = ( 13B07F961A680F5B00A75B9A /* react_native_draftjs_render.app */, 00E356EE1AD99517003FC87E /* react_native_draftjs_renderTests.xctest */, 2D02E47B1E0B4A5D006451C7 /* react_native_draftjs_render-tvOS.app */, 2D02E4901E0B4A5D006451C7 /* react_native_draftjs_render-tvOSTests.xctest */, ); name = Products; sourceTree = "<group>"; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 00E356ED1AD99517003FC87E /* react_native_draftjs_renderTests */ = { isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "react_native_draftjs_renderTests" */; buildPhases = ( 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, ); buildRules = ( ); dependencies = ( 00E356F51AD99517003FC87E /* PBXTargetDependency */, ); name = react_native_draftjs_renderTests; productName = react_native_draftjs_renderTests; productReference = 00E356EE1AD99517003FC87E /* react_native_draftjs_renderTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; 13B07F861A680F5B00A75B9A /* react_native_draftjs_render */ = { isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "react_native_draftjs_render" */; buildPhases = ( 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, ); buildRules = ( ); dependencies = ( ); name = react_native_draftjs_render; productName = "Hello World"; productReference = 13B07F961A680F5B00A75B9A /* react_native_draftjs_render.app */; productType = "com.apple.product-type.application"; }; 2D02E47A1E0B4A5D006451C7 /* react_native_draftjs_render-tvOS */ = { isa = PBXNativeTarget; buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "react_native_draftjs_render-tvOS" */; buildPhases = ( 2D02E4771E0B4A5D006451C7 /* Sources */, 2D02E4781E0B4A5D006451C7 /* Frameworks */, 2D02E4791E0B4A5D006451C7 /* Resources */, 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, ); buildRules = ( ); dependencies = ( ); name = "react_native_draftjs_render-tvOS"; productName = "react_native_draftjs_render-tvOS"; productReference = 2D02E47B1E0B4A5D006451C7 /* react_native_draftjs_render-tvOS.app */; productType = "com.apple.product-type.application"; }; 2D02E48F1E0B4A5D006451C7 /* react_native_draftjs_render-tvOSTests */ = { isa = PBXNativeTarget; buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "react_native_draftjs_render-tvOSTests" */; buildPhases = ( 2D02E48C1E0B4A5D006451C7 /* Sources */, 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 2D02E48E1E0B4A5D006451C7 /* Resources */, ); buildRules = ( ); dependencies = ( 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, ); name = "react_native_draftjs_render-tvOSTests"; productName = "react_native_draftjs_render-tvOSTests"; productReference = 2D02E4901E0B4A5D006451C7 /* react_native_draftjs_render-tvOSTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 1010; ORGANIZATIONNAME = Facebook; TargetAttributes = { 00E356ED1AD99517003FC87E = { CreatedOnToolsVersion = 6.2; TestTargetID = 13B07F861A680F5B00A75B9A; }; 2D02E47A1E0B4A5D006451C7 = { CreatedOnToolsVersion = 8.2.1; ProvisioningStyle = Automatic; }; 2D02E48F1E0B4A5D006451C7 = { CreatedOnToolsVersion = 8.2.1; ProvisioningStyle = Automatic; TestTargetID = 2D02E47A1E0B4A5D006451C7; }; }; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "react_native_draftjs_render" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 83CBB9F61A601CBA00E9B192; productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; projectDirPath = ""; projectReferences = ( { ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; }, { ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; }, { ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; }, { ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; }, { ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; }, { ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; }, { ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; }, { ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; }, { ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; }, { ProductGroup = 139FDEE71B06529A00C62182 /* Products */; ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; }, { ProductGroup = 146834001AC3E56700842450 /* Products */; ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; }, ); projectRoot = ""; targets = ( 13B07F861A680F5B00A75B9A /* react_native_draftjs_render */, 00E356ED1AD99517003FC87E /* react_native_draftjs_renderTests */, 2D02E47A1E0B4A5D006451C7 /* react_native_draftjs_render-tvOS */, 2D02E48F1E0B4A5D006451C7 /* react_native_draftjs_render-tvOSTests */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTActionSheet.a; remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTGeolocation.a; remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTImage.a; remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTNetwork.a; remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTVibration.a; remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTSettings.a; remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTWebSocket.a; remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 146834041AC3E56700842450 /* libReact.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libReact.a; remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTImage-tvOS.a"; remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTLinking-tvOS.a"; remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTNetwork-tvOS.a"; remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTSettings-tvOS.a"; remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTText-tvOS.a"; remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libRCTWebSocket-tvOS.a"; remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libReact.a; remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libyoga.a; remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libyoga.a; remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libcxxreact.a; remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libcxxreact.a; remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libjschelpers.a; remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libjschelpers.a; remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTAnimation.a; remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTAnimation.a; remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTLinking.a; remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTText.a; remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; B94045A221DE8E5B00E4FA3C /* libfishhook.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libfishhook.a; remoteRef = B94045A121DE8E5B00E4FA3C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; B94045A421DE8E5B00E4FA3C /* libfishhook-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libfishhook-tvOS.a"; remoteRef = B94045A321DE8E5B00E4FA3C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; B94045B621DE8E5B00E4FA3C /* libjsinspector.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libjsinspector.a; remoteRef = B94045B521DE8E5B00E4FA3C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; B94045B821DE8E5B00E4FA3C /* libjsinspector-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libjsinspector-tvOS.a"; remoteRef = B94045B721DE8E5B00E4FA3C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; B94045BA21DE8E5B00E4FA3C /* libthird-party.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libthird-party.a"; remoteRef = B94045B921DE8E5B00E4FA3C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; B94045BC21DE8E5B00E4FA3C /* libthird-party.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libthird-party.a"; remoteRef = B94045BB21DE8E5B00E4FA3C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; B94045BE21DE8E5B00E4FA3C /* libdouble-conversion.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libdouble-conversion.a"; remoteRef = B94045BD21DE8E5B00E4FA3C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; B94045C021DE8E5B00E4FA3C /* libdouble-conversion.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libdouble-conversion.a"; remoteRef = B94045BF21DE8E5B00E4FA3C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; B94045C221DE8E5B00E4FA3C /* libprivatedata.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libprivatedata.a; remoteRef = B94045C121DE8E5B00E4FA3C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; B94045C421DE8E5B00E4FA3C /* libprivatedata-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libprivatedata-tvOS.a"; remoteRef = B94045C321DE8E5B00E4FA3C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 00E356EC1AD99517003FC87E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 13B07F8E1A680F5B00A75B9A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E4791E0B4A5D006451C7 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E48E1E0B4A5D006451C7 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "Bundle React Native code and images"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; }; 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); name = "Bundle React Native Code And Images"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 00E356EA1AD99517003FC87E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 00E356F31AD99517003FC87E /* react_native_draftjs_renderTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 13B07F871A680F5B00A75B9A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E4771E0B4A5D006451C7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 2D02E48C1E0B4A5D006451C7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 2DCD954D1E0B4F2C00145EB5 /* react_native_draftjs_renderTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 13B07F861A680F5B00A75B9A /* react_native_draftjs_render */; targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; }; 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 2D02E47A1E0B4A5D006451C7 /* react_native_draftjs_render-tvOS */; targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { isa = PBXVariantGroup; children = ( 13B07FB21A68108700A75B9A /* Base */, ); name = LaunchScreen.xib; path = react_native_draftjs_render; sourceTree = "<group>"; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = react_native_draftjs_renderTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_LDFLAGS = ( "-ObjC", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/react_native_draftjs_render.app/react_native_draftjs_render"; }; name = Debug; }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = react_native_draftjs_renderTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; OTHER_LDFLAGS = ( "-ObjC", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/react_native_draftjs_render.app/react_native_draftjs_render"; }; name = Release; }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; INFOPLIST_FILE = react_native_draftjs_render/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = react_native_draftjs_render; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; INFOPLIST_FILE = react_native_draftjs_render/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = react_native_draftjs_render; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; }; 2D02E4971E0B4A5E006451C7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "react_native_draftjs_render-tvOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "-ObjC", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.react_native_draftjs_render-tvOS"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Debug; }; 2D02E4981E0B4A5E006451C7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "react_native_draftjs_render-tvOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "-ObjC", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.react_native_draftjs_render-tvOS"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Release; }; 2D02E4991E0B4A5E006451C7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "react_native_draftjs_render-tvOSTests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.react_native_draftjs_render-tvOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/react_native_draftjs_render-tvOS.app/react_native_draftjs_render-tvOS"; TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Debug; }; 2D02E49A1E0B4A5E006451C7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "react_native_draftjs_render-tvOSTests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.react_native_draftjs_render-tvOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/react_native_draftjs_render-tvOS.app/react_native_draftjs_render-tvOS"; TVOS_DEPLOYMENT_TARGET = 10.1; }; name = Release; }; 83CBBA201A601CBA00E9B192 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; 83CBBA211A601CBA00E9B192 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "react_native_draftjs_renderTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 00E356F61AD99517003FC87E /* Debug */, 00E356F71AD99517003FC87E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "react_native_draftjs_render" */ = { isa = XCConfigurationList; buildConfigurations = ( 13B07F941A680F5B00A75B9A /* Debug */, 13B07F951A680F5B00A75B9A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "react_native_draftjs_render-tvOS" */ = { isa = XCConfigurationList; buildConfigurations = ( 2D02E4971E0B4A5E006451C7 /* Debug */, 2D02E4981E0B4A5E006451C7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "react_native_draftjs_render-tvOSTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 2D02E4991E0B4A5E006451C7 /* Debug */, 2D02E49A1E0B4A5E006451C7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "react_native_draftjs_render" */ = { isa = XCConfigurationList; buildConfigurations = ( 83CBBA201A601CBA00E9B192 /* Debug */, 83CBBA211A601CBA00E9B192 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; }
{ "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; } else if (ctl_arrow && (c < 040 || c == 0177)) col++; else if (c < 040 || c >= 0177) col += 3; } SetPoint (pos); last_known_column = col; last_known_column_point = point; last_known_column_modified = bf_modified; XFASTINT (val) = col; return val; } struct position val_compute_motion; struct position * compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, tab_offset) int from, fromvpos, fromhpos, to, tovpos, tohpos; register int width; int hscroll, tab_offset; { /* Note that cpos is CURRENT_VPOS << SHORTBITS + CURRENT_HPOS, and the CURRENT_HPOS may be negative. Use these macros to extract the hpos or the vpos from cpos or anything like it. */ #ifdef celerity /* On the Celerity, the usual definition fails to work. This definition (which ought to be equivalent) does work. */ #define HPOS(VAR) (((VAR) & 0x8000 ? 0xffff0000 : 0) | ((VAR) & 0xffff)) #else #define HPOS(VAR) (short) (VAR) #endif #define VPOS(VAR) (((VAR) >> SHORTBITS) + (HPOS (VAR) < 0)) #ifndef TAHOE_REGISTER_BUG register #endif /* TAHOE_REGISTER_BUG */ int cpos = fromhpos + (fromvpos << SHORTBITS); register int target = tohpos + (tovpos << SHORTBITS); register int pos; register int c; register int tab_width = XFASTINT (bf_cur->tab_width); register int ctl_arrow = !NULL (bf_cur->ctl_arrow); int selective = XTYPE (bf_cur->selective_display) == Lisp_Int ? XINT (bf_cur->selective_display) : !NULL (bf_cur->selective_display) ? -1 : 0; int prevpos; struct position val; if (tab_width <= 0) tab_width = 1; for (pos = from; pos < to && cpos < target; pos++) { prevpos = cpos; c = CharAt (pos); if (c >= 040 && c < 0177) cpos++; else if (c == '\t') { cpos += tab_width - HPOS (cpos + tab_offset + hscroll - (hscroll > 0) /* Add tab_width here to make sure positive. cpos can be negative after continuation but can't be less than -tab_width. */ + tab_width) % tab_width; } else if (c == '\n') { if (selective > 0 && position_indentation (pos + 1) >= selective) { /* Skip any number of invisible lines all at once */ do { while (++pos < to && CharAt(pos) != '\n'); } while (selective > 0 && position_indentation (pos + 1) >= selective); pos--; /* Allow for the " ..." that is displayed for them. */ cpos += 4; if (HPOS (cpos) >= width) cpos -= HPOS (cpos) - width; } else cpos += (1 << SHORTBITS) - HPOS (cpos); cpos -= hscroll; if (hscroll > 0) cpos++; /* Count the ! on column 0 */ tab_offset = 0; } else if (c == CR && selective < 0) { /* In selective display mode, everything from a ^M to the end of the line is invisible */ while (pos < to && CharAt(pos) != '\n') pos++; pos--; } else cpos += (ctl_arrow && c < 0200) ? 2 : 4; if (HPOS (cpos) >= width && (HPOS (cpos) > width || (pos < NumCharacters && CharAt (pos + 1) != '\n'))) { if (cpos >= target) break; if (hscroll || (truncate_partial_width_windows && width + 1 < screen_width) || !NULL (bf_cur->truncate_lines)) { while (pos < to && CharAt(pos) != '\n') pos++; pos--; } else { cpos += (1 << SHORTBITS) - width; tab_offset += width; } } } val_compute_motion.bufpos = pos; val_compute_motion.hpos = HPOS (cpos); val_compute_motion.vpos = VPOS (cpos); val_compute_motion.prevhpos = HPOS (prevpos); /* Nonzero if have just continued a line */ val_compute_motion.contin = pos != from && (val_compute_motion.vpos != VPOS (prevpos)) && c != '\n'; return &val_compute_motion; } pos_tab_offset (w, pos) struct window *w; register int pos; { int opoint = point; int col; if (pos == FirstCharacter || CharAt (pos - 1) == '\n') return 0; SetPoint (pos); col = current_column (); SetPoint (opoint); return col - (col % (XFASTINT (w->width) - 1)); } /* start_hpos is the hpos of the first character of the buffer: zero except for the minibuffer window, where it is the width of the prompt. */ struct position val_vmotion; struct position * vmotion (from, vtarget, width, hscroll, window) register int from, vtarget, width; int hscroll; Lisp_Object window; { struct position pos; /* vpos is cumulative vertical position, changed as from is changed */ register int vpos = 0; register int prevline; register int first; int lmargin = hscroll > 0 ? 1 - hscroll : 0; int selective = XTYPE (bf_cur->selective_display) == Lisp_Int ? XINT (bf_cur->selective_display) : !NULL (bf_cur->selective_display) ? -1 : 0; int start_hpos = (EQ (window, minibuf_window) ? minibuf_prompt_width : 0); retry: if (vtarget > vpos) { /* Moving downward is simple, but must calculate from beg of line to determine hpos of starting point */ if (from > FirstCharacter && CharAt (from - 1) != '\n') { prevline = ScanBf ('\n', from, -1); while (selective > 0 && prevline > FirstCharacter && position_indentation (prevline) >= selective) prevline = ScanBf ('\n', prevline - 1, -1); pos = *compute_motion (prevline, 0, lmargin + (prevline == 1 ? start_hpos : 0), from, 10000, 10000, width, hscroll, 0); } else { pos.hpos = lmargin + (from == 1 ? start_hpos : 0); pos.vpos = 0; } return compute_motion (from, vpos, pos.hpos, 1 + NumCharacters, vtarget, - (1 << (SHORTBITS - 1)), width, hscroll, pos.vpos * width); } /* To move upward, go a line at a time until we have gone at least far enough */ first = 1; while ((vpos > vtarget || first) && from > FirstCharacter) { prevline = from; while (1) { prevline = ScanBf ('\n', prevline - 1, -1); if (prevline == FirstCharacter || selective <= 0 || position_indentation (prevline) < selective) break; } pos = *compute_motion (prevline, 0, lmargin + (prevline == 1 ? start_hpos : 0), from, 10000, 10000, width, hscroll, 0); vpos -= pos.vpos; first = 0; from = prevline; } /* If we made exactly the desired vertical distance, or if we hit beginning of buffer, return point found */ if (vpos >= vtarget) { val_vmotion.bufpos = from; val_vmotion.vpos = vpos; val_vmotion.hpos = lmargin; val_vmotion.contin = 0; val_vmotion.prevhpos = 0; return &val_vmotion; } /* Otherwise find the correct spot by moving down */ goto retry; } DEFUN ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 1, 0, "Move to start of screen line LINES lines down.\n\ If LINES is negative, this is moving up.\n\ Sets point to position found; this may be start of line\n\ or just the start of a continuation line.\n\ Returns number of lines moved; may be closer to zero than LINES\n\ if end of buffer was reached.") (lines) Lisp_Object lines; { struct position pos; register struct window *w = XWINDOW (selected_window); CHECK_NUMBER (lines, 0); pos = *vmotion (point, XINT (lines), XFASTINT (w->width) - 1 - (XFASTINT (w->width) + XFASTINT (w->left) != XFASTINT (XWINDOW (minibuf_window)->width)), /* Not XFASTINT since perhaps could be negative */ XINT (w->hscroll), selected_window); SetPoint (pos.bufpos); return make_number (pos.vpos); } syms_of_indent () { DefBoolVar ("indent-tabs-mode", &indent_tabs_mode, "*Indentation can insert tabs if this is non-nil."); indent_tabs_mode = 1; defsubr (&Scurrent_indentation); defsubr (&Sindent_to); defsubr (&Scurrent_column); defsubr (&Smove_to_column); defsubr (&Svertical_motion); }
{ "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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.<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></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="AntTask.PhaseOpttag_fieldrw()"><!-- --></A><H3> AntTask.PhaseOpttag_fieldrw</H3> <PRE> public <B>AntTask.PhaseOpttag_fieldrw</B>()</PRE> <DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="setenabled(boolean)"><!-- --></A><H3> setenabled</H3> <PRE> public void <B>setenabled</B>(boolean&nbsp;arg)</PRE> <DL> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" 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_bottom_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_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
{ "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">(</span><span class="variable">DSA_METHOD</span> <span class="variable">*dsam</span><span class="operator">,</span> <span class="keyword">int</span> <span class="operator">(</span><span class="variable">*sign_setup</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="operator">(</span><span class="variable">*DSA_meth_get_verify</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_SIG</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_verify</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="operator">(</span><span class="variable">*verify</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_SIG</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_mod_exp</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="variable">*dsa</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*rr</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*a1</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*p1</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*a2</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*p2</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*m</span><span class="operator">,</span> <span class="variable">BN_CTX</span> <span class="variable">*ctx</span><span class="operator">,</span> <span class="variable">BN_MONT_CTX</span> <span class="variable">*in_mont</span><span class="operator">);</span> <span class="keyword">int</span> <span class="variable">DSA_meth_set_mod_exp</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="operator">(</span><span class="variable">*mod_exp</span><span class="operator">)(</span><span class="variable">DSA</span> <span class="variable">*dsa</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*rr</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*a1</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*p1</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*a2</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*p2</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*m</span><span class="operator">,</span> <span class="variable">BN_CTX</span> <span class="variable">*ctx</span><span class="operator">,</span> <span class="variable">BN_MONT_CTX</span> <span class="variable">*mont</span><span class="operator">));</span> <span class="keyword">int</span> <span class="operator">(</span><span class="variable">*DSA_meth_get_bn_mod_exp</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="variable">*dsa</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*r</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*a</span><span class="operator">,</span> <span class="variable">const</span> <span class="variable">BIGNUM</span> <span class="variable">*p</span><span class="operator">,</span> <span class="variable">const</span> <span class="variable">BIGNUM</span> <span class="variable">*m</span><span class="operator">,</span> <span class="variable">BN_CTX</span> <span class="variable">*ctx</span><span class="operator">,</span> <span class="variable">BN_MONT_CTX</span> <span class="variable">*mont</span><span class="operator">);</span> <span class="keyword">int</span> <span class="variable">DSA_meth_set_bn_mod_exp</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="operator">(</span><span class="variable">*bn_mod_exp</span><span class="operator">)(</span><span class="variable">DSA</span> <span class="variable">*dsa</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*r</span><span class="operator">,</span> <span class="variable">BIGNUM</span> <span class="variable">*a</span><span class="operator">,</span> <span class="variable">const</span> <span class="variable">BIGNUM</span> <span class="variable">*p</span><span class="operator">,</span> <span class="variable">const</span> <span class="variable">BIGNUM</span> <span class="variable">*m</span><span class="operator">,</span> <span class="variable">BN_CTX</span> <span class="variable">*ctx</span><span class="operator">,</span> <span class="variable">BN_MONT_CTX</span> <span class="variable">*mont</span><span class="operator">));</span> <span class="keyword">int</span> <span class="operator">(</span><span class="variable">*DSA_meth_get_init</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="keyword">int</span> <span class="variable">DSA_meth_set_init</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="operator">(</span><span class="variable">*init</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_finish</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="keyword">int</span> <span class="variable">DSA_meth_set_finish</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="operator">(</span><span class="variable">*finish</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_paramgen</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="keyword">int</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="keyword">int</span> <span class="operator">*,</span> <span class="variable">unsigned</span> <span class="variable">long</span> <span class="operator">*,</span> <span class="variable">BN_GENCB</span> <span class="operator">*);</span> <span class="keyword">int</span> <span class="variable">DSA_meth_set_paramgen</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="operator">(</span><span class="variable">*paramgen</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">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="keyword">int</span> <span class="operator">*,</span> <span class="variable">unsigned</span> <span class="variable">long</span> <span class="operator">*,</span> <span class="variable">BN_GENCB</span> <span class="operator">*));</span> <span class="keyword">int</span> <span class="operator">(</span><span class="variable">*DSA_meth_get_keygen</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="keyword">int</span> <span class="variable">DSA_meth_set_keygen</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="operator">(</span><span class="variable">*keygen</span><span class="operator">)(</span><span class="variable">DSA</span> <span class="operator">*));</span> </code></pre> <h1 id="DESCRIPTION">DESCRIPTION</h1> <p>The <b>DSA_METHOD</b> type is a structure used for the provision of custom DSA implementations. It provides a set of functions used by OpenSSL for the implementation of the various DSA capabilities. See the <a href="/../man1/dsa.html">dsa</a> page for more information.</p> <p>DSA_meth_new() creates a new <b>DSA_METHOD</b> structure. It should be given a unique <b>name</b> and a set of <b>flags</b>. The <b>name</b> should be a NULL terminated string, which will be duplicated and stored in the <b>DSA_METHOD</b> object. It is the callers responsibility to free the original string. The flags will be used during the construction of a new <b>DSA</b> object based on this <b>DSA_METHOD</b>. Any new <b>DSA</b> object will have those flags set by default.</p> <p>DSA_meth_dup() creates a duplicate copy of the <b>DSA_METHOD</b> object passed as a parameter. This might be useful for creating a new <b>DSA_METHOD</b> based on an existing one, but with some differences.</p> <p>DSA_meth_free() destroys a <b>DSA_METHOD</b> structure and frees up any memory associated with it.</p> <p>DSA_meth_get0_name() will return a pointer to the name of this DSA_METHOD. This is a pointer to the internal name string and so should not be freed by the caller. DSA_meth_set1_name() sets the name of the DSA_METHOD to <b>name</b>. The string is duplicated and the copy is stored in the DSA_METHOD structure, so the caller remains responsible for freeing the memory associated with the name.</p> <p>DSA_meth_get_flags() returns the current value of the flags associated with this DSA_METHOD. DSA_meth_set_flags() provides the ability to set these flags.</p> <p>The functions DSA_meth_get0_app_data() and DSA_meth_set0_app_data() provide the ability to associate implementation specific data with the DSA_METHOD. It is the application&#39;s responsibility to free this data before the DSA_METHOD is freed via a call to DSA_meth_free().</p> <p>DSA_meth_get_sign() and DSA_meth_set_sign() get and set the function used for creating a DSA signature respectively. This function will be called in response to the application calling DSA_do_sign() (or DSA_sign()). The parameters for the function have the same meaning as for DSA_do_sign().</p> <p>DSA_meth_get_sign_setup() and DSA_meth_set_sign_setup() get and set the function used for precalculating the DSA signature values <b>k^-1</b> and <b>r</b>. This function will be called in response to the application calling DSA_sign_setup(). The parameters for the function have the same meaning as for DSA_sign_setup().</p> <p>DSA_meth_get_verify() and DSA_meth_set_verify() get and set the function used for verifying a DSA signature respectively. This function will be called in response to the application calling DSA_do_verify() (or DSA_verify()). The parameters for the function have the same meaning as for DSA_do_verify().</p> <p>DSA_meth_get_mod_exp() and DSA_meth_set_mod_exp() get and set the function used for computing the following value:</p> <pre><code> rr = a1^p1 * a2^p2 mod m</code></pre> <p>This function will be called by the default OpenSSL method during verification of a DSA signature. The result is stored in the <b>rr</b> parameter. This function may be NULL.</p> <p>DSA_meth_get_bn_mod_exp() and DSA_meth_set_bn_mod_exp() get and set the function used for computing the following value:</p> <pre><code> r = a ^ p mod m</code></pre> <p>This function will be called by the default OpenSSL function for DSA_sign_setup(). The result is stored in the <b>r</b> parameter. This function may be NULL.</p> <p>DSA_meth_get_init() and DSA_meth_set_init() get and set the function used for creating a new DSA instance respectively. This function will be called in response to the application calling DSA_new() (if the current default DSA_METHOD is this one) or DSA_new_method(). The DSA_new() and DSA_new_method() functions will allocate the memory for the new DSA object, and a pointer to this newly allocated structure will be passed as a parameter to the function. This function may be NULL.</p> <p>DSA_meth_get_finish() and DSA_meth_set_finish() get and set the function used for destroying an instance of a DSA object respectively. This function will be called in response to the application calling DSA_free(). A pointer to the DSA to be destroyed is passed as a parameter. The destroy function should be used for DSA implementation specific clean up. The memory for the DSA itself should not be freed by this function. This function may be NULL.</p> <p>DSA_meth_get_paramgen() and DSA_meth_set_paramgen() get and set the function used for generating DSA parameters respectively. This function will be called in response to the application calling DSA_generate_parameters_ex() (or DSA_generate_parameters()). The parameters for the function have the same meaning as for DSA_generate_parameters_ex().</p> <p>DSA_meth_get_keygen() and DSA_meth_set_keygen() get and set the function used for generating a new DSA key pair respectively. This function will be called in response to the application calling DSA_generate_key(). The parameter for the function has the same meaning as for DSA_generate_key().</p> <h1 id="RETURN-VALUES">RETURN VALUES</h1> <p>DSA_meth_new() and DSA_meth_dup() return the newly allocated DSA_METHOD object or NULL on failure.</p> <p>DSA_meth_get0_name() and DSA_meth_get_flags() return the name and flags associated with the DSA_METHOD respectively.</p> <p>All other DSA_meth_get_*() functions return the appropriate function pointer that has been set in the DSA_METHOD, or NULL if no such pointer has yet been set.</p> <p>DSA_meth_set1_name() and all DSA_meth_set_*() functions return 1 on success or 0 on failure.</p> <h1 id="SEE-ALSO">SEE ALSO</h1> <p><a href="../man3/DSA_new.html">DSA_new(3)</a>, <a href="../man3/DSA_new.html">DSA_new(3)</a>, <a href="../man3/DSA_generate_parameters.html">DSA_generate_parameters(3)</a>, <a href="../man3/DSA_generate_key.html">DSA_generate_key(3)</a>, <a href="../man3/DSA_dup_DH.html">DSA_dup_DH(3)</a>, <a href="../man3/DSA_do_sign.html">DSA_do_sign(3)</a>, <a href="../man3/DSA_set_method.html">DSA_set_method(3)</a>, <a href="../man3/DSA_SIG_new.html">DSA_SIG_new(3)</a>, <a href="../man3/DSA_sign.html">DSA_sign(3)</a>, <a href="../man3/DSA_size.html">DSA_size(3)</a>, <a href="../man3/DSA_get0_pqg.html">DSA_get0_pqg(3)</a></p> <h1 id="HISTORY">HISTORY</h1> <p>The functions described here were added in OpenSSL 1.1.0.</p> <h1 id="COPYRIGHT">COPYRIGHT</h1> <p>Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.</p> <p>Licensed under the OpenSSL license (the &quot;License&quot;). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p> </body> </html>
{ "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 readyc chan Ready advancec chan struct{} tickc chan struct{} done chan struct{} stop chan struct{} status chan chan Status } func newNode() node { return node{ propc: make(chan pb.Message), recvc: make(chan pb.Message), confc: make(chan pb.ConfChange), confstatec: make(chan pb.ConfState), readyc: make(chan Ready), advancec: make(chan struct{}), tickc: make(chan struct{}), done: make(chan struct{}), stop: make(chan struct{}), status: make(chan chan Status), } } func (n *node) Stop() { select { case n.stop <- struct{}{}: // Not already stopped, so trigger it case <-n.done: // Node has already been stopped - no need to do anything return } // Block until the stop has been acknowledged by run() <-n.done } func (n *node) run(r *raft) { var propc chan pb.Message var readyc chan Ready var advancec chan struct{} var prevLastUnstablei, prevLastUnstablet uint64 var havePrevLastUnstablei bool var prevSnapi uint64 var rd Ready lead := None prevSoftSt := r.softState() prevHardSt := emptyState for { if advancec != nil { readyc = nil } else { rd = newReady(r, prevSoftSt, prevHardSt) if rd.containsUpdates() { readyc = n.readyc } else { readyc = nil } } if lead != r.lead { if r.hasLeader() { if lead == None { raftLogger.Infof("raft.node: %x elected leader %x at term %d", r.id, r.lead, r.Term) } else { raftLogger.Infof("raft.node: %x changed leader from %x to %x at term %d", r.id, lead, r.lead, r.Term) } propc = n.propc } else { raftLogger.Infof("raft.node: %x lost leader %x at term %d", r.id, lead, r.Term) propc = nil } lead = r.lead } select { // TODO: maybe buffer the config propose if there exists one (the way // described in raft dissertation) // Currently it is dropped in Step silently. case m := <-propc: m.From = r.id r.Step(m) case m := <-n.recvc: // filter out response message from unknown From. if _, ok := r.prs[m.From]; ok || !IsResponseMsg(m) { r.Step(m) // raft never returns an error } case cc := <-n.confc: if cc.NodeID == None { r.resetPendingConf() select { case n.confstatec <- pb.ConfState{Nodes: r.nodes()}: case <-n.done: } break } switch cc.Type { case pb.ConfChangeAddNode: r.addNode(cc.NodeID) case pb.ConfChangeRemoveNode: // block incoming proposal when local node is // removed if cc.NodeID == r.id { n.propc = nil } r.removeNode(cc.NodeID) case pb.ConfChangeUpdateNode: r.resetPendingConf() default: panic("unexpected conf type") } select { case n.confstatec <- pb.ConfState{Nodes: r.nodes()}: case <-n.done: } case <-n.tickc: r.tick() case readyc <- rd: if rd.SoftState != nil { prevSoftSt = rd.SoftState } if len(rd.Entries) > 0 { prevLastUnstablei = rd.Entries[len(rd.Entries)-1].Index prevLastUnstablet = rd.Entries[len(rd.Entries)-1].Term havePrevLastUnstablei = true } if !IsEmptyHardState(rd.HardState) { prevHardSt = rd.HardState } if !IsEmptySnap(rd.Snapshot) { prevSnapi = rd.Snapshot.Metadata.Index } r.msgs = nil advancec = n.advancec case <-advancec: if prevHardSt.Commit != 0 { r.raftLog.appliedTo(prevHardSt.Commit) } if havePrevLastUnstablei { r.raftLog.stableTo(prevLastUnstablei, prevLastUnstablet) havePrevLastUnstablei = false } r.raftLog.stableSnapTo(prevSnapi) advancec = nil case c := <-n.status: c <- getStatus(r) case <-n.stop: close(n.done) return } } } // Tick increments the internal logical clock for this Node. Election timeouts // and heartbeat timeouts are in units of ticks. func (n *node) Tick() { select { case n.tickc <- struct{}{}: case <-n.done: } } func (n *node) Campaign(ctx context.Context) error { return n.step(ctx, pb.Message{Type: pb.MsgHup}) } func (n *node) Propose(ctx context.Context, data []byte) error { return n.step(ctx, pb.Message{Type: pb.MsgProp, Entries: []pb.Entry{{Data: data}}}) } func (n *node) Step(ctx context.Context, m pb.Message) error { // ignore unexpected local messages receiving over network if IsLocalMsg(m) { // TODO: return an error? return nil } return n.step(ctx, m) } func (n *node) ProposeConfChange(ctx context.Context, cc pb.ConfChange) error { data, err := cc.Marshal() if err != nil { return err } return n.Step(ctx, pb.Message{Type: pb.MsgProp, Entries: []pb.Entry{{Type: pb.EntryConfChange, Data: data}}}) } // Step advances the state machine using msgs. The ctx.Err() will be returned, // if any. func (n *node) step(ctx context.Context, m pb.Message) error { ch := n.recvc if m.Type == pb.MsgProp { ch = n.propc } select { case ch <- m: return nil case <-ctx.Done(): return ctx.Err() case <-n.done: return ErrStopped } } func (n *node) Ready() <-chan Ready { return n.readyc } func (n *node) Advance() { select { case n.advancec <- struct{}{}: case <-n.done: } } func (n *node) ApplyConfChange(cc pb.ConfChange) *pb.ConfState { var cs pb.ConfState select { case n.confc <- cc: case <-n.done: } select { case cs = <-n.confstatec: case <-n.done: } return &cs } func (n *node) Status() Status { c := make(chan Status) n.status <- c return <-c } func (n *node) ReportUnreachable(id uint64) { select { case n.recvc <- pb.Message{Type: pb.MsgUnreachable, From: id}: case <-n.done: } } func (n *node) ReportSnapshot(id uint64, status SnapshotStatus) { rej := status == SnapshotFailure select { case n.recvc <- pb.Message{Type: pb.MsgSnapStatus, From: id, Reject: rej}: case <-n.done: } } func newReady(r *raft, prevSoftSt *SoftState, prevHardSt pb.HardState) Ready { rd := Ready{ Entries: r.raftLog.unstableEntries(), CommittedEntries: r.raftLog.nextEnts(), Messages: r.msgs, } if softSt := r.softState(); !softSt.equal(prevSoftSt) { rd.SoftState = softSt } if !isHardStateEqual(r.HardState, prevHardSt) { rd.HardState = r.HardState } if r.raftLog.unstable.snapshot != nil { rd.Snapshot = *r.raftLog.unstable.snapshot } return rd }
{ "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 lock_ram_in_cache sync #endif #if (CONFIG_SYS_CCSRBAR_DEFAULT != CONFIG_SYS_CCSRBAR) bl setup_ccsrbar #endif /* set up the stack pointer in our newly created * cache-ram (r1) */ lis r1, (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET)@h ori r1, r1, (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET)@l li r0, 0 /* Make room for stack frame header and */ stwu r0, -4(r1) /* clear final stack frame so that */ stwu r0, -4(r1) /* stack backtraces terminate cleanly */ GET_GOT /* initialize GOT access */ /* run low-level CPU init code (from Flash) */ bl cpu_init_f sync #ifdef RUN_DIAG /* Load PX_AUX register address in r4 */ lis r4, PIXIS_BASE@h ori r4, r4, 0x6 /* Load contents of PX_AUX in r3 bits 24 to 31*/ lbz r3, 0(r4) /* Mask and obtain the bit in r3 */ rlwinm. r3, r3, 0, 24, 24 /* If not zero, jump and continue with u-boot */ bne diag_done /* Load back contents of PX_AUX in r3 bits 24 to 31 */ lbz r3, 0(r4) /* Set the MSB of the register value */ ori r3, r3, 0x80 /* Write value in r3 back to PX_AUX */ stb r3, 0(r4) /* Get the address to jump to in r3*/ lis r3, CONFIG_SYS_DIAG_ADDR@h ori r3, r3, CONFIG_SYS_DIAG_ADDR@l /* Load the LR with the branch address */ mtlr r3 /* Branch to diagnostic */ blr diag_done: #endif /* bl l2cache_enable */ /* run 1st part of board init code (from Flash) */ li r3, 0 /* clear boot_flag for calling board_init_f */ bl board_init_f sync /* NOTREACHED - board_init_f() does not return */ .globl invalidate_bats invalidate_bats: li r0, 0 /* invalidate BATs */ mtspr IBAT0U, r0 mtspr IBAT1U, r0 mtspr IBAT2U, r0 mtspr IBAT3U, r0 mtspr IBAT4U, r0 mtspr IBAT5U, r0 mtspr IBAT6U, r0 mtspr IBAT7U, r0 isync mtspr DBAT0U, r0 mtspr DBAT1U, r0 mtspr DBAT2U, r0 mtspr DBAT3U, r0 mtspr DBAT4U, r0 mtspr DBAT5U, r0 mtspr DBAT6U, r0 mtspr DBAT7U, r0 isync sync blr #define CONFIG_BAT_PAIR(n) \ lis r4, CONFIG_SYS_IBAT##n##L@h; \ ori r4, r4, CONFIG_SYS_IBAT##n##L@l; \ lis r3, CONFIG_SYS_IBAT##n##U@h; \ ori r3, r3, CONFIG_SYS_IBAT##n##U@l; \ mtspr IBAT##n##L, r4; \ mtspr IBAT##n##U, r3; \ lis r4, CONFIG_SYS_DBAT##n##L@h; \ ori r4, r4, CONFIG_SYS_DBAT##n##L@l; \ lis r3, CONFIG_SYS_DBAT##n##U@h; \ ori r3, r3, CONFIG_SYS_DBAT##n##U@l; \ mtspr DBAT##n##L, r4; \ mtspr DBAT##n##U, r3; /* * setup_bats: * * Set up the final BAT registers now that setup is done. * * Assumes that: * 1) Address translation is enabled upon entry * 2) The boot rom is still accessible via 1:1 translation */ .globl setup_bats setup_bats: mflr r5 sync /* * When we disable address translation, we will get 1:1 (VA==PA) * translation. The only place we know for sure is safe for that is * the bootrom where we originally started out. Pop back into there. */ lis r4, CONFIG_SYS_MONITOR_BASE_EARLY@h ori r4, r4, CONFIG_SYS_MONITOR_BASE_EARLY@l addi r4, r4, trans_disabled - _start + EXC_OFF_SYS_RESET /* disable address translation */ mfmsr r3 rlwinm r3, r3, 0, 28, 25 mtspr SRR0, r4 mtspr SRR1, r3 rfi trans_disabled: #if defined(CONFIG_SYS_DBAT0U) && defined(CONFIG_SYS_DBAT0L) \ && defined(CONFIG_SYS_IBAT0U) && defined(CONFIG_SYS_IBAT0L) CONFIG_BAT_PAIR(0) #endif CONFIG_BAT_PAIR(1) CONFIG_BAT_PAIR(2) CONFIG_BAT_PAIR(3) CONFIG_BAT_PAIR(4) CONFIG_BAT_PAIR(5) CONFIG_BAT_PAIR(6) CONFIG_BAT_PAIR(7) sync isync /* Turn translation back on and return */ mfmsr r3 ori r3, r3, (MSR_IR | MSR_DR) mtspr SPRN_SRR0,r5 mtspr SPRN_SRR1,r3 rfi /* * early_bats: * * Set up bats needed early on - this is usually the BAT for the * stack-in-cache, the Flash, and CCSR space */ .globl early_bats early_bats: /* IBAT 3 */ lis r4, CONFIG_SYS_IBAT3L@h ori r4, r4, CONFIG_SYS_IBAT3L@l lis r3, CONFIG_SYS_IBAT3U@h ori r3, r3, CONFIG_SYS_IBAT3U@l mtspr IBAT3L, r4 mtspr IBAT3U, r3 isync /* DBAT 3 */ lis r4, CONFIG_SYS_DBAT3L@h ori r4, r4, CONFIG_SYS_DBAT3L@l lis r3, CONFIG_SYS_DBAT3U@h ori r3, r3, CONFIG_SYS_DBAT3U@l mtspr DBAT3L, r4 mtspr DBAT3U, r3 isync /* IBAT 5 */ lis r4, CONFIG_SYS_IBAT5L@h ori r4, r4, CONFIG_SYS_IBAT5L@l lis r3, CONFIG_SYS_IBAT5U@h ori r3, r3, CONFIG_SYS_IBAT5U@l mtspr IBAT5L, r4 mtspr IBAT5U, r3 isync /* DBAT 5 */ lis r4, CONFIG_SYS_DBAT5L@h ori r4, r4, CONFIG_SYS_DBAT5L@l lis r3, CONFIG_SYS_DBAT5U@h ori r3, r3, CONFIG_SYS_DBAT5U@l mtspr DBAT5L, r4 mtspr DBAT5U, r3 isync /* IBAT 6 */ lis r4, CONFIG_SYS_IBAT6L_EARLY@h ori r4, r4, CONFIG_SYS_IBAT6L_EARLY@l lis r3, CONFIG_SYS_IBAT6U_EARLY@h ori r3, r3, CONFIG_SYS_IBAT6U_EARLY@l mtspr IBAT6L, r4 mtspr IBAT6U, r3 isync /* DBAT 6 */ lis r4, CONFIG_SYS_DBAT6L_EARLY@h ori r4, r4, CONFIG_SYS_DBAT6L_EARLY@l lis r3, CONFIG_SYS_DBAT6U_EARLY@h ori r3, r3, CONFIG_SYS_DBAT6U_EARLY@l mtspr DBAT6L, r4 mtspr DBAT6U, r3 isync #if(CONFIG_SYS_CCSRBAR_DEFAULT != CONFIG_SYS_CCSRBAR) /* IBAT 7 */ lis r4, CONFIG_SYS_CCSR_DEFAULT_IBATL@h ori r4, r4, CONFIG_SYS_CCSR_DEFAULT_IBATL@l lis r3, CONFIG_SYS_CCSR_DEFAULT_IBATU@h ori r3, r3, CONFIG_SYS_CCSR_DEFAULT_IBATU@l mtspr IBAT7L, r4 mtspr IBAT7U, r3 isync /* DBAT 7 */ lis r4, CONFIG_SYS_CCSR_DEFAULT_DBATL@h ori r4, r4, CONFIG_SYS_CCSR_DEFAULT_DBATL@l lis r3, CONFIG_SYS_CCSR_DEFAULT_DBATU@h ori r3, r3, CONFIG_SYS_CCSR_DEFAULT_DBATU@l mtspr DBAT7L, r4 mtspr DBAT7U, r3 isync #endif blr .globl clear_tlbs clear_tlbs: addis r3, 0, 0x0000 addis r5, 0, 0x4 isync tlblp: tlbie r3 sync addi r3, r3, 0x1000 cmp 0, 0, r3, r5 blt tlblp blr .globl disable_addr_trans disable_addr_trans: /* disable address translation */ mflr r4 mfmsr r3 andi. r0, r3, (MSR_IR | MSR_DR) beqlr andc r3, r3, r0 mtspr SRR0, r4 mtspr SRR1, r3 rfi /* * This code finishes saving the registers to the exception frame * and jumps to the appropriate handler for the exception. * Register r21 is pointer into trap frame, r1 has new stack pointer. */ .globl transfer_to_handler transfer_to_handler: stw r22,_NIP(r21) lis r22,MSR_POW@h andc r23,r23,r22 stw r23,_MSR(r21) SAVE_GPR(7, r21) SAVE_4GPRS(8, r21) SAVE_8GPRS(12, r21) SAVE_8GPRS(24, r21) mflr r23 andi. r24,r23,0x3f00 /* get vector offset */ stw r24,TRAP(r21) li r22,0 stw r22,RESULT(r21) mtspr SPRG2,r22 /* r1 is now kernel sp */ lwz r24,0(r23) /* virtual address of handler */ lwz r23,4(r23) /* where to go when done */ mtspr SRR0,r24 mtspr SRR1,r20 mtlr r23 SYNC rfi /* jump to handler, enable MMU */ int_return: mfmsr r28 /* Disable interrupts */ li r4,0 ori r4,r4,MSR_EE andc r28,r28,r4 SYNC /* Some chip revs need this... */ mtmsr r28 SYNC lwz r2,_CTR(r1) lwz r0,_LINK(r1) mtctr r2 mtlr r0 lwz r2,_XER(r1) lwz r0,_CCR(r1) mtspr XER,r2 mtcrf 0xFF,r0 REST_10GPRS(3, r1) REST_10GPRS(13, r1) REST_8GPRS(23, r1) REST_GPR(31, r1) lwz r2,_NIP(r1) /* Restore environment */ lwz r0,_MSR(r1) mtspr SRR0,r2 mtspr SRR1,r0 lwz r0,GPR0(r1) lwz r2,GPR2(r1) lwz r1,GPR1(r1) SYNC rfi .globl dc_read dc_read: blr /* * Function: in8 * Description: Input 8 bits */ .globl in8 in8: lbz r3,0x0000(r3) blr /* * Function: out8 * Description: Output 8 bits */ .globl out8 out8: stb r4,0x0000(r3) blr /* * Function: out16 * Description: Output 16 bits */ .globl out16 out16: sth r4,0x0000(r3) blr /* * Function: out16r * Description: Byte reverse and output 16 bits */ .globl out16r out16r: sthbrx r4,r0,r3 blr /* * Function: out32 * Description: Output 32 bits */ .globl out32 out32: stw r4,0x0000(r3) blr /* * Function: out32r * Description: Byte reverse and output 32 bits */ .globl out32r out32r: stwbrx r4,r0,r3 blr /* * Function: in16 * Description: Input 16 bits */ .globl in16 in16: lhz r3,0x0000(r3) blr /* * Function: in16r * Description: Input 16 bits and byte reverse */ .globl in16r in16r: lhbrx r3,r0,r3 blr /* * Function: in32 * Description: Input 32 bits */ .globl in32 in32: lwz 3,0x0000(3) blr /* * Function: in32r * Description: Input 32 bits and byte reverse */ .globl in32r in32r: lwbrx r3,r0,r3 blr /* * void relocate_code (addr_sp, gd, addr_moni) * * This "function" does not return, instead it continues in RAM * after relocating the monitor code. * * r3 = dest * r4 = src * r5 = length in bytes * r6 = cachelinesize */ .globl relocate_code relocate_code: mr r1, r3 /* Set new stack pointer */ mr r9, r4 /* Save copy of Global Data pointer */ mr r10, r5 /* Save copy of Destination Address */ GET_GOT mr r3, r5 /* Destination Address */ lis r4, CONFIG_SYS_MONITOR_BASE@h /* Source Address */ ori r4, r4, CONFIG_SYS_MONITOR_BASE@l lwz r5, GOT(__init_end) sub r5, r5, r4 li r6, CONFIG_SYS_CACHELINE_SIZE /* Cache Line Size */ /* * Fix GOT pointer: * * New GOT-PTR = (old GOT-PTR - CONFIG_SYS_MONITOR_BASE) + Destination Address * * Offset: */ sub r15, r10, r4 /* First our own GOT */ add r12, r12, r15 /* then the one used by the C code */ add r30, r30, r15 /* * Now relocate code */ cmplw cr1,r3,r4 addi r0,r5,3 srwi. r0,r0,2 beq cr1,4f /* In place copy is not necessary */ beq 7f /* Protect against 0 count */ mtctr r0 bge cr1,2f la r8,-4(r4) la r7,-4(r3) 1: lwzu r0,4(r8) stwu r0,4(r7) bdnz 1b b 4f 2: slwi r0,r0,2 add r8,r4,r0 add r7,r3,r0 3: lwzu r0,-4(r8) stwu r0,-4(r7) bdnz 3b /* * Now flush the cache: note that we must start from a cache aligned * address. Otherwise we might miss one cache line. */ 4: cmpwi r6,0 add r5,r3,r5 beq 7f /* Always flush prefetch queue in any case */ subi r0,r6,1 andc r3,r3,r0 mr r4,r3 5: dcbst 0,r4 add r4,r4,r6 cmplw r4,r5 blt 5b sync /* Wait for all dcbst to complete on bus */ mr r4,r3 6: icbi 0,r4 add r4,r4,r6 cmplw r4,r5 blt 6b 7: sync /* Wait for all icbi to complete on bus */ isync /* * We are done. Do not return, instead branch to second part of board * initialization, now running from RAM. */ addi r0, r10, in_ram - _start + EXC_OFF_SYS_RESET mtlr r0 blr in_ram: /* * Relocation Function, r12 point to got2+0x8000 * * Adjust got2 pointers, no need to check for 0, this code * already puts a few entries in the table. */ li r0,__got2_entries@sectoff@l la r3,GOT(_GOT2_TABLE_) lwz r11,GOT(_GOT2_TABLE_) mtctr r0 sub r11,r3,r11 addi r3,r3,-4 1: lwzu r0,4(r3) cmpwi r0,0 beq- 2f add r0,r0,r11 stw r0,0(r3) 2: bdnz 1b /* * Now adjust the fixups and the pointers to the fixups * in case we need to move ourselves again. */ li r0,__fixup_entries@sectoff@l lwz r3,GOT(_FIXUP_TABLE_) cmpwi r0,0 mtctr r0 addi r3,r3,-4 beq 4f 3: lwzu r4,4(r3) lwzux r0,r4,r11 cmpwi r0,0 add r0,r0,r11 stw r4,0(r3) beq- 5f stw r0,0(r4) 5: bdnz 3b 4: /* clear_bss: */ /* * Now clear BSS segment */ lwz r3,GOT(__bss_start) lwz r4,GOT(__bss_end) cmplw 0, r3, r4 beq 6f li r0, 0 5: stw r0, 0(r3) addi r3, r3, 4 cmplw 0, r3, r4 bne 5b 6: mr r3, r9 /* Init Date pointer */ mr r4, r10 /* Destination Address */ bl board_init_r /* not reached - end relocate_code */ /*-----------------------------------------------------------------------*/ /* * Copy exception vector code to low memory * * r3: dest_addr * r7: source address, r8: end address, r9: target address */ .globl trap_init trap_init: mflr r4 /* save link register */ GET_GOT lwz r7, GOT(_start) lwz r8, GOT(_end_of_vectors) li r9, 0x100 /* reset vector always at 0x100 */ cmplw 0, r7, r8 bgelr /* return if r7>=r8 - just in case */ 1: lwz r0, 0(r7) stw r0, 0(r9) addi r7, r7, 4 addi r9, r9, 4 cmplw 0, r7, r8 bne 1b /* * relocate `hdlr' and `int_return' entries */ li r7, .L_MachineCheck - _start + EXC_OFF_SYS_RESET li r8, Alignment - _start + EXC_OFF_SYS_RESET 2: bl trap_reloc addi r7, r7, 0x100 /* next exception vector */ cmplw 0, r7, r8 blt 2b li r7, .L_Alignment - _start + EXC_OFF_SYS_RESET bl trap_reloc li r7, .L_ProgramCheck - _start + EXC_OFF_SYS_RESET bl trap_reloc li r7, .L_FPUnavailable - _start + EXC_OFF_SYS_RESET li r8, SystemCall - _start + EXC_OFF_SYS_RESET 3: bl trap_reloc addi r7, r7, 0x100 /* next exception vector */ cmplw 0, r7, r8 blt 3b li r7, .L_SingleStep - _start + EXC_OFF_SYS_RESET li r8, _end_of_vectors - _start + EXC_OFF_SYS_RESET 4: bl trap_reloc addi r7, r7, 0x100 /* next exception vector */ cmplw 0, r7, r8 blt 4b /* enable execptions from RAM vectors */ mfmsr r7 li r8,MSR_IP andc r7,r7,r8 ori r7,r7,MSR_ME /* Enable Machine Check */ mtmsr r7 mtlr r4 /* restore link register */ blr .globl enable_ext_addr enable_ext_addr: mfspr r0, HID0 lis r0, (HID0_HIGH_BAT_EN | HID0_XBSEN | HID0_XAEN)@h ori r0, r0, (HID0_HIGH_BAT_EN | HID0_XBSEN | HID0_XAEN)@l mtspr HID0, r0 sync isync blr #if (CONFIG_SYS_CCSRBAR_DEFAULT != CONFIG_SYS_CCSRBAR) .globl setup_ccsrbar setup_ccsrbar: /* Special sequence needed to update CCSRBAR itself */ lis r4, CONFIG_SYS_CCSRBAR_DEFAULT@h ori r4, r4, CONFIG_SYS_CCSRBAR_DEFAULT@l lis r5, CONFIG_SYS_CCSRBAR_PHYS_LOW@h ori r5, r5, CONFIG_SYS_CCSRBAR_PHYS_LOW@l srwi r5,r5,12 li r6, CONFIG_SYS_CCSRBAR_PHYS_HIGH@l rlwimi r5,r6,20,8,11 stw r5, 0(r4) /* Store physical value of CCSR */ isync lis r5, CONFIG_SYS_TEXT_BASE@h ori r5,r5,CONFIG_SYS_TEXT_BASE@l lwz r5, 0(r5) isync /* Use VA of CCSR to do read */ lis r3, CONFIG_SYS_CCSRBAR@h lwz r5, CONFIG_SYS_CCSRBAR@l(r3) isync blr #endif #ifdef CONFIG_SYS_INIT_RAM_LOCK lock_ram_in_cache: /* Allocate Initial RAM in data cache. */ lis r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@h ori r3, r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@l li r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \ (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32 mtctr r4 1: dcbz r0, r3 addi r3, r3, 32 bdnz 1b #if 1 /* Lock the data cache */ mfspr r0, HID0 ori r0, r0, 0x1000 sync mtspr HID0, r0 sync blr #endif #if 0 /* Lock the first way of the data cache */ mfspr r0, LDSTCR ori r0, r0, 0x0080 #if defined(CONFIG_ALTIVEC) dssall #endif sync mtspr LDSTCR, r0 sync isync blr #endif .globl unlock_ram_in_cache unlock_ram_in_cache: /* invalidate the INIT_RAM section */ lis r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@h ori r3, r3, (CONFIG_SYS_INIT_RAM_ADDR & ~31)@l li r4, ((CONFIG_SYS_INIT_RAM_SIZE & ~31) + \ (CONFIG_SYS_INIT_RAM_ADDR & 31) + 31) / 32 mtctr r4 1: icbi r0, r3 addi r3, r3, 32 bdnz 1b sync /* Wait for all icbi to complete on bus */ isync #if 1 /* Unlock the data cache and invalidate it */ mfspr r0, HID0 li r3,0x1000 andc r0,r0,r3 li r3,0x0400 or r0,r0,r3 sync mtspr HID0, r0 sync blr #endif #if 0 /* Unlock the first way of the data cache */ mfspr r0, LDSTCR li r3,0x0080 andc r0,r0,r3 #ifdef CONFIG_ALTIVEC dssall #endif sync mtspr LDSTCR, r0 sync isync li r3,0x0400 or r0,r0,r3 sync mtspr HID0, r0 sync blr #endif #endif
{ "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 -> crashReport.log(throwable)); } @VisibleForTesting public void handleSettingsClicked() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(__ -> view.settingsClicked()) .doOnNext(__ -> myAccountNavigator.navigateToSettings()) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(__ -> { }, throwable -> crashReport.log(throwable)); } private Observable<Void> signOutClick() { return view.signOutClick() .flatMap(click -> accountManager.logout() .observeOn(scheduler) .doOnCompleted(() -> view.showLoginAccountDisplayable()) .doOnError(throwable -> crashReport.log(throwable)).<Void>toObservable()) .retry(); } private void handleAptoideTvCardViewClick() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(__ -> view.aptoideTvCardViewClick()) .doOnNext(__ -> { view.startAptoideTvWebView(); accountAnalytics.sendPromoteAptoideTVEvent(); }) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(__ -> { }, throwable -> crashReport.log(throwable)); } private void handleAptoideUploaderCardViewClick() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(__ -> view.aptoideUploaderCardViewClick()) .doOnNext(__ -> { myAccountNavigator.navigateToUploader(); accountAnalytics.sendPromoteAptoideUploaderEvent(); }) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(__ -> { }, throwable -> crashReport.log(throwable)); } private void handleAptoideBackupCardViewClick() { view.getLifecycleEvent() .filter(event -> event.equals(View.LifecycleEvent.CREATE)) .flatMap(__ -> view.aptoideBackupCardViewClick()) .doOnNext(__ -> { myAccountNavigator.navigateToBackupApps(); accountAnalytics.sendPromoteAptoideBackupAppsEvent(); }) .compose(view.bindUntilEvent(View.LifecycleEvent.DESTROY)) .subscribe(__ -> { }, throwable -> crashReport.log(throwable)); } private boolean storeExistsInAccount(Account account) { return account.getStore() .getId() != 0; } }
{ "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 { Connection con = getConnection(); if (isTransactionsSupported()) { con.setAutoCommit(false); } return con; } /** * Closes a PreparedStatement and Connection. However, it first rolls back the transaction or * commits it depending on the value of <code>abortTransaction</code>. * * @param pstmt the prepared statement to close. * @param con the connection to close. * @param abortTransaction true if the transaction should be rolled back. */ public static void closeTransactionConnection(PreparedStatement pstmt, Connection con, boolean abortTransaction) { closeStatement(pstmt); closeTransactionConnection(con, abortTransaction); } /** * Closes a Connection. However, it first rolls back the transaction or * commits it depending on the value of <code>abortTransaction</code>. * * @param con the connection to close. * @param abortTransaction true if the transaction should be rolled back. */ public static void closeTransactionConnection(Connection con, boolean abortTransaction) { // Rollback or commit the transaction if (isTransactionsSupported()) { try { if (abortTransaction) { con.rollback(); } else { con.commit(); } } catch (Exception e) { Log.error(e.getMessage(), e); } // Reset the connection to auto-commit mode. try { con.setAutoCommit(true); } catch (Exception e) { Log.error(e.getMessage(), e); } } closeConnection(con); } /** * Closes a result set. This method should be called within the finally section of * your database logic, as in the following example: * * <pre> * public void doSomething(Connection con) { * ResultSet rs = null; * PreparedStatement pstmt = null; * try { * pstmt = con.prepareStatement("select * from blah"); * rs = pstmt.executeQuery(); * .... * } * catch (SQLException sqle) { * Log.error(sqle.getMessage(), sqle); * } * finally { * ConnectionManager.closeResultSet(rs); * ConnectionManager.closePreparedStatement(pstmt); * } * } </pre> * * @param rs the result set to close. */ public static void closeResultSet(ResultSet rs) { if (rs != null) { try { rs.close(); } catch (SQLException e) { Log.error(e.getMessage(), e); } } } /** * Closes a statement. This method should be called within the finally section of * your database logic, as in the following example: * * <pre> * public void doSomething(Connection con) { * PreparedStatement pstmt = null; * try { * pstmt = con.prepareStatement("select * from blah"); * .... * } * catch (SQLException sqle) { * Log.error(sqle.getMessage(), sqle); * } * finally { * ConnectionManager.closeStatement(pstmt); * } * } </pre> * * @param stmt the statement. */ public static void closeStatement(Statement stmt) { if (stmt != null) { try { stmt.close(); } catch (Exception e) { Log.error(e.getMessage(), e); } } } /** * Closes a statement and a result set. This method should be called within the finally section of * your database logic, as in the following example: * * <pre> * public void doSomething(Connection con) { * PreparedStatement pstmt = null; * ResultSet rs = null; * try { * pstmt = con.prepareStatement("select * from blah"); * rs = ... * .... * } * catch (SQLException sqle) { * Log.error(sqle.getMessage(), sqle); * } * finally { * ConnectionManager.closeStatement(rs, pstmt); * } * } </pre> * * @param rs the result set to close * @param stmt the statement. */ public static void closeStatement(ResultSet rs, Statement stmt) { closeResultSet(rs); closeStatement(stmt); } /** * Closes a statement. This method should be called within the try section of * your database logic when you reuse a statement. It may throws an exception, * so don't place it in the finally section.<br> * Example: * * <pre> * public void doSomething(Connection con) { * PreparedStatement pstmt = null; * try { * pstmt = con.prepareStatement("select * from dual"); * pstmt.executeUpdate(); * ... * <b>ConnectionManager.fastcloseStmt(pstmt);</b> * pstmt = con.prepareStatement("select * from blah"); * ... * } * ... * } </pre> * * @param pstmt the statement to close. * @throws SQLException if an exception occurs closing the statement */ public static void fastcloseStmt(PreparedStatement pstmt) throws SQLException { pstmt.close(); } /** * Closes a statement and a result set. This method should be called within the try section of * your database logic when you reuse a statement. It may throw an exception, * so don't place it in the finally section.<br> * Example: * * <pre> * public void doSomething(Connection con) { * PreparedStatement pstmt = null; * try { * pstmt = con.prepareStatement("select * from blah"); * rs = pstmt.executeQuery(); * ... * ConnectionManager.fastcloseStmt(rs, pstmt); * pstmt = con.prepareStatement("select * from blah"); * ... * } * ... * } </pre> * * @param rs The result set to close * @param pstmt the statement to close. * @throws SQLException if an exception occurs closing the result set or statement */ public static void fastcloseStmt(ResultSet rs, PreparedStatement pstmt) throws SQLException { rs.close(); pstmt.close(); } /** * Closes a result set, statement and database connection (returning the connection to * the connection pool). This method should be called within the finally section of * your database logic, as in the following example: * * <pre> * Connection con = null; * PrepatedStatment pstmt = null; * ResultSet rs = null; * try { * con = ConnectionManager.getConnection(); * pstmt = con.prepareStatement("select * from blah"); * rs = psmt.executeQuery(); * .... * } * catch (SQLException sqle) { * Log.error(sqle.getMessage(), sqle); * } * finally { * ConnectionManager.closeConnection(rs, pstmt, con); * }</pre> * * @param rs the result set. * @param stmt the statement. * @param con the connection. */ public static void closeConnection(ResultSet rs, Statement stmt, Connection con) { closeResultSet(rs); closeStatement(stmt); closeConnection(con); } /** * Closes a statement and database connection (returning the connection to * the connection pool). This method should be called within the finally section of * your database logic, as in the following example: * <pre> * Connection con = null; * PrepatedStatment pstmt = null; * try { * con = ConnectionManager.getConnection(); * pstmt = con.prepareStatement("select * from blah"); * .... * } * catch (SQLException sqle) { * Log.error(sqle.getMessage(), sqle); * } * finally { * DbConnectionManager.closeConnection(pstmt, con); * }</pre> * * @param stmt the statement. * @param con the connection. */ public static void closeConnection(Statement stmt, Connection con) { closeStatement(stmt); closeConnection(con); } /** * Closes a database connection (returning the connection to the connection pool). Any * statements associated with the connection should be closed before calling this method. * This method should be called within the finally section of your database logic, as * in the following example: * <pre> * Connection con = null; * try { * con = ConnectionManager.getConnection(); * .... * } * catch (SQLException sqle) { * Log.error(sqle.getMessage(), sqle); * } * finally { * DbConnectionManager.closeConnection(con); * }</pre> * * @param con the connection. */ public static void closeConnection(Connection con) { if (con != null) { try { con.close(); } catch (Exception e) { Log.error(e.getMessage(), e); } } } /** * Creates a scroll insensitive PreparedStatement if the JDBC driver supports it, or a normal * PreparedStatement otherwise. * * @param con the database connection. * @param sql the SQL to create the PreparedStatement with. * @return a PreparedStatement * @throws java.sql.SQLException if an error occurs. */ public static PreparedStatement createScrollablePreparedStatement(Connection con, String sql) throws SQLException { if (isScrollResultsSupported()) { return con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); } else { return con.prepareStatement(sql); } } /** * Scrolls forward in a result set the specified number of rows. If the JDBC driver * supports the feature, the cursor will be moved directly. Otherwise, we scroll * through results one by one manually by calling {@code rs.next()}. * * @param rs the ResultSet object to scroll. * @param rowNumber the row number to scroll forward to. * @throws SQLException if an error occurs. */ public static void scrollResultSet(ResultSet rs, int rowNumber) throws SQLException { // If the driver supports scrollable result sets, use that feature. if (isScrollResultsSupported()) { if (rowNumber > 0) { // We will attempt to do a relative fetch. This may fail in SQL Server if // <resultset-navigation-strategy> is set to absolute. It would need to be // set to looping to work correctly. // If so, manually scroll to the correct row. try { rs.setFetchDirection(ResultSet.FETCH_FORWARD); rs.relative(rowNumber); } catch (SQLException e) { // TODO change "Error ..." to "Disabling ..." Log.error("Error in JDBC method rs.relative(rowNumber).", e); //Log.error("Disabling JDBC method rs.relative(rowNumber).", e); //scrollResultsSupported = false; for (int i = 0; i < rowNumber; i++) { rs.next(); } } } } // Otherwise, manually scroll to the correct row. else { for (int i = 0; i < rowNumber; i++) { rs.next(); } } } /** * Limits the number of the results in a result set (to startIndex + numResults). * Sets the fetch size depending on the features of the JDBC driver and make * sure that the size is not bigger than 500. * @param pstmt the PreparedStatement * @param startIndex the first row with interesting data * @param numResults the number of interesting results */ public static void limitRowsAndFetchSize(PreparedStatement pstmt, int startIndex, int numResults) { final int MAX_FETCHRESULTS = 500; final int maxRows = startIndex + numResults; setMaxRows(pstmt, maxRows); if (pstmt_fetchSizeSupported) { if (scrollResultsSupported) { setFetchSize(pstmt, Math.min(MAX_FETCHRESULTS, numResults)); } else { setFetchSize(pstmt, Math.min(MAX_FETCHRESULTS, maxRows)); } } } /** * Sets the number of rows that the JDBC driver should buffer at a time. * The operation is automatically bypassed if Openfire knows that the * the JDBC driver or database doesn't support it. * * @param pstmt the PreparedStatement to set the fetch size for. * @param fetchSize the fetchSize. */ public static void setFetchSize(PreparedStatement pstmt, int fetchSize) { if (pstmt_fetchSizeSupported) { try { pstmt.setFetchSize(fetchSize); } catch (Throwable t) { // Ignore. Exception may happen if the driver doesn't support // this operation and we didn't set meta-data correctly. // However, it is a good idea to update the meta-data so that // we don't have to incur the cost of catching an exception // each time. Log.error("Disabling JDBC method pstmt.setFetchSize(fetchSize).", t); pstmt_fetchSizeSupported = false; } } } /** * Returns the current connection provider. The only case in which this * method should be called is if more information about the current * connection provider is needed. Database connections should always be * obtained by calling the getConnection method of this class. * * @return the connection provider. */ public static ConnectionProvider getConnectionProvider() { return connectionProvider; } /** * Sets the connection provider. The old provider (if it exists) is shut * down before the new one is started. A connection provider <b>should * not</b> be started before being passed to the connection manager * because the manager will call the start() method automatically. * * @param provider the ConnectionProvider that the manager should obtain * connections from. */ public static void setConnectionProvider(ConnectionProvider provider) { synchronized (providerLock) { if (connectionProvider != null) { connectionProvider.destroy(); connectionProvider = null; } connectionProvider = provider; connectionProvider.start(); // Now, get a connection to determine meta data. Connection con = null; try { con = connectionProvider.getConnection(); setMetaData(con); // Check to see if the database schema needs to be upgraded. schemaManager.checkOpenfireSchema(con); } catch (MissingResourceException mre) { Log.error(mre.getMessage()); } catch (Exception e) { Log.error(e.getMessage(), e); } finally { closeConnection(con); } } // Remember what connection provider we want to use for restarts. JiveGlobals.setXMLProperty("connectionProvider.className", provider.getClass().getName()); } /** * Destroys the currennt connection provider. Future calls to * {@link #getConnectionProvider()} will return {@code null} until a new * ConnectionProvider is set, or one is automatically loaded by a call to * {@link #getConnection()}. */ public static void destroyConnectionProvider() { synchronized (providerLock) { if (connectionProvider != null) { connectionProvider.destroy(); connectionProvider = null; } } } /** * Retrives a large text column from a result set, automatically performing * streaming if the JDBC driver requires it. This is necessary because * different JDBC drivers have different capabilities and methods for * retrieving large text values. * * @param rs the ResultSet to retrieve the text field from. * @param columnIndex the column in the ResultSet of the text field. * @return the String value of the text field. * @throws SQLException if an SQL exception occurs. */ public static String getLargeTextField(ResultSet rs, int columnIndex) throws SQLException { if (isStreamTextRequired()) { String value; try (Reader bodyReader = rs.getCharacterStream(columnIndex)) { if (bodyReader == null) { return null; } char[] buf = new char[256]; int len; StringWriter out = new StringWriter(256); while ((len = bodyReader.read(buf)) >= 0) { out.write(buf, 0, len); } value = out.toString(); out.close(); } catch (Exception e) { Log.error(e.getMessage(), e); throw new SQLException("Failed to load text field"); } return value; } else { return rs.getString(columnIndex); } } /** * Sets a large text column in a result set, automatically performing * streaming if the JDBC driver requires it. This is necessary because * different JDBC drivers have different capabilities and methods for * setting large text values. * * @param pstmt the PreparedStatement to set the text field in. * @param parameterIndex the index corresponding to the text field. * @param value the String to set. * @throws SQLException if an SQL exception occurs. */ public static void setLargeTextField(PreparedStatement pstmt, int parameterIndex, String value) throws SQLException { if (isStreamTextRequired()) { Reader bodyReader; try { bodyReader = new StringReader(value); pstmt.setCharacterStream(parameterIndex, bodyReader, value.length()); } catch (Exception e) { Log.error(e.getMessage(), e); throw new SQLException("Failed to set text field."); } // Leave bodyReader open so that the db can read from it. It *should* // be garbage collected after it's done without needing to call close. } else { pstmt.setString(parameterIndex, value); } } /** * Sets the max number of rows that should be returned from executing a * statement. The operation is automatically bypassed if Jive knows that the * the JDBC driver or database doesn't support it. * * @param stmt the Statement to set the max number of rows for. * @param maxRows the max number of rows to return. */ public static void setMaxRows(Statement stmt, int maxRows) { if (isMaxRowsSupported()) { try { stmt.setMaxRows(maxRows); } catch (Throwable t) { // Ignore. Exception may happen if the driver doesn't support // this operation and we didn't set meta-data correctly. // However, it is a good idea to update the meta-data so that // we don't have to incur the cost of catching an exception // each time. Log.error("Disabling JDBC method stmt.setMaxRows(maxRows).", t); maxRowsSupported = false; } } } /** * Sets the number of rows that the JDBC driver should buffer at a time. * The operation is automatically bypassed if Jive knows that the * the JDBC driver or database doesn't support it. * * @param rs the ResultSet to set the fetch size for. * @param fetchSize the fetchSize. */ public static void setFetchSize(ResultSet rs, int fetchSize) { if (isFetchSizeSupported()) { try { rs.setFetchSize(fetchSize); } catch (Throwable t) { // Ignore. Exception may happen if the driver doesn't support // this operation and we didn't set meta-data correctly. // However, it is a good idea to update the meta-data so that // we don't have to incur the cost of catching an exception // each time. Log.error("Disabling JDBC method rs.setFetchSize(fetchSize).", t); fetchSizeSupported = false; } } } /** * Returns a SchemaManager instance, which can be used to manage the database * schema information for Openfire and plugins. * * @return a SchemaManager instance. */ public static SchemaManager getSchemaManager() { return schemaManager; } /** * Uses a connection from the database to set meta data information about * what different JDBC drivers and databases support. * * @param con the connection. * @throws SQLException if an SQL exception occurs. */ private static void setMetaData(Connection con) throws SQLException { DatabaseMetaData metaData = con.getMetaData(); // Supports transactions? transactionsSupported = metaData.supportsTransactions(); // Supports subqueries? subqueriesSupported = metaData.supportsCorrelatedSubqueries(); // Supports scroll insensitive result sets? Try/catch block is a // workaround for DB2 JDBC driver, which throws an exception on // the method call. try { scrollResultsSupported = metaData.supportsResultSetType( ResultSet.TYPE_SCROLL_INSENSITIVE); } catch (Exception e) { scrollResultsSupported = false; } // Supports batch updates batchUpdatesSupported = metaData.supportsBatchUpdates(); // Set defaults for other meta properties streamTextRequired = false; maxRowsSupported = true; fetchSizeSupported = true; identifierQuoteString = metaData.getIdentifierQuoteString(); // Get the database name so that we can perform meta data settings. String dbName = metaData.getDatabaseProductName().toLowerCase(); String driverName = metaData.getDriverName().toLowerCase(); // Oracle properties. if (dbName.indexOf("oracle") != -1) { databaseType = DatabaseType.oracle; streamTextRequired = true; scrollResultsSupported = false; /* TODO comment and test this, it should be supported since 10g */ // The i-net AUGURO JDBC driver if (driverName.indexOf("auguro") != -1) { streamTextRequired = false; fetchSizeSupported = true; maxRowsSupported = false; } } // Postgres properties else if (dbName.indexOf("postgres") != -1) { databaseType = DatabaseType.postgresql; // Postgres blows, so disable scrolling result sets. scrollResultsSupported = false; fetchSizeSupported = false; } // Interbase properties else if (dbName.indexOf("interbase") != -1) { databaseType = DatabaseType.interbase; fetchSizeSupported = false; maxRowsSupported = false; } // SQLServer else if (dbName.indexOf("sql server") != -1) { databaseType = DatabaseType.sqlserver; // JDBC driver i-net UNA properties if (driverName.indexOf("una") != -1) { fetchSizeSupported = true; maxRowsSupported = false; } } // MySQL properties else if (dbName.indexOf("mysql") != -1) { databaseType = DatabaseType.mysql; transactionsSupported = false; /* TODO comment and test this, it should be supported since 5.0 */ } // HSQL properties else if (dbName.indexOf("hsql") != -1) { databaseType = DatabaseType.hsqldb; // scrollResultsSupported = false; /* comment and test this, it should be supported since 1.7.2 */ } // DB2 properties. else if (dbName.indexOf("db2") != 1) { databaseType = DatabaseType.db2; } } /** * Returns the database type. The possible types are constants of the * DatabaseType class. Any database that doesn't have its own constant * falls into the "Other" category. * * @return the database type. */ public static DatabaseType getDatabaseType() { return databaseType; } /** * Returns true if connection profiling is turned on. You can collect * profiling statistics by using the static methods of the ProfiledConnection * class. * * @return true if connection profiling is enabled. */ public static boolean isProfilingEnabled() { return profilingEnabled; } /** * Turns connection profiling on or off. You can collect profiling * statistics by using the static methods of the ProfiledConnection * class. * * @param enable true to enable profiling; false to disable. */ public static void setProfilingEnabled(boolean enable) { // If enabling profiling, call the start method on ProfiledConnection if (!profilingEnabled && enable) { ProfiledConnection.start(); } // Otherwise, if turning off, call stop method. else if (profilingEnabled && !enable) { ProfiledConnection.stop(); } profilingEnabled = enable; } public static boolean isTransactionsSupported() { return transactionsSupported; } public static boolean isStreamTextRequired() { return streamTextRequired; } public static boolean isMaxRowsSupported() { return maxRowsSupported; } public static boolean isFetchSizeSupported() { return fetchSizeSupported; } public static boolean isPstmtFetchSizeSupported() { return pstmt_fetchSizeSupported; } public static boolean isSubqueriesSupported() { return subqueriesSupported; } public static boolean isScrollResultsSupported() { return scrollResultsSupported; } public static boolean isBatchUpdatesSupported() { return batchUpdatesSupported; } public static boolean isEmbeddedDB() { return connectionProvider != null && connectionProvider instanceof EmbeddedConnectionProvider; } public static String getIdentifierQuoteString() { return identifierQuoteString; } public static String getTestSQL(String driver) { if (driver == null) { return "select 1"; } else if (driver.contains("db2")) { return "select 1 from sysibm.sysdummy1"; } else if (driver.contains("oracle")) { return "select 1 from dual"; } else { return "select 1"; } } /** * A class that identifies the type of the database that Jive is connected * to. In most cases, we don't want to make any database specific calls * and have no need to know the type of database we're using. However, * there are certain cases where it's critical to know the database for * performance reasons. */ public enum DatabaseType { oracle, postgresql, mysql("rank"), hsqldb, db2, sqlserver, interbase, unknown; private final HashSet<String> identifiers; DatabaseType(final String ... identifiers) { this.identifiers = new HashSet<>(Arrays.asList(identifiers)); } public String escapeIdentifier(final String keyword) { if (identifiers.contains(keyword)) { return String.format("%1$s%2$s%1$s", DbConnectionManager.getIdentifierQuoteString(), keyword); } else { return keyword; } } } }
{ "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 voidpc z_voidpc # define voidpf z_voidpf /* all zlib structs in zlib.h and zconf.h */ # define gz_header_s z_gz_header_s # define internal_state z_internal_state #endif #if defined(__MSDOS__) && !defined(MSDOS) # define MSDOS #endif #if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) # define OS2 #endif #if defined(_WINDOWS) && !defined(WINDOWS) # define WINDOWS #endif #if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) # ifndef WIN32 # define WIN32 # endif #endif #if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) # if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) # ifndef SYS16BIT # define SYS16BIT # endif # endif #endif /* * Compile with -DMAXSEG_64K if the alloc function cannot allocate more * than 64k bytes at a time (needed on systems with 16-bit int). */ #ifdef SYS16BIT # define MAXSEG_64K #endif #ifdef MSDOS # define UNALIGNED_OK #endif #ifdef __STDC_VERSION__ # ifndef STDC # define STDC # endif # if __STDC_VERSION__ >= 199901L # ifndef STDC99 # define STDC99 # endif # endif #endif #if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) # define STDC #endif #if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) # define STDC #endif #if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) # define STDC #endif #if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) # define STDC #endif #if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ # define STDC #endif #ifndef STDC # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ # define const /* note: need a more gentle solution here */ # endif #endif #if defined(ZLIB_CONST) && !defined(z_const) # define z_const const #else # define z_const #endif #ifdef Z_SOLO typedef unsigned long z_size_t; #else # define z_longlong long long # if defined(NO_SIZE_T) typedef unsigned NO_SIZE_T z_size_t; # elif defined(STDC) # include <stddef.h> typedef size_t z_size_t; # else typedef unsigned long z_size_t; # endif # undef z_longlong #endif /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL # ifdef MAXSEG_64K # define MAX_MEM_LEVEL 8 # else # define MAX_MEM_LEVEL 9 # endif #endif /* Maximum value for windowBits in deflateInit2 and inflateInit2. * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files * created by gzip. (Files created by minigzip can still be extracted by * gzip.) */ #ifndef MAX_WBITS # define MAX_WBITS 15 /* 32K LZ77 window */ #endif /* The memory requirements for deflate are (in bytes): (1 << (windowBits+2)) + (1 << (memLevel+9)) that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) plus a few kilobytes for small objects. For example, if you want to reduce the default memory requirements from 256K to 128K, compile with make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" Of course this will generally degrade compression (there's no free lunch). The memory requirements for inflate are (in bytes) 1 << windowBits that is, 32K for windowBits=15 (default value) plus about 7 kilobytes for small objects. */ /* Type declarations */ #ifndef OF /* function prototypes */ # ifdef STDC # define OF(args) args # else # define OF(args) () # endif #endif #ifndef Z_ARG /* function prototypes for stdarg */ # if defined(STDC) || defined(Z_HAVE_STDARG_H) # define Z_ARG(args) args # else # define Z_ARG(args) () # endif #endif /* The following definitions for FAR are needed only for MSDOS mixed * model programming (small or medium model with some far allocations). * This was tested only with MSC; for other MSDOS compilers you may have * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, * just define FAR to be empty. */ #ifdef SYS16BIT # if defined(M_I86SM) || defined(M_I86MM) /* MSC small or medium model */ # define SMALL_MEDIUM # ifdef _MSC_VER # define FAR _far # else # define FAR far # endif # endif # if (defined(__SMALL__) || defined(__MEDIUM__)) /* Turbo C small or medium model */ # define SMALL_MEDIUM # ifdef __BORLANDC__ # define FAR _far # else # define FAR far # endif # endif #endif #if defined(WINDOWS) || defined(WIN32) /* If building or using zlib as a DLL, define ZLIB_DLL. * This is not mandatory, but it offers a little performance increase. */ # ifdef ZLIB_DLL # if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) # ifdef ZLIB_INTERNAL # define ZEXTERN extern __declspec(dllexport) # else # define ZEXTERN extern __declspec(dllimport) # endif # endif # endif /* ZLIB_DLL */ /* If building or using zlib with the WINAPI/WINAPIV calling convention, * define ZLIB_WINAPI. * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. */ # ifdef ZLIB_WINAPI # ifdef FAR # undef FAR # endif # include <windows.h> /* No need for _export, use ZLIB.DEF instead. */ /* For complete Windows compatibility, use WINAPI, not __stdcall. */ # define ZEXPORT WINAPI # ifdef WIN32 # define ZEXPORTVA WINAPIV # else # define ZEXPORTVA FAR CDECL # endif # endif #endif #if defined (__BEOS__) # ifdef ZLIB_DLL # ifdef ZLIB_INTERNAL # define ZEXPORT __declspec(dllexport) # define ZEXPORTVA __declspec(dllexport) # else # define ZEXPORT __declspec(dllimport) # define ZEXPORTVA __declspec(dllimport) # endif # endif #endif #ifndef ZEXTERN # define ZEXTERN extern #endif #ifndef ZEXPORT # define ZEXPORT #endif #ifndef ZEXPORTVA # define ZEXPORTVA #endif #ifndef FAR # define FAR #endif #if !defined(__MACTYPES__) typedef unsigned char Byte; /* 8 bits */ #endif typedef unsigned int uInt; /* 16 bits or more */ typedef unsigned long uLong; /* 32 bits or more */ #ifdef SMALL_MEDIUM /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ # define Bytef Byte FAR #else typedef Byte FAR Bytef; #endif typedef char FAR charf; typedef int FAR intf; typedef uInt FAR uIntf; typedef uLong FAR uLongf; #ifdef STDC typedef void const *voidpc; typedef void FAR *voidpf; typedef void *voidp; #else typedef Byte const *voidpc; typedef Byte FAR *voidpf; typedef Byte *voidp; #endif #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) # include <limits.h> # if (UINT_MAX == 0xffffffffUL) # define Z_U4 unsigned # elif (ULONG_MAX == 0xffffffffUL) # define Z_U4 unsigned long # elif (USHRT_MAX == 0xffffffffUL) # define Z_U4 unsigned short # endif #endif #ifdef Z_U4 typedef Z_U4 z_crc_t; #else typedef unsigned long z_crc_t; #endif #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ # define Z_HAVE_UNISTD_H #endif #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ # define Z_HAVE_STDARG_H #endif #ifdef STDC # ifndef Z_SOLO # include <sys/types.h> /* for off_t */ # endif #endif #if defined(STDC) || defined(Z_HAVE_STDARG_H) # ifndef Z_SOLO # include <stdarg.h> /* for va_list */ # endif #endif #ifdef _WIN32 # ifndef Z_SOLO # include <stddef.h> /* for wchar_t */ # endif #endif /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even * though the former does not conform to the LFS document), but considering * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as * equivalently requesting no 64-bit operations */ #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 # undef _LARGEFILE64_SOURCE #endif #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) # define Z_HAVE_UNISTD_H #endif #ifndef Z_SOLO # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ # ifdef VMS # include <unixio.h> /* for off_t */ # endif # ifndef z_off_t # define z_off_t off_t # endif # endif #endif #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 # define Z_LFS64 #endif #if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) # define Z_LARGE64 #endif #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) # define Z_WANT64 #endif #if !defined(SEEK_SET) && !defined(Z_SOLO) # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif #ifndef z_off_t # define z_off_t long #endif #if !defined(_WIN32) && defined(Z_LARGE64) # define z_off64_t off64_t #else # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) # define z_off64_t __int64 # else # define z_off64_t z_off_t # endif #endif /* MVS linker does not support external names larger than 8 bytes */ #if defined(__MVS__) #pragma map(deflateInit_,"DEIN") #pragma map(deflateInit2_,"DEIN2") #pragma map(deflateEnd,"DEEND") #pragma map(deflateBound,"DEBND") #pragma map(inflateInit_,"ININ") #pragma map(inflateInit2_,"ININ2") #pragma map(inflateEnd,"INEND") #pragma map(inflateSync,"INSY") #pragma map(inflateSetDictionary,"INSEDI") #pragma map(compressBound,"CMBND") #pragma map(inflate_table,"INTABL") #pragma map(inflate_fast,"INFA") #pragma map(inflate_copyright,"INCOPY") #endif #endif /* ZCONF_H */
{ "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.doraemonkit.widget.jsonviewer.JsonRecyclerView android:id="@+id/json_body" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="16dp" android:layout_marginTop="14dp" android:layout_marginRight="16dp" android:layout_marginBottom="14dp" /> </LinearLayout> </ScrollView> </FrameLayout>
{ "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' /> <link rel='stylesheet' id='twentyfifteen-style-css' href='https://publicizetests.wpsandbox.me/wp-content/themes/twentyfifteen/style.css?ver=20190507' media='all' /> <link rel='stylesheet' id='twentyfifteen-block-style-css' href='https://publicizetests.wpsandbox.me/wp-content/themes/twentyfifteen/css/blocks.css?ver=20190102' media='all' /> <!--[if lt IE 9]> <link rel='stylesheet' id='twentyfifteen-ie-css' href='https://publicizetests.wpsandbox.me/wp-content/themes/twentyfifteen/css/ie.css?ver=20170916' media='all' /> <![endif]--> <!--[if lt IE 8]> <link rel='stylesheet' id='twentyfifteen-ie7-css' href='https://publicizetests.wpsandbox.me/wp-content/themes/twentyfifteen/css/ie7.css?ver=20141210' media='all' /> <![endif]--> <link rel='stylesheet' id='social-logos-css' href='https://publicizetests.wpsandbox.me/wp-content/plugins/jetpack/_inc/social-logos/social-logos.min.css?ver=8.9.1' media='all' /> <link rel='stylesheet' id='jetpack_css-css' href='https://publicizetests.wpsandbox.me/wp-content/plugins/jetpack/css/jetpack.css?ver=8.9.1' media='all' /> <script src='https://publicizetests.wpsandbox.me/wp-includes/js/jquery/jquery.js?ver=1.12.4-wp' id='jquery-core-js'></script> <script id='jetpack_related-posts-js-extra'> var related_posts_js_options = {"post_heading":"h4"}; </script> <script src='https://publicizetests.wpsandbox.me/wp-content/plugins/jetpack/_inc/build/related-posts/related-posts.min.js?ver=20191011' id='jetpack_related-posts-js'></script> <link rel="https://api.w.org/" href="https://publicizetests.wpsandbox.me/wp-json/" /><link rel="alternate" type="application/json" href="https://publicizetests.wpsandbox.me/wp-json/wp/v2/posts/18" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://publicizetests.wpsandbox.me/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://publicizetests.wpsandbox.me/wp-includes/wlwmanifest.xml" /> <meta name="generator" content="WordPress 5.6-alpha-49063" /> <link rel="canonical" href="https://publicizetests.wpsandbox.me/2015/06/29/unsupported-shortcodes-test/" /> <link rel='shortlink' href='https://wp.me/p60jnH-i' /> <link rel="alternate" type="application/json+oembed" href="https://publicizetests.wpsandbox.me/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fpublicizetests.wpsandbox.me%2F2015%2F06%2F29%2Funsupported-shortcodes-test%2F" /> <link rel="alternate" type="text/xml+oembed" href="https://publicizetests.wpsandbox.me/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fpublicizetests.wpsandbox.me%2F2015%2F06%2F29%2Funsupported-shortcodes-test%2F&#038;format=xml" /> <style type='text/css'>img#wpstats{display:none}</style><style>.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style> <!-- Jetpack Open Graph Tags --> <meta property="og:type" content="article" /> <meta property="og:title" content="Unsupported Shortcodes test" /> <meta property="og:url" content="https://publicizetests.wpsandbox.me/2015/06/29/unsupported-shortcodes-test/" /> <meta property="og:description" content="[:en]English: It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-leโ€ฆ" /> <meta property="article:published_time" content="2015-06-29T06:53:57+00:00" /> <meta property="article:modified_time" content="2015-06-29T06:53:57+00:00" /> <meta property="article:author" content="http://www.facebook.com/100006374163345" /> <meta property="og:site_name" content="Publicize Jetpack" /> <meta property="og:image" content="https://s0.wp.com/i/blank.jpg" /> <meta property="og:locale" content="en_US" /> <meta name="twitter:creator" content="@wpcomrestapi" /> <meta name="twitter:site" content="@wpcomrestapi" /> <meta name="twitter:text:title" content="Unsupported Shortcodes test" /> <meta name="twitter:card" content="summary" /> <!-- End Jetpack Open Graph Tags --> </head> <body class="post-template-default single single-post postid-18 single-format-standard wp-embed-responsive"> <div id="page" class="hfeed site"> <a class="skip-link screen-reader-text" href="#content">Skip to content</a> <div id="sidebar" class="sidebar"> <header id="masthead" class="site-header" role="banner"> <div class="site-branding"> <p class="site-title"><a href="https://publicizetests.wpsandbox.me/" rel="home">Publicize Jetpack</a></p> <p class="site-description">Just another WordPress site</p> <button class="secondary-toggle">Menu and widgets</button> </div><!-- .site-branding --> </header><!-- .site-header --> <div id="secondary" class="secondary"> <div id="widget-area" class="widget-area" role="complementary"> <aside id="search-2" class="widget widget_search"><form role="search" method="get" class="search-form" action="https://publicizetests.wpsandbox.me/"> <label> <span class="screen-reader-text">Search for:</span> <input type="search" class="search-field" placeholder="Search &hellip;" value="" name="s" /> </label> <input type="submit" class="search-submit screen-reader-text" value="Search" /> </form></aside> <aside id="recent-posts-2" class="widget widget_recent_entries"> <h2 class="widget-title">Recent Posts</h2> <ul> <li> <a href="https://publicizetests.wpsandbox.me/2015/06/29/unsupported-shortcodes-test/" aria-current="page">Unsupported Shortcodes test</a> </li> <li> <a href="https://publicizetests.wpsandbox.me/2015/05/16/contributor-test/">Contributor test</a> </li> <li> <a href="https://publicizetests.wpsandbox.me/2015/05/16/secondary-user-post/">Secondary User post</a> </li> <li> <a href="https://publicizetests.wpsandbox.me/2015/03/26/hello-world/">Hello world!</a> </li> </ul> </aside><aside id="recent-comments-2" class="widget widget_recent_comments"><h2 class="widget-title">Recent Comments</h2><ul id="recentcomments"><li class="recentcomments"><span class="comment-author-link"><a href='https://wordpress.org/' rel='external nofollow ugc' class='url'>Mr WordPress</a></span> on <a href="https://publicizetests.wpsandbox.me/2015/03/26/hello-world/#comment-1">Hello world!</a></li></ul></aside><aside id="archives-2" class="widget widget_archive"><h2 class="widget-title">Archives</h2> <ul> <li><a href='https://publicizetests.wpsandbox.me/2015/06/'>June 2015</a></li> <li><a href='https://publicizetests.wpsandbox.me/2015/05/'>May 2015</a></li> <li><a href='https://publicizetests.wpsandbox.me/2015/03/'>March 2015</a></li> </ul> </aside><aside id="categories-2" class="widget widget_categories"><h2 class="widget-title">Categories</h2> <ul> <li class="cat-item cat-item-1"><a href="https://publicizetests.wpsandbox.me/category/uncategorized/">Uncategorized</a> </li> </ul> </aside><aside id="meta-2" class="widget widget_meta"><h2 class="widget-title">Meta</h2> <ul> <li><a href="https://publicizetests.wpsandbox.me/wp-login.php">Log in</a></li> <li><a href="https://publicizetests.wpsandbox.me/feed/">Entries feed</a></li> <li><a href="https://publicizetests.wpsandbox.me/comments/feed/">Comments feed</a></li> <li><a href="https://wordpress.org/">WordPress.org</a></li> </ul> </aside> </div><!-- .widget-area --> </div><!-- .secondary --> </div><!-- .sidebar --> <div id="content" class="site-content"> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <article id="post-18" class="post-18 post type-post status-publish format-standard hentry category-uncategorized"> <header class="entry-header"> <h1 class="entry-title">Unsupported Shortcodes test</h1> </header><!-- .entry-header --> <div class="entry-content"> <p>[:en]English: It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using &#8216;Content here, content here&#8217;, making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for &#8216;lorem ipsum&#8217; will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).[:de]Es ist ein lang erwiesener Fakt, dass ein Leser vom Text Inhalt einer Seite, wenn man sein Layout abgelenkt werden. Der Punkt, der mit Lorem Ipsum ist, dass sie eine mehr oder weniger normale Verteilung von Briefen, im Gegensatz zur Verwendung &#8220;Inhalte, Inhalte&#8221;, so dass es wie lesbar Englisch. Viele DTP-Programme und Web-Editoren nun Lorem Ipsum als den Standardtext, und eine Suche nach &#8220;Lorem ipsum&#8221; werden viele Websites noch in den Kinderschuhen zu entdecken. Verschiedene Versionen sind รผber die Jahre manchmal durch Zufall manchmal absichtlich (von Witz und dergleichen) weiterentwickelt,,.[:]</p> <div class="sharedaddy sd-sharing-enabled"><div class="robots-nocontent sd-block sd-social sd-social-icon sd-sharing"><h3 class="sd-title">Share this:</h3><div class="sd-content"><ul><li class="share-twitter"><a rel="nofollow noopener noreferrer" data-shared="sharing-twitter-18" class="share-twitter sd-button share-icon no-text" href="https://publicizetests.wpsandbox.me/2015/06/29/unsupported-shortcodes-test/?share=twitter" target="_blank" title="Click to share on Twitter"><span></span><span class="sharing-screen-reader-text">Click to share on Twitter (Opens in new window)</span></a></li><li class="share-facebook"><a rel="nofollow noopener noreferrer" data-shared="sharing-facebook-18" class="share-facebook sd-button share-icon no-text" href="https://publicizetests.wpsandbox.me/2015/06/29/unsupported-shortcodes-test/?share=facebook" target="_blank" title="Click to share on Facebook"><span></span><span class="sharing-screen-reader-text">Click to share on Facebook (Opens in new window)</span></a></li><li class="share-end"></li></ul></div></div></div> <div id='jp-relatedposts' class='jp-relatedposts' > <h3 class="jp-relatedposts-headline"><em>Related</em></h3> </div> </div><!-- .entry-content --> <footer class="entry-footer"> <span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="https://publicizetests.wpsandbox.me/2015/06/29/unsupported-shortcodes-test/" rel="bookmark"><time class="entry-date published updated" datetime="2015-06-29T06:53:57+00:00">June 29, 2015</time></a></span><span class="byline"><span class="author vcard"><span class="screen-reader-text">Author </span><a class="url fn n" href="https://publicizetests.wpsandbox.me/author/publicizetester/">publicizetester</a></span></span> </footer><!-- .entry-footer --> </article><!-- #post-18 --> <div id="comments" class="comments-area"> <div id="respond" class="comment-respond"> <h3 id="reply-title" class="comment-reply-title">Leave a Reply <small><a rel="nofollow" id="cancel-comment-reply-link" href="/2015/06/29/unsupported-shortcodes-test/#respond" style="display:none;">Cancel reply</a></small></h3><form action="https://publicizetests.wpsandbox.me/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate><p class="comment-notes"><span id="email-notes">Your email address will not be published.</span> Required fields are marked <span class="required">*</span></p><p class="comment-form-comment"><label for="comment">Comment</label> <textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" required="required"></textarea></p><p class="comment-form-author"><label for="author">Name <span class="required">*</span></label> <input id="author" name="author" type="text" value="" size="30" maxlength="245" required='required' /></p> <p class="comment-form-email"><label for="email">Email <span class="required">*</span></label> <input id="email" name="email" type="email" value="" size="30" maxlength="100" aria-describedby="email-notes" required='required' /></p> <p class="comment-form-url"><label for="url">Website</label> <input id="url" name="url" type="url" value="" size="30" maxlength="200" /></p> <p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes" /> <label for="wp-comment-cookies-consent">Save my name, email, and website in this browser for the next time I comment.</label></p> <p class="comment-subscription-form"><input type="checkbox" name="subscribe_comments" id="subscribe_comments" value="subscribe" style="width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;" /> <label class="subscribe-label" id="subscribe-label" for="subscribe_comments">Notify me of follow-up comments by email.</label></p><p class="comment-subscription-form"><input type="checkbox" name="subscribe_blog" id="subscribe_blog" value="subscribe" style="width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;" /> <label class="subscribe-label" id="subscribe-blog-label" for="subscribe_blog">Notify me of new posts by email.</label></p><p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Comment" /> <input type='hidden' name='comment_post_ID' value='18' id='comment_post_ID' /> <input type='hidden' name='comment_parent' id='comment_parent' value='0' /> </p></form> </div><!-- #respond --> </div><!-- .comments-area --> <nav class="navigation post-navigation" role="navigation" aria-label="Posts"> <h2 class="screen-reader-text">Post navigation</h2> <div class="nav-links"><div class="nav-previous"><a href="https://publicizetests.wpsandbox.me/2015/05/16/contributor-test/" rel="prev"><span class="meta-nav" aria-hidden="true">Previous</span> <span class="screen-reader-text">Previous post:</span> <span class="post-title">Contributor test</span></a></div></div> </nav> </main><!-- .site-main --> </div><!-- .content-area --> </div><!-- .site-content --> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="site-info"> <a href="https://wordpress.org/" class="imprint"> Proudly powered by WordPress </a> </div><!-- .site-info --> </footer><!-- .site-footer --> </div><!-- .site --> <script type="text/javascript"> window.WPCOM_sharing_counts = {"https:\/\/publicizetests.wpsandbox.me\/2015\/06\/29\/unsupported-shortcodes-test\/":18}; </script> <script src='https://publicizetests.wpsandbox.me/wp-content/plugins/jetpack/_inc/build/photon/photon.min.js?ver=20191001' id='jetpack-photon-js'></script> <script src='https://publicizetests.wpsandbox.me/wp-content/themes/twentyfifteen/js/skip-link-focus-fix.js?ver=20141028' id='twentyfifteen-skip-link-focus-fix-js'></script> <script src='https://publicizetests.wpsandbox.me/wp-includes/js/comment-reply.min.js?ver=5.6-alpha-49063' id='comment-reply-js'></script> <script id='twentyfifteen-script-js-extra'> var screenReaderText = {"expand":"<span class=\"screen-reader-text\">expand child menu<\/span>","collapse":"<span class=\"screen-reader-text\">collapse child menu<\/span>"}; </script> <script src='https://publicizetests.wpsandbox.me/wp-content/themes/twentyfifteen/js/functions.js?ver=20171218' id='twentyfifteen-script-js'></script> <script src='https://publicizetests.wpsandbox.me/wp-includes/js/wp-embed.min.js?ver=5.6-alpha-49063' id='wp-embed-js'></script> <script id='sharing-js-js-extra'> var sharing_js_options = {"lang":"en","counts":"1","is_stats_active":"1"}; </script> <script src='https://publicizetests.wpsandbox.me/wp-content/plugins/jetpack/_inc/build/sharedaddy/sharing.min.js?ver=8.9.1' id='sharing-js-js'></script> <script id='sharing-js-js-after'> var windowOpen; jQuery( document.body ).on( 'click', 'a.share-twitter', function() { // If there's another sharing window open, close it. if ( 'undefined' !== typeof windowOpen ) { windowOpen.close(); } windowOpen = window.open( jQuery( this ).attr( 'href' ), 'wpcomtwitter', 'menubar=1,resizable=1,width=600,height=350' ); return false; }); var windowOpen; jQuery( document.body ).on( 'click', 'a.share-facebook', function() { // If there's another sharing window open, close it. if ( 'undefined' !== typeof windowOpen ) { windowOpen.close(); } windowOpen = window.open( jQuery( this ).attr( 'href' ), 'wpcomfacebook', 'menubar=1,resizable=1,width=600,height=400' ); return false; }); </script> <script type='text/javascript' src='https://stats.wp.com/e-202040.js' async='async' defer='defer'></script> <script type='text/javascript'> _stq = window._stq || []; _stq.push([ 'view', {v:'ext',j:'1:8.9.1',blog:'88732521',post:'18',tz:'0',srv:'publicizetests.wpsandbox.me'} ]); _stq.push([ 'clickTrackerInit', '88732521', '18' ]); </script> </body> </html>
{ "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_DebugDCUs>true</DCC_DebugDCUs> <DCC_Optimize>false</DCC_Optimize> <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames> <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe> <DCC_RemoteDebug>true</DCC_RemoteDebug> </PropertyGroup> <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''"> <DCC_UnitSearchPath>..\..;$(DCC_UnitSearchPath)</DCC_UnitSearchPath> <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> <VerInfo_Locale>1033</VerInfo_Locale> <DCC_RunTimeTypeInfo>true</DCC_RunTimeTypeInfo> <DCC_RemoteDebug>false</DCC_RemoteDebug> </PropertyGroup> <PropertyGroup Condition="'$(Cfg_2)'!=''"> <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols> <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define> <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> <DCC_DebugInformation>0</DCC_DebugInformation> </PropertyGroup> <ItemGroup> <DelphiCompile Include="$(MainSource)"> <MainSource>MainSource</MainSource> </DelphiCompile> <DCCReference Include="test_56_RunInvoke.pas"> <Form>frmRunInvokeTester</Form> <FormType>dfm</FormType> </DCCReference> <BuildConfiguration Include="Release"> <Key>Cfg_2</Key> <CfgParent>Base</CfgParent> </BuildConfiguration> <BuildConfiguration Include="Base"> <Key>Base</Key> </BuildConfiguration> <BuildConfiguration Include="Debug"> <Key>Cfg_1</Key> <CfgParent>Base</CfgParent> </BuildConfiguration> </ItemGroup> <ProjectExtensions> <Borland.Personality>Delphi.Personality.12</Borland.Personality> <Borland.ProjectType>Application</Borland.ProjectType> <BorlandProject> <Delphi.Personality> <Source> <Source Name="MainSource">app_56_RunInvoke.dpr</Source> </Source> <Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\AsyncPro_DXE2.bpl">TurboPower Async Professional 5.01 Runtime Package</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\dxGDIPlusRS16.bpl">ExpressGDI+ Library by Developer Express Inc.</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\dxBarDBNavRS16.bpl">ExpressBars DBNavigator by Developer Express Inc.</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\OverbyteIcsDXe2Design.bpl">Overbyte ICS Design-Time Package for Delphi XE2</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\B305vdXE2.bpl">File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\B305vdXE2.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclVersionControlExpert160.bpl">JCL Integration of version control systems in the IDE</Excluded_Packages> <Excluded_Packages Name="$(BDSBIN)\dcloffice2k160.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages> <Excluded_Packages Name="$(BDSBIN)\dclofficexp160.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages> <Excluded_Packages Name="$(BDSBIN)\dclIPIndyImpl160.bpl">IP Abstraction Indy Implementation Design Time</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclDebugExpert160.bpl">File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclDebugExpert160.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclProjectAnalysisExpert160.bpl">File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclProjectAnalysisExpert160.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclFavoriteFoldersExpert160.bpl">File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclFavoriteFoldersExpert160.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclRepositoryExpert160.bpl">File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclRepositoryExpert160.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclSIMDViewExpert160.bpl">File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclSIMDViewExpert160.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclStackTraceViewerExpert160.bpl">File C:\Users\Public\Documents\RAD Studio\9.0\Bpl\JclStackTraceViewerExpert160.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Users\Public\Documents\RAD Studio\9.0\Bpl\OmniThreadLibraryDesigntimeXE2.bpl">OmniThreadLibrary designtime</Excluded_Packages> </Excluded_Packages> <VersionInfo> <VersionInfo Name="IncludeVerInfo">False</VersionInfo> <VersionInfo Name="AutoIncBuild">False</VersionInfo> <VersionInfo Name="MajorVer">1</VersionInfo> <VersionInfo Name="MinorVer">0</VersionInfo> <VersionInfo Name="Release">0</VersionInfo> <VersionInfo Name="Build">0</VersionInfo> <VersionInfo Name="Debug">False</VersionInfo> <VersionInfo Name="PreRelease">False</VersionInfo> <VersionInfo Name="Special">False</VersionInfo> <VersionInfo Name="Private">False</VersionInfo> <VersionInfo Name="DLL">False</VersionInfo> <VersionInfo Name="Locale">1060</VersionInfo> <VersionInfo Name="CodePage">1250</VersionInfo> </VersionInfo> <VersionInfoKeys> <VersionInfoKeys Name="CompanyName"/> <VersionInfoKeys Name="FileDescription"/> <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys> <VersionInfoKeys Name="InternalName"/> <VersionInfoKeys Name="LegalCopyright"/> <VersionInfoKeys Name="LegalTrademarks"/> <VersionInfoKeys Name="OriginalFilename"/> <VersionInfoKeys Name="ProductName"/> <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys> <VersionInfoKeys Name="Comments"/> </VersionInfoKeys> </Delphi.Personality> <Deployment> <DeployFile LocalName="Win32\Debug\app_56_RunInvoke.exe" Configuration="Debug" Class="ProjectOutput"> <Platform Name="Win32"> <RemoteName>app_56_RunInvoke.exe</RemoteName> </Platform> </DeployFile> <DeployClass Name="DependencyPackage" Required="true"> <Platform Name="iOSDevice"> <Operation>1</Operation> <Extensions>.dylib</Extensions> </Platform> <Platform Name="Win32"> <Operation>0</Operation> <Extensions>.bpl</Extensions> </Platform> <Platform Name="OSX32"> <RemoteDir>Contents\MacOS</RemoteDir> <Operation>1</Operation> <Extensions>.dylib</Extensions> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> <Extensions>.dylib</Extensions> </Platform> </DeployClass> <DeployClass Name="DependencyModule"> <Platform Name="iOSDevice"> <Operation>1</Operation> <Extensions>.dylib</Extensions> </Platform> <Platform Name="Win32"> <Operation>0</Operation> <Extensions>.dll;.bpl</Extensions> </Platform> <Platform Name="OSX32"> <RemoteDir>Contents\MacOS</RemoteDir> <Operation>1</Operation> <Extensions>.dylib</Extensions> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> <Extensions>.dylib</Extensions> </Platform> </DeployClass> <DeployClass Name="iPad_Launch2048"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="ProjectOSXInfoPList"> <Platform Name="OSX32"> <RemoteDir>Contents</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="ProjectiOSDeviceDebug"> <Platform Name="iOSDevice"> <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="Android_SplashImage470"> <Platform Name="Android"> <RemoteDir>res\drawable-normal</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="AndroidLibnativeX86File"> <Platform Name="Android"> <RemoteDir>library\lib\x86</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="ProjectiOSResource"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="ProjectOSXEntitlements"> <Platform Name="OSX32"> <RemoteDir>Contents</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="AndroidGDBServer"> <Platform Name="Android"> <RemoteDir>library\lib\armeabi-v7a</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="iPhone_Launch640"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="Android_SplashImage960"> <Platform Name="Android"> <RemoteDir>res\drawable-xlarge</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="Android_LauncherIcon96"> <Platform Name="Android"> <RemoteDir>res\drawable-xhdpi</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="iPhone_Launch320"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="Android_LauncherIcon144"> <Platform Name="Android"> <RemoteDir>res\drawable-xxhdpi</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="AndroidLibnativeMipsFile"> <Platform Name="Android"> <RemoteDir>library\lib\mips</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="AndroidSplashImageDef"> <Platform Name="Android"> <RemoteDir>res\drawable</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="DebugSymbols"> <Platform Name="OSX32"> <RemoteDir>Contents\MacOS</RemoteDir> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> <Platform Name="Win32"> <Operation>0</Operation> </Platform> </DeployClass> <DeployClass Name="DependencyFramework"> <Platform Name="OSX32"> <RemoteDir>Contents\MacOS</RemoteDir> <Operation>1</Operation> <Extensions>.framework</Extensions> </Platform> <Platform Name="Win32"> <Operation>0</Operation> </Platform> </DeployClass> <DeployClass Name="Android_SplashImage426"> <Platform Name="Android"> <RemoteDir>res\drawable-small</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="ProjectiOSEntitlements"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="AdditionalDebugSymbols"> <Platform Name="OSX32"> <RemoteDir>Contents\MacOS</RemoteDir> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> <Platform Name="Win32"> <RemoteDir>Contents\MacOS</RemoteDir> <Operation>0</Operation> </Platform> </DeployClass> <DeployClass Name="AndroidClassesDexFile"> <Platform Name="Android"> <RemoteDir>classes</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="ProjectiOSInfoPList"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="iPad_Launch1024"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="Android_DefaultAppIcon"> <Platform Name="Android"> <RemoteDir>res\drawable</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="ProjectOSXResource"> <Platform Name="OSX32"> <RemoteDir>Contents\Resources</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="ProjectiOSDeviceResourceRules"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="iPad_Launch768"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="ProjectOutput" Required="true"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> <Platform Name="Android"> <RemoteDir>library\lib\armeabi-v7a</RemoteDir> <Operation>1</Operation> </Platform> <Platform Name="Win32"> <Operation>0</Operation> </Platform> <Platform Name="OSX32"> <RemoteDir>Contents\MacOS</RemoteDir> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="AndroidLibnativeArmeabiFile"> <Platform Name="Android"> <RemoteDir>library\lib\armeabi</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="Android_SplashImage640"> <Platform Name="Android"> <RemoteDir>res\drawable-large</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="File"> <Platform Name="iOSDevice"> <Operation>0</Operation> </Platform> <Platform Name="Android"> <Operation>0</Operation> </Platform> <Platform Name="Win32"> <Operation>0</Operation> </Platform> <Platform Name="OSX32"> <RemoteDir>Contents\MacOS</RemoteDir> <Operation>0</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>0</Operation> </Platform> </DeployClass> <DeployClass Name="iPhone_Launch640x1136"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="Android_LauncherIcon36"> <Platform Name="Android"> <RemoteDir>res\drawable-ldpi</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="AndroidSplashStyles"> <Platform Name="Android"> <RemoteDir>res\values</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="iPad_Launch1536"> <Platform Name="iOSDevice"> <Operation>1</Operation> </Platform> <Platform Name="iOSSimulator"> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="Android_LauncherIcon48"> <Platform Name="Android"> <RemoteDir>res\drawable-mdpi</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="Android_LauncherIcon72"> <Platform Name="Android"> <RemoteDir>res\drawable-hdpi</RemoteDir> <Operation>1</Operation> </Platform> </DeployClass> <DeployClass Name="ProjectAndroidManifest"> <Platform Name="Android"> <Operation>1</Operation> </Platform> </DeployClass> <ProjectRoot Name="$(PROJECTNAME)" Platform="Android"/> <ProjectRoot Name="$(PROJECTNAME).app" Platform="iOSDevice"/> <ProjectRoot Name="$(PROJECTNAME)" Platform="Win32"/> <ProjectRoot Name="$(PROJECTNAME).app" Platform="OSX32"/> <ProjectRoot Name="$(PROJECTNAME).app" Platform="iOSSimulator"/> <ProjectRoot Name="$(PROJECTNAME)" Platform="Win64"/> </Deployment> <Platforms> <Platform value="Win64">False</Platform> <Platform value="Win32">True</Platform> </Platforms> </BorlandProject> <ProjectFileVersion>12</ProjectFileVersion> </ProjectExtensions> <Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/> <Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/> <Import Condition="Exists('$(MSBuildProjectName).deployproj')" Project="$(MSBuildProjectName).deployproj"/> </Project>
{ "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.2); } .window, .window .window-body { border-color: #95B8E7; } .window { background-color: #E0ECFF; background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 20%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0); } .window-proxy { border: 1px dashed #95B8E7; } .window-proxy-mask, .window-mask { background: #ccc; } .window .panel-footer { border: 1px solid #95B8E7; position: relative; top: -1px; } .dialog-content { overflow: auto; } .dialog-toolbar { padding: 2px 5px; } .dialog-tool-separator { float: left; height: 24px; border-left: 1px solid #ccc; border-right: 1px solid #fff; margin: 2px 1px; } .dialog-button { padding: 5px; text-align: right; } .dialog-button .l-btn { margin-left: 5px; } .dialog-toolbar, .dialog-button { background: #F4F4F4; border-width: 1px; border-style: solid; } .dialog-toolbar { border-color: #95B8E7 #95B8E7 #dddddd #95B8E7; } .dialog-button { border-color: #dddddd #95B8E7 #95B8E7 #95B8E7; } .l-btn { text-decoration: none; display: inline-block; overflow: hidden; margin: 0; padding: 0; cursor: pointer; outline: none; text-align: center; vertical-align: middle; } .l-btn-plain { border: 0; padding: 1px; } .l-btn-left { display: inline-block; position: relative; overflow: hidden; margin: 0; padding: 0; vertical-align: top; } .l-btn-text { display: inline-block; vertical-align: top; width: auto; line-height: 24px; font-size: 12px; padding: 0; margin: 0 4px; } .l-btn-icon { display: inline-block; width: 16px; height: 16px; line-height: 16px; position: absolute; top: 50%; margin-top: -8px; font-size: 1px; } .l-btn span span .l-btn-empty { display: inline-block; margin: 0; width: 16px; height: 24px; font-size: 1px; vertical-align: top; } .l-btn span .l-btn-icon-left { padding: 0 0 0 20px; background-position: left center; } .l-btn span .l-btn-icon-right { padding: 0 20px 0 0; background-position: right center; } .l-btn-icon-left .l-btn-text { margin: 0 4px 0 24px; } .l-btn-icon-left .l-btn-icon { left: 4px; } .l-btn-icon-right .l-btn-text { margin: 0 24px 0 4px; } .l-btn-icon-right .l-btn-icon { right: 4px; } .l-btn-icon-top .l-btn-text { margin: 20px 4px 0 4px; } .l-btn-icon-top .l-btn-icon { top: 4px; left: 50%; margin: 0 0 0 -8px; } .l-btn-icon-bottom .l-btn-text { margin: 0 4px 20px 4px; } .l-btn-icon-bottom .l-btn-icon { top: auto; bottom: 4px; left: 50%; margin: 0 0 0 -8px; } .l-btn-left .l-btn-empty { margin: 0 4px; width: 16px; } .l-btn-plain:hover { padding: 0; } .l-btn-focus { outline: #0000FF dotted thin; } .l-btn-large .l-btn-text { line-height: 40px; } .l-btn-large .l-btn-icon { width: 32px; height: 32px; line-height: 32px; margin-top: -16px; } .l-btn-large .l-btn-icon-left .l-btn-text { margin-left: 40px; } .l-btn-large .l-btn-icon-right .l-btn-text { margin-right: 40px; } .l-btn-large .l-btn-icon-top .l-btn-text { margin-top: 36px; line-height: 24px; min-width: 32px; } .l-btn-large .l-btn-icon-top .l-btn-icon { margin: 0 0 0 -16px; } .l-btn-large .l-btn-icon-bottom .l-btn-text { margin-bottom: 36px; line-height: 24px; min-width: 32px; } .l-btn-large .l-btn-icon-bottom .l-btn-icon { margin: 0 0 0 -16px; } .l-btn-large .l-btn-left .l-btn-empty { margin: 0 4px; width: 32px; } .l-btn { color: #444; background: #fafafa; background-repeat: repeat-x; border: 1px solid #bbb; background: -webkit-linear-gradient(top,#ffffff 0,#eeeeee 100%); background: -moz-linear-gradient(top,#ffffff 0,#eeeeee 100%); background: -o-linear-gradient(top,#ffffff 0,#eeeeee 100%); background: linear-gradient(to bottom,#ffffff 0,#eeeeee 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#eeeeee,GradientType=0); -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .l-btn:hover { background: #eaf2ff; color: #000000; border: 1px solid #b7d2ff; filter: none; } .l-btn-plain { background: transparent; border: 0; filter: none; } .l-btn-plain:hover { background: #eaf2ff; color: #000000; border: 1px solid #b7d2ff; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .l-btn-disabled, .l-btn-disabled:hover { opacity: 0.5; cursor: default; background: #fafafa; color: #444; background: -webkit-linear-gradient(top,#ffffff 0,#eeeeee 100%); background: -moz-linear-gradient(top,#ffffff 0,#eeeeee 100%); background: -o-linear-gradient(top,#ffffff 0,#eeeeee 100%); background: linear-gradient(to bottom,#ffffff 0,#eeeeee 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#eeeeee,GradientType=0); } .l-btn-disabled .l-btn-text, .l-btn-disabled .l-btn-icon { filter: alpha(opacity=50); } .l-btn-plain-disabled, .l-btn-plain-disabled:hover { background: transparent; filter: alpha(opacity=50); } .l-btn-selected, .l-btn-selected:hover { background: #ddd; filter: none; } .l-btn-plain-selected, .l-btn-plain-selected:hover { background: #ddd; } .textbox { position: relative; border: 1px solid #95B8E7; background-color: #fff; vertical-align: middle; display: inline-block; overflow: hidden; white-space: nowrap; margin: 0; padding: 0; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .textbox .textbox-text { font-size: 12px; border: 0; margin: 0; padding: 4px; white-space: normal; vertical-align: top; outline-style: none; resize: none; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .textbox .textbox-prompt { font-size: 12px; color: #aaa; } .textbox-button, .textbox-button:hover { position: absolute; top: 0; padding: 0; vertical-align: top; -moz-border-radius: 0 0 0 0; -webkit-border-radius: 0 0 0 0; border-radius: 0 0 0 0; } .textbox-button-right, .textbox-button-right:hover { border-width: 0 0 0 1px; } .textbox-button-left, .textbox-button-left:hover { border-width: 0 1px 0 0; } .textbox-addon { position: absolute; top: 0; } .textbox-icon { display: inline-block; width: 18px; height: 20px; overflow: hidden; vertical-align: top; background-position: center center; cursor: pointer; opacity: 0.6; filter: alpha(opacity=60); text-decoration: none; outline-style: none; } .textbox-icon-disabled, .textbox-icon-readonly { cursor: default; } .textbox-icon:hover { opacity: 1.0; filter: alpha(opacity=100); } .textbox-icon-disabled:hover { opacity: 0.6; filter: alpha(opacity=60); } .textbox-focused { -moz-box-shadow: 0 0 3px 0 #95B8E7; -webkit-box-shadow: 0 0 3px 0 #95B8E7; box-shadow: 0 0 3px 0 #95B8E7; } .textbox-invalid { border-color: #ffa8a8; background-color: #fff3f3; } .filebox .textbox-value { vertical-align: top; position: absolute; top: 0; left: -5000px; } .combo { display: inline-block; white-space: nowrap; margin: 0; padding: 0; border-width: 1px; border-style: solid; overflow: hidden; vertical-align: middle; } .combo .combo-text { font-size: 12px; border: 0px; margin: 0; padding: 0px 2px; vertical-align: baseline; } .combo-arrow { width: 18px; height: 20px; overflow: hidden; display: inline-block; vertical-align: top; cursor: pointer; opacity: 0.6; filter: alpha(opacity=60); } .combo-arrow-hover { opacity: 1.0; filter: alpha(opacity=100); } .combo-panel { overflow: auto; } .combo-arrow { background: url('images/combo_arrow.png') no-repeat center center; } .combo-panel { background-color: #ffffff; } .combo { border-color: #95B8E7; background-color: #fff; } .combo-arrow { background-color: #E0ECFF; } .combo-arrow-hover { background-color: #eaf2ff; } .combo-arrow:hover { background-color: #eaf2ff; } .combo .textbox-icon-disabled:hover { cursor: default; } .textbox-invalid { border-color: #ffa8a8; background-color: #fff3f3; } .combobox-item, .combobox-group { font-size: 12px; padding: 3px; padding-right: 0px; } .combobox-item-disabled { opacity: 0.5; filter: alpha(opacity=50); } .combobox-gitem { padding-left: 10px; } .combobox-group { font-weight: bold; } .combobox-item-hover { background-color: #eaf2ff; color: #000000; } .combobox-item-selected { background-color: #ffe48d; color: #000000; } .layout { position: relative; overflow: hidden; margin: 0; padding: 0; z-index: 0; } .layout-panel { position: absolute; overflow: hidden; } .layout-panel-east, .layout-panel-west { z-index: 2; } .layout-panel-north, .layout-panel-south { z-index: 3; } .layout-expand { position: absolute; padding: 0px; font-size: 1px; cursor: pointer; z-index: 1; } .layout-expand .panel-header, .layout-expand .panel-body { background: transparent; filter: none; overflow: hidden; } .layout-expand .panel-header { border-bottom-width: 0px; } .layout-split-proxy-h, .layout-split-proxy-v { position: absolute; font-size: 1px; display: none; z-index: 5; } .layout-split-proxy-h { width: 5px; cursor: e-resize; } .layout-split-proxy-v { height: 5px; cursor: n-resize; } .layout-mask { position: absolute; background: #fafafa; filter: alpha(opacity=10); opacity: 0.10; z-index: 4; } .layout-button-up { background: url('images/layout_arrows.png') no-repeat -16px -16px; } .layout-button-down { background: url('images/layout_arrows.png') no-repeat -16px 0; } .layout-button-left { background: url('images/layout_arrows.png') no-repeat 0 0; } .layout-button-right { background: url('images/layout_arrows.png') no-repeat 0 -16px; } .layout-split-proxy-h, .layout-split-proxy-v { background-color: #aac5e7; } .layout-split-north { border-bottom: 5px solid #E6EEF8; } .layout-split-south { border-top: 5px solid #E6EEF8; } .layout-split-east { border-left: 5px solid #E6EEF8; } .layout-split-west { border-right: 5px solid #E6EEF8; } .layout-expand { background-color: #E0ECFF; } .layout-expand-over { background-color: #E0ECFF; } .tabs-container { overflow: hidden; } .tabs-header { border-width: 1px; border-style: solid; border-bottom-width: 0; position: relative; padding: 0; padding-top: 2px; overflow: hidden; } .tabs-header-plain { border: 0; background: transparent; } .tabs-scroller-left, .tabs-scroller-right { position: absolute; top: auto; bottom: 0; width: 18px; font-size: 1px; display: none; cursor: pointer; border-width: 1px; border-style: solid; } .tabs-scroller-left { left: 0; } .tabs-scroller-right { right: 0; } .tabs-tool { position: absolute; bottom: 0; padding: 1px; overflow: hidden; border-width: 1px; border-style: solid; } .tabs-header-plain .tabs-tool { padding: 0 1px; } .tabs-wrap { position: relative; left: 0; overflow: hidden; width: 100%; margin: 0; padding: 0; } .tabs-scrolling { margin-left: 18px; margin-right: 18px; } .tabs-disabled { opacity: 0.3; filter: alpha(opacity=30); } .tabs { list-style-type: none; height: 26px; margin: 0px; padding: 0px; padding-left: 4px; width: 50000px; border-style: solid; border-width: 0 0 1px 0; } .tabs li { float: left; display: inline-block; margin: 0 4px -1px 0; padding: 0; position: relative; border: 0; } .tabs li a.tabs-inner { display: inline-block; text-decoration: none; margin: 0; padding: 0 10px; height: 25px; line-height: 25px; text-align: center; white-space: nowrap; border-width: 1px; border-style: solid; -moz-border-radius: 5px 5px 0 0; -webkit-border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0; } .tabs li.tabs-selected a.tabs-inner { font-weight: bold; outline: none; } .tabs li.tabs-selected a:hover.tabs-inner { cursor: default; pointer: default; } .tabs li a.tabs-close, .tabs-p-tool { position: absolute; font-size: 1px; display: block; height: 12px; padding: 0; top: 50%; margin-top: -6px; overflow: hidden; } .tabs li a.tabs-close { width: 12px; right: 5px; opacity: 0.6; filter: alpha(opacity=60); } .tabs-p-tool { right: 16px; } .tabs-p-tool a { display: inline-block; font-size: 1px; width: 12px; height: 12px; margin: 0; opacity: 0.6; filter: alpha(opacity=60); } .tabs li a:hover.tabs-close, .tabs-p-tool a:hover { opacity: 1; filter: alpha(opacity=100); cursor: hand; cursor: pointer; } .tabs-with-icon { padding-left: 18px; } .tabs-icon { position: absolute; width: 16px; height: 16px; left: 10px; top: 50%; margin-top: -8px; } .tabs-title { font-size: 12px; } .tabs-closable { padding-right: 8px; } .tabs-panels { margin: 0px; padding: 0px; border-width: 1px; border-style: solid; border-top-width: 0; overflow: hidden; } .tabs-header-bottom { border-width: 0 1px 1px 1px; padding: 0 0 2px 0; } .tabs-header-bottom .tabs { border-width: 1px 0 0 0; } .tabs-header-bottom .tabs li { margin: -1px 4px 0 0; } .tabs-header-bottom .tabs li a.tabs-inner { -moz-border-radius: 0 0 5px 5px; -webkit-border-radius: 0 0 5px 5px; border-radius: 0 0 5px 5px; } .tabs-header-bottom .tabs-tool { top: 0; } .tabs-header-bottom .tabs-scroller-left, .tabs-header-bottom .tabs-scroller-right { top: 0; bottom: auto; } .tabs-panels-top { border-width: 1px 1px 0 1px; } .tabs-header-left { float: left; border-width: 1px 0 1px 1px; padding: 0; } .tabs-header-right { float: right; border-width: 1px 1px 1px 0; padding: 0; } .tabs-header-left .tabs-wrap, .tabs-header-right .tabs-wrap { height: 100%; } .tabs-header-left .tabs { height: 100%; padding: 4px 0 0 4px; border-width: 0 1px 0 0; } .tabs-header-right .tabs { height: 100%; padding: 4px 4px 0 0; border-width: 0 0 0 1px; } .tabs-header-left .tabs li, .tabs-header-right .tabs li { display: block; width: 100%; position: relative; } .tabs-header-left .tabs li { left: auto; right: 0; margin: 0 -1px 4px 0; float: right; } .tabs-header-right .tabs li { left: 0; right: auto; margin: 0 0 4px -1px; float: left; } .tabs-header-left .tabs li a.tabs-inner { display: block; text-align: left; -moz-border-radius: 5px 0 0 5px; -webkit-border-radius: 5px 0 0 5px; border-radius: 5px 0 0 5px; } .tabs-header-right .tabs li a.tabs-inner { display: block; text-align: left; -moz-border-radius: 0 5px 5px 0; -webkit-border-radius: 0 5px 5px 0; border-radius: 0 5px 5px 0; } .tabs-panels-right { float: right; border-width: 1px 1px 1px 0; } .tabs-panels-left { float: left; border-width: 1px 0 1px 1px; } .tabs-header-noborder, .tabs-panels-noborder { border: 0px; } .tabs-header-plain { border: 0px; background: transparent; } .tabs-scroller-left { background: #E0ECFF url('images/tabs_icons.png') no-repeat 1px center; } .tabs-scroller-right { background: #E0ECFF url('images/tabs_icons.png') no-repeat -15px center; } .tabs li a.tabs-close { background: url('images/tabs_icons.png') no-repeat -34px center; } .tabs li a.tabs-inner:hover { background: #eaf2ff; color: #000000; filter: none; } .tabs li.tabs-selected a.tabs-inner { background-color: #ffffff; color: #0E2D5F; background: -webkit-linear-gradient(top,#EFF5FF 0,#ffffff 100%); background: -moz-linear-gradient(top,#EFF5FF 0,#ffffff 100%); background: -o-linear-gradient(top,#EFF5FF 0,#ffffff 100%); background: linear-gradient(to bottom,#EFF5FF 0,#ffffff 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#ffffff,GradientType=0); } .tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { background: -webkit-linear-gradient(top,#ffffff 0,#EFF5FF 100%); background: -moz-linear-gradient(top,#ffffff 0,#EFF5FF 100%); background: -o-linear-gradient(top,#ffffff 0,#EFF5FF 100%); background: linear-gradient(to bottom,#ffffff 0,#EFF5FF 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#EFF5FF,GradientType=0); } .tabs-header-left .tabs li.tabs-selected a.tabs-inner { background: -webkit-linear-gradient(left,#EFF5FF 0,#ffffff 100%); background: -moz-linear-gradient(left,#EFF5FF 0,#ffffff 100%); background: -o-linear-gradient(left,#EFF5FF 0,#ffffff 100%); background: linear-gradient(to right,#EFF5FF 0,#ffffff 100%); background-repeat: repeat-y; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#ffffff,GradientType=1); } .tabs-header-right .tabs li.tabs-selected a.tabs-inner { background: -webkit-linear-gradient(left,#ffffff 0,#EFF5FF 100%); background: -moz-linear-gradient(left,#ffffff 0,#EFF5FF 100%); background: -o-linear-gradient(left,#ffffff 0,#EFF5FF 100%); background: linear-gradient(to right,#ffffff 0,#EFF5FF 100%); background-repeat: repeat-y; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#EFF5FF,GradientType=1); } .tabs li a.tabs-inner { color: #0E2D5F; 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); } .tabs-header, .tabs-tool { background-color: #E0ECFF; } .tabs-header-plain { background: transparent; } .tabs-header, .tabs-scroller-left, .tabs-scroller-right, .tabs-tool, .tabs, .tabs-panels, .tabs li a.tabs-inner, .tabs li.tabs-selected a.tabs-inner, .tabs-header-bottom .tabs li.tabs-selected a.tabs-inner, .tabs-header-left .tabs li.tabs-selected a.tabs-inner, .tabs-header-right .tabs li.tabs-selected a.tabs-inner { border-color: #95B8E7; } .tabs-p-tool a:hover, .tabs li a:hover.tabs-close, .tabs-scroller-over { background-color: #eaf2ff; } .tabs li.tabs-selected a.tabs-inner { border-bottom: 1px solid #ffffff; } .tabs-header-bottom .tabs li.tabs-selected a.tabs-inner { border-top: 1px solid #ffffff; } .tabs-header-left .tabs li.tabs-selected a.tabs-inner { border-right: 1px solid #ffffff; } .tabs-header-right .tabs li.tabs-selected a.tabs-inner { border-left: 1px solid #ffffff; } .datagrid .panel-body { overflow: hidden; position: relative; } .datagrid-view { position: relative; overflow: hidden; } .datagrid-view1, .datagrid-view2 { position: absolute; overflow: hidden; top: 0; } .datagrid-view1 { left: 0; } .datagrid-view2 { right: 0; } .datagrid-mask { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0.3; filter: alpha(opacity=30); display: none; } .datagrid-mask-msg { position: absolute; top: 50%; margin-top: -20px; padding: 10px 5px 10px 30px; width: auto; height: 16px; border-width: 2px; border-style: solid; display: none; } .datagrid-sort-icon { padding: 0; } .datagrid-toolbar { height: auto; padding: 1px 2px; border-width: 0 0 1px 0; border-style: solid; } .datagrid-btn-separator { float: left; height: 24px; border-left: 1px solid #ccc; border-right: 1px solid #fff; margin: 2px 1px; } .datagrid .datagrid-pager { display: block; margin: 0; border-width: 1px 0 0 0; border-style: solid; } .datagrid .datagrid-pager-top { border-width: 0 0 1px 0; } .datagrid-header { overflow: hidden; cursor: default; border-width: 0 0 1px 0; border-style: solid; } .datagrid-header-inner { float: left; width: 10000px; } .datagrid-header-row, .datagrid-row { height: 25px; } .datagrid-header td, .datagrid-body td, .datagrid-footer td { border-width: 0 1px 1px 0; border-style: dotted; margin: 0; padding: 0; } .datagrid-cell, .datagrid-cell-group, .datagrid-header-rownumber, .datagrid-cell-rownumber { margin: 0; padding: 0 4px; white-space: nowrap; word-wrap: normal; overflow: hidden; height: 18px; line-height: 18px; font-size: 12px; } .datagrid-header .datagrid-cell { height: auto; } .datagrid-header .datagrid-cell span { font-size: 12px; } .datagrid-cell-group { text-align: center; } .datagrid-header-rownumber, .datagrid-cell-rownumber { width: 25px; text-align: center; margin: 0; padding: 0; } .datagrid-body { margin: 0; padding: 0; overflow: auto; zoom: 1; } .datagrid-view1 .datagrid-body-inner { padding-bottom: 20px; } .datagrid-view1 .datagrid-body { overflow: hidden; } .datagrid-footer { overflow: hidden; } .datagrid-footer-inner { border-width: 1px 0 0 0; border-style: solid; width: 10000px; float: left; } .datagrid-row-editing .datagrid-cell { height: auto; } .datagrid-header-check, .datagrid-cell-check { padding: 0; width: 27px; height: 18px; font-size: 1px; text-align: center; overflow: hidden; } .datagrid-header-check input, .datagrid-cell-check input { margin: 0; padding: 0; width: 15px; height: 18px; } .datagrid-resize-proxy { position: absolute; width: 1px; height: 10000px; top: 0; cursor: e-resize; display: none; } .datagrid-body .datagrid-editable { margin: 0; padding: 0; } .datagrid-body .datagrid-editable table { width: 100%; height: 100%; } .datagrid-body .datagrid-editable td { border: 0; margin: 0; padding: 0; } .datagrid-view .datagrid-editable-input { margin: 0; padding: 2px 4px; border: 1px solid #95B8E7; font-size: 12px; outline-style: none; -moz-border-radius: 0 0 0 0; -webkit-border-radius: 0 0 0 0; border-radius: 0 0 0 0; } .datagrid-sort-desc .datagrid-sort-icon { padding: 0 13px 0 0; background: url('images/datagrid_icons.png') no-repeat -16px center; } .datagrid-sort-asc .datagrid-sort-icon { padding: 0 13px 0 0; background: url('images/datagrid_icons.png') no-repeat 0px center; } .datagrid-row-collapse { background: url('images/datagrid_icons.png') no-repeat -48px center; } .datagrid-row-expand { background: url('images/datagrid_icons.png') no-repeat -32px center; } .datagrid-mask-msg { background: #ffffff url('images/loading.gif') no-repeat scroll 5px center; } .datagrid-header, .datagrid-td-rownumber { background-color: #efefef; background: -webkit-linear-gradient(top,#F9F9F9 0,#efefef 100%); background: -moz-linear-gradient(top,#F9F9F9 0,#efefef 100%); background: -o-linear-gradient(top,#F9F9F9 0,#efefef 100%); background: linear-gradient(to bottom,#F9F9F9 0,#efefef 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#F9F9F9,endColorstr=#efefef,GradientType=0); } .datagrid-cell-rownumber { color: #000000; } .datagrid-resize-proxy { background: #aac5e7; } .datagrid-mask { background: #ccc; } .datagrid-mask-msg { border-color: #95B8E7; } .datagrid-toolbar, .datagrid-pager { background: #F4F4F4; } .datagrid-header, .datagrid-toolbar, .datagrid-pager, .datagrid-footer-inner { border-color: #dddddd; } .datagrid-header td, .datagrid-body td, .datagrid-footer td { border-color: #ccc; } .datagrid-htable, .datagrid-btable, .datagrid-ftable { color: #000000; border-collapse: separate; } .datagrid-row-alt { background: #fafafa; } .datagrid-row-over, .datagrid-header td.datagrid-header-over { background: #eaf2ff; color: #000000; cursor: default; } .datagrid-row-selected { background: #ffe48d; color: #000000; } .datagrid-row-editing .textbox, .datagrid-row-editing .textbox-text { -moz-border-radius: 0 0 0 0; -webkit-border-radius: 0 0 0 0; border-radius: 0 0 0 0; } .propertygrid .datagrid-view1 .datagrid-body td { padding-bottom: 1px; border-width: 0 1px 0 0; } .propertygrid .datagrid-group { height: 21px; overflow: hidden; border-width: 0 0 1px 0; border-style: solid; } .propertygrid .datagrid-group span { font-weight: bold; } .propertygrid .datagrid-view1 .datagrid-body td { border-color: #dddddd; } .propertygrid .datagrid-view1 .datagrid-group { border-color: #E0ECFF; } .propertygrid .datagrid-view2 .datagrid-group { border-color: #dddddd; } .propertygrid .datagrid-group, .propertygrid .datagrid-view1 .datagrid-body, .propertygrid .datagrid-view1 .datagrid-row-over, .propertygrid .datagrid-view1 .datagrid-row-selected { background: #E0ECFF; } .pagination { zoom: 1; } .pagination table { float: left; height: 30px; } .pagination td { border: 0; } .pagination-btn-separator { float: left; height: 24px; border-left: 1px solid #ccc; border-right: 1px solid #fff; margin: 3px 1px; } .pagination .pagination-num { border-width: 1px; border-style: solid; margin: 0 2px; padding: 2px; width: 2em; height: auto; } .pagination-page-list { margin: 0px 6px; padding: 1px 2px; width: auto; height: auto; border-width: 1px; border-style: solid; } .pagination-info { float: right; margin: 0 6px 0 0; padding: 0; height: 30px; line-height: 30px; font-size: 12px; } .pagination span { font-size: 12px; } .pagination-link .l-btn-text { width: 24px; text-align: center; margin: 0; } .pagination-first { background: url('images/pagination_icons.png') no-repeat 0 center; } .pagination-prev { background: url('images/pagination_icons.png') no-repeat -16px center; } .pagination-next { background: url('images/pagination_icons.png') no-repeat -32px center; } .pagination-last { background: url('images/pagination_icons.png') no-repeat -48px center; } .pagination-load { background: url('images/pagination_icons.png') no-repeat -64px center; } .pagination-loading { background: url('images/loading.gif') no-repeat center center; } .pagination-page-list, .pagination .pagination-num { border-color: #95B8E7; } .calendar { border-width: 1px; border-style: solid; padding: 1px; overflow: hidden; } .calendar table { table-layout: fixed; border-collapse: separate; font-size: 12px; width: 100%; height: 100%; } .calendar table td, .calendar table th { font-size: 12px; } .calendar-noborder { border: 0; } .calendar-header { position: relative; height: 22px; } .calendar-title { text-align: center; height: 22px; } .calendar-title span { position: relative; display: inline-block; top: 2px; padding: 0 3px; height: 18px; line-height: 18px; font-size: 12px; cursor: pointer; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .calendar-prevmonth, .calendar-nextmonth, .calendar-prevyear, .calendar-nextyear { position: absolute; top: 50%; margin-top: -7px; width: 14px; height: 14px; cursor: pointer; font-size: 1px; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .calendar-prevmonth { left: 20px; background: url('images/calendar_arrows.png') no-repeat -18px -2px; } .calendar-nextmonth { right: 20px; background: url('images/calendar_arrows.png') no-repeat -34px -2px; } .calendar-prevyear { left: 3px; background: url('images/calendar_arrows.png') no-repeat -1px -2px; } .calendar-nextyear { right: 3px; background: url('images/calendar_arrows.png') no-repeat -49px -2px; } .calendar-body { position: relative; } .calendar-body th, .calendar-body td { text-align: center; } .calendar-day { border: 0; padding: 1px; cursor: pointer; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .calendar-other-month { opacity: 0.3; filter: alpha(opacity=30); } .calendar-disabled { opacity: 0.6; filter: alpha(opacity=60); cursor: default; } .calendar-menu { position: absolute; top: 0; left: 0; width: 180px; height: 150px; padding: 5px; font-size: 12px; display: none; overflow: hidden; } .calendar-menu-year-inner { text-align: center; padding-bottom: 5px; } .calendar-menu-year { width: 40px; text-align: center; border-width: 1px; border-style: solid; margin: 0; padding: 2px; font-weight: bold; font-size: 12px; } .calendar-menu-prev, .calendar-menu-next { display: inline-block; width: 21px; height: 21px; vertical-align: top; cursor: pointer; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .calendar-menu-prev { margin-right: 10px; background: url('images/calendar_arrows.png') no-repeat 2px 2px; } .calendar-menu-next { margin-left: 10px; background: url('images/calendar_arrows.png') no-repeat -45px 2px; } .calendar-menu-month { text-align: center; cursor: pointer; font-weight: bold; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .calendar-body th, .calendar-menu-month { color: #4d4d4d; } .calendar-day { color: #000000; } .calendar-sunday { color: #CC2222; } .calendar-saturday { color: #00ee00; } .calendar-today { color: #0000ff; } .calendar-menu-year { border-color: #95B8E7; } .calendar { border-color: #95B8E7; } .calendar-header { background: #E0ECFF; } .calendar-body, .calendar-menu { background: #ffffff; } .calendar-body th { background: #F4F4F4; padding: 2px 0; } .calendar-hover, .calendar-nav-hover, .calendar-menu-hover { background-color: #eaf2ff; color: #000000; } .calendar-hover { border: 1px solid #b7d2ff; padding: 0; } .calendar-selected { background-color: #ffe48d; color: #000000; border: 1px solid #ffab3f; padding: 0; } .datebox-calendar-inner { height: 180px; } .datebox-button { height: 18px; padding: 2px 5px; text-align: center; } .datebox-button a { font-size: 12px; font-weight: bold; text-decoration: none; opacity: 0.6; filter: alpha(opacity=60); } .datebox-button a:hover { opacity: 1.0; filter: alpha(opacity=100); } .datebox-current, .datebox-close { float: left; } .datebox-close { float: right; } .datebox .combo-arrow { background-image: url('images/datebox_arrow.png'); background-position: center center; } .datebox-button { background-color: #F4F4F4; } .datebox-button a { color: #444; } .numberbox { border: 1px solid #95B8E7; margin: 0; padding: 0 2px; vertical-align: middle; } .textbox { padding: 0; } .spinner { display: inline-block; white-space: nowrap; margin: 0; padding: 0; border-width: 1px; border-style: solid; overflow: hidden; vertical-align: middle; } .spinner .spinner-text { font-size: 12px; border: 0px; margin: 0; padding: 0 2px; vertical-align: baseline; } .spinner-arrow { background-color: #E0ECFF; display: inline-block; overflow: hidden; vertical-align: top; margin: 0; padding: 0; opacity: 1.0; filter: alpha(opacity=100); width: 18px; } .spinner-arrow-up, .spinner-arrow-down { opacity: 0.6; filter: alpha(opacity=60); display: block; font-size: 1px; width: 18px; height: 10px; width: 100%; height: 50%; outline-style: none; } .spinner-arrow-hover { background-color: #eaf2ff; opacity: 1.0; filter: alpha(opacity=100); } .spinner-arrow-up:hover, .spinner-arrow-down:hover { opacity: 1.0; filter: alpha(opacity=100); background-color: #eaf2ff; } .textbox-icon-disabled .spinner-arrow-up:hover, .textbox-icon-disabled .spinner-arrow-down:hover { opacity: 0.6; filter: alpha(opacity=60); background-color: #E0ECFF; cursor: default; } .spinner .textbox-icon-disabled { opacity: 0.6; filter: alpha(opacity=60); } .spinner-arrow-up { background: url('images/spinner_arrows.png') no-repeat 1px center; } .spinner-arrow-down { background: url('images/spinner_arrows.png') no-repeat -15px center; } .spinner { border-color: #95B8E7; } .progressbar { border-width: 1px; border-style: solid; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; overflow: hidden; position: relative; } .progressbar-text { text-align: center; position: absolute; } .progressbar-value { position: relative; overflow: hidden; width: 0; -moz-border-radius: 5px 0 0 5px; -webkit-border-radius: 5px 0 0 5px; border-radius: 5px 0 0 5px; } .progressbar { border-color: #95B8E7; } .progressbar-text { color: #000000; font-size: 12px; } .progressbar-value .progressbar-text { background-color: #ffe48d; color: #000000; } .searchbox { display: inline-block; white-space: nowrap; margin: 0; padding: 0; border-width: 1px; border-style: solid; overflow: hidden; vertical-align: middle; } .searchbox .searchbox-text { font-size: 12px; border: 0; margin: 0; padding: 0 2px; vertical-align: top; } .searchbox .searchbox-prompt { font-size: 12px; color: #ccc; } .searchbox-button { width: 18px; height: 20px; overflow: hidden; display: inline-block; vertical-align: top; cursor: pointer; opacity: 0.6; filter: alpha(opacity=60); } .searchbox-button-hover { opacity: 1.0; filter: alpha(opacity=100); } .searchbox .l-btn-plain { border: 0; padding: 0; vertical-align: top; opacity: 0.6; filter: alpha(opacity=60); -moz-border-radius: 0 0 0 0; -webkit-border-radius: 0 0 0 0; border-radius: 0 0 0 0; } .searchbox .l-btn-plain:hover { border: 0; padding: 0; opacity: 1.0; filter: alpha(opacity=100); -moz-border-radius: 0 0 0 0; -webkit-border-radius: 0 0 0 0; border-radius: 0 0 0 0; } .searchbox a.m-btn-plain-active { -moz-border-radius: 0 0 0 0; -webkit-border-radius: 0 0 0 0; border-radius: 0 0 0 0; } .searchbox .m-btn-active { border-width: 0 1px 0 0; -moz-border-radius: 0 0 0 0; -webkit-border-radius: 0 0 0 0; border-radius: 0 0 0 0; } .searchbox .textbox-button-right { border-width: 0 0 0 1px; } .searchbox .textbox-button-left { border-width: 0 1px 0 0; } .searchbox-button { background: url('images/searchbox_button.png') no-repeat center center; } .searchbox { border-color: #95B8E7; background-color: #fff; } .searchbox .l-btn-plain { background: #E0ECFF; } .searchbox .l-btn-plain-disabled, .searchbox .l-btn-plain-disabled:hover { opacity: 0.5; filter: alpha(opacity=50); } .textbox-invalid { border-color: #ffa8a8; background-color: #fff3f3; } .slider-disabled { opacity: 0.5; filter: alpha(opacity=50); } .slider-h { height: 22px; } .slider-v { width: 22px; } .slider-inner { position: relative; height: 6px; top: 7px; border-width: 1px; border-style: solid; border-radius: 5px; } .slider-handle { position: absolute; display: block; outline: none; width: 20px; height: 20px; top: 50%; margin-top: -10px; margin-left: -10px; } .slider-tip { position: absolute; display: inline-block; line-height: 12px; font-size: 12px; white-space: nowrap; top: -22px; } .slider-rule { position: relative; top: 15px; } .slider-rule span { position: absolute; display: inline-block; font-size: 0; height: 5px; border-width: 0 0 0 1px; border-style: solid; } .slider-rulelabel { position: relative; top: 20px; } .slider-rulelabel span { position: absolute; display: inline-block; font-size: 12px; } .slider-v .slider-inner { width: 6px; left: 7px; top: 0; float: left; } .slider-v .slider-handle { left: 50%; margin-top: -10px; } .slider-v .slider-tip { left: -10px; margin-top: -6px; } .slider-v .slider-rule { float: left; top: 0; left: 16px; } .slider-v .slider-rule span { width: 5px; height: 'auto'; border-left: 0; border-width: 1px 0 0 0; border-style: solid; } .slider-v .slider-rulelabel { float: left; top: 0; left: 23px; } .slider-handle { background: url('images/slider_handle.png') no-repeat; } .slider-inner { border-color: #95B8E7; background: #E0ECFF; } .slider-rule span { border-color: #95B8E7; } .slider-rulelabel span { color: #000000; } .menu { position: absolute; margin: 0; padding: 2px; border-width: 1px; border-style: solid; overflow: hidden; } .menu-item { position: relative; margin: 0; padding: 0; overflow: hidden; white-space: nowrap; cursor: pointer; border-width: 1px; border-style: solid; } .menu-text { height: 20px; line-height: 20px; float: left; padding-left: 28px; } .menu-icon { position: absolute; width: 16px; height: 16px; left: 2px; top: 50%; margin-top: -8px; } .menu-rightarrow { position: absolute; width: 16px; height: 16px; right: 0; top: 50%; margin-top: -8px; } .menu-line { position: absolute; left: 26px; top: 0; height: 2000px; font-size: 1px; } .menu-sep { margin: 3px 0px 3px 25px; font-size: 1px; } .menu-active { -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .menu-item-disabled { opacity: 0.5; filter: alpha(opacity=50); cursor: default; } .menu-text, .menu-text span { font-size: 12px; } .menu-shadow { position: absolute; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; 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.2); } .menu-rightarrow { background: url('images/menu_arrows.png') no-repeat -32px center; } .menu-line { border-left: 1px solid #ccc; border-right: 1px solid #fff; } .menu-sep { border-top: 1px solid #ccc; border-bottom: 1px solid #fff; } .menu { background-color: #fafafa; border-color: #ddd; color: #444; } .menu-content { background: #ffffff; } .menu-item { border-color: transparent; _border-color: #fafafa; } .menu-active { border-color: #b7d2ff; color: #000000; background: #eaf2ff; } .menu-active-disabled { border-color: transparent; background: transparent; color: #444; } .m-btn-downarrow, .s-btn-downarrow { display: inline-block; position: absolute; width: 16px; height: 16px; font-size: 1px; right: 0; top: 50%; margin-top: -8px; } .m-btn-active, .s-btn-active { background: #eaf2ff; color: #000000; border: 1px solid #b7d2ff; filter: none; } .m-btn-plain-active, .s-btn-plain-active { background: transparent; padding: 0; border-width: 1px; border-style: solid; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .m-btn .l-btn-left .l-btn-text { margin-right: 20px; } .m-btn .l-btn-icon-right .l-btn-text { margin-right: 40px; } .m-btn .l-btn-icon-right .l-btn-icon { right: 20px; } .m-btn .l-btn-icon-top .l-btn-text { margin-right: 4px; margin-bottom: 14px; } .m-btn .l-btn-icon-bottom .l-btn-text { margin-right: 4px; margin-bottom: 34px; } .m-btn .l-btn-icon-bottom .l-btn-icon { top: auto; bottom: 20px; } .m-btn .l-btn-icon-top .m-btn-downarrow, .m-btn .l-btn-icon-bottom .m-btn-downarrow { top: auto; bottom: 0px; left: 50%; margin-left: -8px; } .m-btn-line { display: inline-block; position: absolute; font-size: 1px; display: none; } .m-btn .l-btn-left .m-btn-line { right: 0; width: 16px; height: 500px; border-style: solid; border-color: #aac5e7; border-width: 0 0 0 1px; } .m-btn .l-btn-icon-top .m-btn-line, .m-btn .l-btn-icon-bottom .m-btn-line { left: 0; bottom: 0; width: 500px; height: 16px; border-width: 1px 0 0 0; } .m-btn-large .l-btn-icon-right .l-btn-text { margin-right: 56px; } .m-btn-large .l-btn-icon-bottom .l-btn-text { margin-bottom: 50px; } .m-btn-downarrow, .s-btn-downarrow { background: url('images/menu_arrows.png') no-repeat 0 center; } .m-btn-plain-active, .s-btn-plain-active { border-color: #b7d2ff; background-color: #eaf2ff; color: #000000; } .s-btn:hover .m-btn-line, .s-btn-active .m-btn-line, .s-btn-plain-active .m-btn-line { display: inline-block; } .l-btn:hover .s-btn-downarrow, .s-btn-active .s-btn-downarrow, .s-btn-plain-active .s-btn-downarrow { border-style: solid; border-color: #aac5e7; border-width: 0 0 0 1px; } .messager-body { padding: 10px; overflow: hidden; } .messager-button { text-align: center; padding-top: 10px; } .messager-button .l-btn { width: 70px; } .messager-icon { float: left; width: 32px; height: 32px; margin: 0 10px 10px 0; } .messager-error { background: url('images/messager_icons.png') no-repeat scroll -64px 0; } .messager-info { background: url('images/messager_icons.png') no-repeat scroll 0 0; } .messager-question { background: url('images/messager_icons.png') no-repeat scroll -32px 0; } .messager-warning { background: url('images/messager_icons.png') no-repeat scroll -96px 0; } .messager-progress { padding: 10px; } .messager-p-msg { margin-bottom: 5px; } .messager-body .messager-input { width: 100%; padding: 1px 0; border: 1px solid #95B8E7; } .tree { margin: 0; padding: 0; list-style-type: none; } .tree li { white-space: nowrap; } .tree li ul { list-style-type: none; margin: 0; padding: 0; } .tree-node { height: 18px; white-space: nowrap; cursor: pointer; } .tree-hit { cursor: pointer; } .tree-expanded, .tree-collapsed, .tree-folder, .tree-file, .tree-checkbox, .tree-indent { display: inline-block; width: 16px; height: 18px; vertical-align: top; overflow: hidden; } .tree-expanded { background: url('images/tree_icons.png') no-repeat -18px 0px; } .tree-expanded-hover { background: url('images/tree_icons.png') no-repeat -50px 0px; } .tree-collapsed { background: url('images/tree_icons.png') no-repeat 0px 0px; } .tree-collapsed-hover { background: url('images/tree_icons.png') no-repeat -32px 0px; } .tree-lines .tree-expanded, .tree-lines .tree-root-first .tree-expanded { background: url('images/tree_icons.png') no-repeat -144px 0; } .tree-lines .tree-collapsed, .tree-lines .tree-root-first .tree-collapsed { background: url('images/tree_icons.png') no-repeat -128px 0; } .tree-lines .tree-node-last .tree-expanded, .tree-lines .tree-root-one .tree-expanded { background: url('images/tree_icons.png') no-repeat -80px 0; } .tree-lines .tree-node-last .tree-collapsed, .tree-lines .tree-root-one .tree-collapsed { background: url('images/tree_icons.png') no-repeat -64px 0; } .tree-line { background: url('images/tree_icons.png') no-repeat -176px 0; } .tree-join { background: url('images/tree_icons.png') no-repeat -192px 0; } .tree-joinbottom { background: url('images/tree_icons.png') no-repeat -160px 0; } .tree-folder { background: url('images/tree_icons.png') no-repeat -208px 0; } .tree-folder-open { background: url('images/tree_icons.png') no-repeat -224px 0; } .tree-file { background: url('images/tree_icons.png') no-repeat -240px 0; } .tree-loading { background: url('images/loading.gif') no-repeat center center; } .tree-checkbox0 { background: url('images/tree_icons.png') no-repeat -208px -18px; } .tree-checkbox1 { background: url('images/tree_icons.png') no-repeat -224px -18px; } .tree-checkbox2 { background: url('images/tree_icons.png') no-repeat -240px -18px; } .tree-title { font-size: 12px; display: inline-block; text-decoration: none; vertical-align: top; white-space: nowrap; padding: 0 2px; height: 18px; line-height: 18px; } .tree-node-proxy { font-size: 12px; line-height: 20px; padding: 0 2px 0 20px; border-width: 1px; border-style: solid; z-index: 9900000; } .tree-dnd-icon { display: inline-block; position: absolute; width: 16px; height: 18px; left: 2px; top: 50%; margin-top: -9px; } .tree-dnd-yes { background: url('images/tree_icons.png') no-repeat -256px 0; } .tree-dnd-no { background: url('images/tree_icons.png') no-repeat -256px -18px; } .tree-node-top { border-top: 1px dotted red; } .tree-node-bottom { border-bottom: 1px dotted red; } .tree-node-append .tree-title { border: 1px dotted red; } .tree-editor { border: 1px solid #ccc; font-size: 12px; height: 14px !important; height: 18px; line-height: 14px; padding: 1px 2px; width: 80px; position: absolute; top: 0; } .tree-node-proxy { background-color: #ffffff; color: #000000; border-color: #95B8E7; } .tree-node-hover { background: #eaf2ff; color: #000000; } .tree-node-selected { background: #ffe48d; color: #000000; } .validatebox-invalid { border-color: #ffa8a8; background-color: #fff3f3; color: #000; } .tooltip { position: absolute; display: none; z-index: 9900000; outline: none; opacity: 1; filter: alpha(opacity=100); padding: 5px; border-width: 1px; border-style: solid; border-radius: 5px; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px; } .tooltip-content { font-size: 12px; } .tooltip-arrow-outer, .tooltip-arrow { position: absolute; width: 0; height: 0; line-height: 0; font-size: 0; border-style: solid; border-width: 6px; border-color: transparent; _border-color: tomato; _filter: chroma(color=tomato); } .tooltip-right .tooltip-arrow-outer { left: 0; top: 50%; margin: -6px 0 0 -13px; } .tooltip-right .tooltip-arrow { left: 0; top: 50%; margin: -6px 0 0 -12px; } .tooltip-left .tooltip-arrow-outer { right: 0; top: 50%; margin: -6px -13px 0 0; } .tooltip-left .tooltip-arrow { right: 0; top: 50%; margin: -6px -12px 0 0; } .tooltip-top .tooltip-arrow-outer { bottom: 0; left: 50%; margin: 0 0 -13px -6px; } .tooltip-top .tooltip-arrow { bottom: 0; left: 50%; margin: 0 0 -12px -6px; } .tooltip-bottom .tooltip-arrow-outer { top: 0; left: 50%; margin: -13px 0 0 -6px; } .tooltip-bottom .tooltip-arrow { top: 0; left: 50%; margin: -12px 0 0 -6px; } .tooltip { background-color: #ffffff; border-color: #95B8E7; color: #000000; } .tooltip-right .tooltip-arrow-outer { border-right-color: #95B8E7; } .tooltip-right .tooltip-arrow { border-right-color: #ffffff; } .tooltip-left .tooltip-arrow-outer { border-left-color: #95B8E7; } .tooltip-left .tooltip-arrow { border-left-color: #ffffff; } .tooltip-top .tooltip-arrow-outer { border-top-color: #95B8E7; } .tooltip-top .tooltip-arrow { border-top-color: #ffffff; } .tooltip-bottom .tooltip-arrow-outer { border-bottom-color: #95B8E7; } .tooltip-bottom .tooltip-arrow { border-bottom-color: #ffffff; }
{ "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, 3, 0, 0, 15, 128, 1, 0, 228, 144, 0, 8, 228, 160, 5, 0, 0, 3, 0, 0, 4, 128, 0, 0, 255, 128, 0, 0, 255, 144, 88, 0, 0, 4, 1, 0, 15, 128, 0, 0, 170, 140, 2, 0, 0, 160, 2, 0, 85, 160, 65, 0, 0, 1, 1, 0, 15, 128, 6, 0, 0, 2, 0, 0, 8, 128, 2, 0, 255, 144, 5, 0, 0, 3, 1, 0, 3, 128, 0, 0, 255, 128, 2, 0, 228, 144, 6, 0, 0, 2, 0, 0, 8, 128, 3, 0, 255, 144, 6, 0, 0, 2, 1, 0, 4, 128, 4, 0, 255, 144, 4, 0, 0, 4, 0, 0, 3, 128, 0, 0, 228, 128, 2, 0, 170, 160, 2, 0, 0, 160, 5, 0, 0, 3, 0, 0, 3, 128, 0, 0, 228, 128, 0, 0, 228, 144, 5, 0, 0, 3, 0, 0, 3, 128, 0, 0, 228, 128, 0, 0, 0, 160, 4, 0, 0, 4, 1, 0, 12, 128, 4, 0, 68, 144, 1, 0, 170, 128, 1, 0, 68, 129, 4, 0, 0, 4, 1, 0, 12, 128, 1, 0, 228, 128, 0, 0, 0, 128, 1, 0, 68, 128, 4, 0, 0, 4, 0, 0, 9, 128, 3, 0, 100, 144, 0, 0, 255, 128, 1, 0, 100, 129, 4, 0, 0, 4, 0, 0, 3, 128, 0, 0, 236, 128, 0, 0, 85, 128, 1, 0, 238, 128, 2, 0, 0, 3, 0, 0, 3, 128, 0, 0, 228, 128, 2, 0, 255, 160, 5, 0, 0, 3, 1, 0, 1, 128, 0, 0, 0, 128, 3, 0, 0, 160, 4, 0, 0, 4, 0, 0, 1, 128, 0, 0, 85, 128, 3, 0, 0, 161, 3, 0, 85, 160, 4, 0, 0, 4, 1, 0, 4, 128, 1, 0, 85, 160, 0, 0, 0, 128, 1, 0, 0, 160, 66, 0, 0, 3, 1, 0, 15, 128, 1, 0, 232, 128, 1, 8, 228, 160, 1, 0, 0, 2, 0, 8, 7, 128, 1, 0, 228, 128, 1, 0, 0, 2, 0, 8, 8, 128, 0, 0, 170, 128, 255, 255, 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-9]+: mpls.*dec_ttl.*foo.*index 8 ref", "matchCount": "0", "teardown": [] }, { "id": "6ce1", "name": "Add mpls dec_ttl action with label (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl label 20", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*label.*20.*pipe", "matchCount": "0", "teardown": [] }, { "id": "352f", "name": "Add mpls dec_ttl action with tc (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl tc 3", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*tc.*3.*pipe", "matchCount": "0", "teardown": [] }, { "id": "fa1c", "name": "Add mpls dec_ttl action with ttl (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl ttl 20", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*ttl.*20.*pipe", "matchCount": "0", "teardown": [] }, { "id": "6b79", "name": "Add mpls dec_ttl action with bos (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls dec_ttl bos 1", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*dec_ttl.*bos.*1.*pipe", "matchCount": "0", "teardown": [] }, { "id": "d4c4", "name": "Add mpls pop action with ip proto", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*pop.*protocol.*ip.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "91fb", "name": "Add mpls pop action with ip proto and cookie", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 cookie 12345678", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*pop.*protocol.*ip.*pipe.*ref 1.*cookie 12345678", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "92fe", "name": "Add mpls pop action with mpls proto", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls pop protocol mpls_mc", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*pop.*protocol.*mpls_mc.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "7e23", "name": "Add mpls pop action with no protocol (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls pop", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*pop.*pipe", "matchCount": "0", "teardown": [] }, { "id": "6182", "name": "Add mpls pop action with label (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 label 20", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*pop.*label.*20.*pipe", "matchCount": "0", "teardown": [] }, { "id": "6475", "name": "Add mpls pop action with tc (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 tc 3", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*pop.*tc.*3.*pipe", "matchCount": "0", "teardown": [] }, { "id": "067b", "name": "Add mpls pop action with ttl (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 ttl 20", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*pop.*ttl.*20.*pipe", "matchCount": "0", "teardown": [] }, { "id": "7316", "name": "Add mpls pop action with bos (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls pop protocol ipv4 bos 1", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*pop.*bos.*1.*pipe", "matchCount": "0", "teardown": [] }, { "id": "38cc", "name": "Add mpls push action with label", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls push label 20", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*ttl.*[0-9]+.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "c281", "name": "Add mpls push action with mpls_mc protocol", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls push protocol mpls_mc label 20", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_mc.*label.*20.*ttl.*[0-9]+.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "5db4", "name": "Add mpls push action with label, tc and ttl", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls push label 20 tc 3 ttl 128", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*tc.*3.*ttl.*128.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "7c34", "name": "Add mpls push action with label, tc ttl and cookie of max length", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls push label 20 tc 3 ttl 128 cookie aa11bb22cc33dd44ee55ff66aa11b1b2", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*tc.*3.*ttl.*128.*pipe.*ref 1.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "16eb", "name": "Add mpls push action with label and bos", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls push label 20 bos 1", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*bos.*1.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "d69d", "name": "Add mpls push action with no label (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls push", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*pipe", "matchCount": "0", "teardown": [] }, { "id": "e8e4", "name": "Add mpls push action with ipv4 protocol (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls push protocol ipv4 label 20", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*ttl.*[0-9]+.*pipe", "matchCount": "0", "teardown": [] }, { "id": "ecd0", "name": "Add mpls push action with out of range label (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls push label 1048576", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*1048576.*pipe", "matchCount": "0", "teardown": [] }, { "id": "d303", "name": "Add mpls push action with out of range tc (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls push label 20 tc 8", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*tc.*8.*pipe", "matchCount": "0", "teardown": [] }, { "id": "fd6e", "name": "Add mpls push action with ttl of 0 (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls push label 20 ttl 0", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*20.*ttl.*0.*pipe", "matchCount": "0", "teardown": [] }, { "id": "19e9", "name": "Add mpls mod action with mpls label", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod label 20", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*label.*20.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "1fde", "name": "Add mpls mod action with max mpls label", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod label 0xfffff", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*label.*1048575.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "0c50", "name": "Add mpls mod action with mpls label exceeding max (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod label 0x100000", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*label.*1048576.*pipe", "matchCount": "0", "teardown": [] }, { "id": "10b6", "name": "Add mpls mod action with mpls label of MPLS_LABEL_IMPLNULL (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod label 3", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*label.*3.*pipe", "matchCount": "0", "teardown": [] }, { "id": "57c9", "name": "Add mpls mod action with mpls min tc", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod tc 0", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*tc.*0.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "6872", "name": "Add mpls mod action with mpls max tc", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod tc 7", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*tc.*7.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "a70a", "name": "Add mpls mod action with mpls tc exceeding max (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod tc 8", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*tc.*4.*pipe", "matchCount": "0", "teardown": [] }, { "id": "6ed5", "name": "Add mpls mod action with mpls ttl", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod ttl 128", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*ttl.*128.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "77c1", "name": "Add mpls mod action with mpls ttl and cookie", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod ttl 128 cookie aa11bb22cc33dd44ee55ff66aa11b1b2", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*ttl.*128.*pipe.*ref 1.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "b80f", "name": "Add mpls mod action with mpls max ttl", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod ttl 255", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*ttl.*255.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "8864", "name": "Add mpls mod action with mpls min ttl", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod ttl 1", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*ttl.*1.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "6c06", "name": "Add mpls mod action with mpls ttl of 0 (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod ttl 0", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*ttl.*0.*pipe", "matchCount": "0", "teardown": [] }, { "id": "b5d8", "name": "Add mpls mod action with mpls ttl exceeding max (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod ttl 256", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*ttl.*256.*pipe", "matchCount": "0", "teardown": [] }, { "id": "451f", "name": "Add mpls mod action with mpls max bos", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod bos 1", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*bos.*1.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "a1ed", "name": "Add mpls mod action with mpls min bos", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod bos 0", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*bos.*0.*pipe", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "3dcf", "name": "Add mpls mod action with mpls bos exceeding max (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod bos 2", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*bos.*2.*pipe", "matchCount": "0", "teardown": [] }, { "id": "db7c", "name": "Add mpls mod action with protocol (invalid)", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ] ], "cmdUnderTest": "$TC actions add action mpls mod protocol ipv4", "expExitCode": "255", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*modify.*protocol.*ip.*pipe", "matchCount": "0", "teardown": [] }, { "id": "b070", "name": "Replace existing mpls push action with new ID", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ], "$TC actions add action mpls push label 20 pipe index 12" ], "cmdUnderTest": "$TC actions replace action mpls push label 30 pipe index 12", "expExitCode": "0", "verifyCmd": "$TC actions get action mpls index 12", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*30.*pipe.*index 12 ref", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "95a9", "name": "Replace existing mpls push action with new label, tc, ttl and cookie", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ], "$TC actions add action mpls push label 20 tc 3 ttl 128 index 1 cookie aa11bb22cc33dd44ee55ff66aa11b1b2" ], "cmdUnderTest": "$TC actions replace action mpls push label 30 tc 2 ttl 125 pipe index 1 cookie aa11bb22cc33", "expExitCode": "0", "verifyCmd": "$TC actions get action mpls index 1", "matchPattern": "action order [0-9]+: mpls.*push.*protocol.*mpls_uc.*label.*30 tc 2 ttl 125 pipe.*index 1.*cookie aa11bb22cc33", "matchCount": "1", "teardown": [ "$TC actions flush action mpls" ] }, { "id": "6cce", "name": "Delete mpls pop action", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ], "$TC actions add action mpls pop protocol ipv4 index 44" ], "cmdUnderTest": "$TC actions del action mpls index 44", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*pop.*index 44 ref", "matchCount": "0", "teardown": [] }, { "id": "d138", "name": "Flush mpls actions", "category": [ "actions", "mpls" ], "setup": [ [ "$TC actions flush action mpls", 0, 1, 255 ], "$TC actions add action mpls push label 10 index 10", "$TC actions add action mpls push label 20 index 20", "$TC actions add action mpls push label 30 index 30", "$TC actions add action mpls push label 40 index 40" ], "cmdUnderTest": "$TC actions flush action mpls", "expExitCode": "0", "verifyCmd": "$TC actions list action mpls", "matchPattern": "action order [0-9]+: mpls.*push.*", "matchCount": "0", "teardown": [] } ]
{ "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\^[\^\\^]\^^\^_\ \ !\"#$%&'()*+,-./0123456789:;<=>?@\ \ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~\127" val allchars = let fun h 0 res = chr 0 :: res | h n res = h (n-1) (chr n :: res) in h 255 [] end open Char in val test21 = checkset isLower "abcdefghijklmnopqrstuvwxyz"; val test22 = checkset isUpper "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; val test23 = checkset isDigit "0123456789"; val test24 = checkset isAlpha "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; val test25 = checkset isHexDigit "0123456789abcdefABCDEF"; val test26 = checkset isAlphaNum "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; val test27 = checkset isPrint (" " ^ graphchars) val test28 = checkset isSpace " \009\010\011\012\013"; val test29 = checkset isGraph graphchars val test30 = checkset isAscii ascii val test31 = check'(fn _ => map toLower (explode ascii) = explode lowerascii) val test32 = check'(fn _ => map toUpper (explode ascii) = explode upperascii) val test33 = check'(fn _ => map toUpper (explode graphchars) seq map toLower (explode graphchars) seq true) val test34a = check'(fn _ => map pred (List.drop(allchars, 1)) = List.take(allchars, 255)); val test34b = (pred minChar seq "WRONG") handle Chr => "OK" | _ => "WRONG"; val test35a = check'(fn _ => map succ (List.take(allchars, 255)) = List.drop(allchars, 1)); val test35b = (succ maxChar seq "WRONG") handle Chr => "OK" | _ => "WRONG"; end (* Test cases for SML character escape functions. *) val test36 = let fun chk (arg, res) = Char.toString arg = res in check'(fn _ => List.all chk [(#"\000", "\\^@"), (#"\001", "\\^A"), (#"\006", "\\^F"), (#"\007", "\\a"), (#"\008", "\\b"), (#"\009", "\\t"), (#"\010", "\\n"), (#"\011", "\\v"), (#"\012", "\\f"), (#"\013", "\\r"), (#"\014", "\\^N"), (#"\031", "\\^_"), (#"\032", " "), (#"\126", "~"), (#"\\", "\\\\"), (#"\"", "\\\""), (#"A", "A"), (#"\127", "\\127"), (#"\128", "\\128"), (#"\255", "\\255")]) end; val test37 = let val chars = List.tabulate(256, chr) fun chk c = Char.fromString(Char.toString c) = SOME c in check'(fn _ => List.all chk chars) end val test38 = let fun chkFromString (arg, res) = Char.fromString arg = SOME res val argResList = [("A", #"A"), ("z", #"z"), ("@", #"@"), ("~", #"~"), ("\\a", #"\007"), ("\\b", #"\008"), ("\\t", #"\009"), ("\\n", #"\010"), ("\\v", #"\011"), ("\\f", #"\012"), ("\\r", #"\013"), ("\\\\", #"\\"), ("\\\"", #"\""), ("\\^@", #"\000"), ("\\^A", #"\001"), ("\\^Z", #"\026"), ("\\^_", #"\031"), ("\\000", #"\000"), ("\\097", #"a"), ("\\255", #"\255"), ("\\ \t\n\n \\A", #"A"), ("\\ \t\n\n \\z", #"z"), ("\\ \t\n\n \\@", #"@"), ("\\ \t\n\n \\~", #"~"), ("\\ \t\n\n \\\\n", #"\n"), ("\\ \t\n\n \\\\t", #"\t"), ("\\ \t\n\n \\\\\\", #"\\"), ("\\ \t\n\n \\\\\"", #"\""), ("\\ \t\n\n \\\\^@", #"\000"), ("\\ \t\n\n \\\\^A", #"\001"), ("\\ \t\n\n \\\\^Z", #"\026"), ("\\ \t\n\n \\\\^_", #"\031"), ("\\ \t\n\n \\\\000", #"\000"), ("\\ \t\n\n \\\\097", #"a"), ("\\ \t\n\n \\\\255", #"\255")] in check'(fn _ => List.all chkFromString argResList) end; val test39 = check'(fn _ => List.all (fn arg => Char.fromString arg = NONE) ["\\", "\\c", "\\F", "\\e", "\\g", "\\N", "\\T", "\\1", "\\11", "\\256", "\\-65", "\\~65", "\\?", "\\^`", "\\^a", "\\^z", "\\ a", "\\ a\\B", "\\ \\"]); (* Test cases for C string escape functions *) val test40 = let val chars = List.tabulate(256, chr) in check'(fn _ => List.map SOME chars = List.map Char.fromCString (List.map Char.toCString chars)) end; val test41 = let val argResList = [(#"\010", "\\n"), (#"\009", "\\t"), (#"\011", "\\v"), (#"\008", "\\b"), (#"\013", "\\r"), (#"\012", "\\f"), (#"\007", "\\a"), (#"\\", "\\\\"), (#"?", "\\?"), (#"'", "\\'"), (#"\"", "\\\"")] in check'(fn _ => List.all (fn (arg, res) => Char.toCString arg = res) argResList) end; val test42 = let fun checkFromCStringSucc (arg, res) = str (valOf (Char.fromCString arg)) = res val argResList = [("\\n", "\010"), ("\\t", "\009"), ("\\v", "\011"), ("\\b", "\008"), ("\\r", "\013"), ("\\f", "\012"), ("\\a", "\007"), ("\\\\", "\\"), ("\\?", "?"), ("\\'", "'"), ("\\\"", "\""), ("\\1", "\001"), ("\\11", "\009"), ("\\111", "\073"), ("\\1007", "\064"), ("\\100A", "\064"), ("\\0", "\000"), ("\\377", "\255"), ("\\18", "\001"), ("\\178", "\015"), ("\\1C", "\001"), ("\\17C", "\015"), ("\\x0", "\000"), ("\\xff", "\255"), ("\\xFF", "\255"), ("\\x1", "\001"), ("\\x11", "\017"), ("\\xag", "\010"), ("\\xAAg", "\170"), ("\\x0000000a", "\010"), ("\\x0000000a2", "\162"), ("\\x0000000ag", "\010"), ("\\x0000000A", "\010"), ("\\x0000000A2", "\162"), ("\\x0000000Ag", "\010"), ("\\x00000000000000000000000000000000000000000000000000000000000000011+", "\017")] in check'(fn _ => List.all checkFromCStringSucc argResList) end; val test43 = let fun checkFromCStringFail arg = Char.fromCString arg = NONE in check'(fn _ => List.all checkFromCStringFail ["\\", "\\X", "\\=", "\\400", "\\777", "\\8", "\\9", "\\c", "\\d", "\\x", "\\x100", "\\xG"]) end; end
{ "pile_set_name": "Github" }