text:
<?php echo html_escape($this->board->item_id('brd_name', element('brd_id', element('data', $view)))); ?> <a href="<?php echo goto_url(board_url(html_escape($this->board->item_id('brd_key', element('brd_id', element('data', $view)))))); ?>" class="btn-xs" target="_blank">

        <?php if (element('boardlist', $view)) { ?>

            <select name="brd_id" class="form-control" onChange="location.href='<?php echo admin_url($this->pagedir . '/write_general'); ?>/' + this.value;">
                <?php foreach (element('boardlist', $view) as $key => $value) { ?>
                    <option value="<?php echo element('brd_id', $value); ?>" <?php echo set_select('brd_id', element('brd_id', $value), (element('brd_id', element('data', $view)) === element('brd_id', $value) ? true : false)); ?>><?php echo html_escape(element('brd_name', $value)); ?></option>
                <?php } ?>
            </select>

        <?php } ?>

<a href="<?php echo admin_url($this->pagedir . '/write/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">기본정보

<a href="<?php echo admin_url($this->pagedir . '/write_list/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">목록페이지

<a href="<?php echo admin_url($this->pagedir . '/write_post/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">게시물열람

<a href="<?php echo admin_url($this->pagedir . '/write_write/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">게시물작성

<a href="<?php echo admin_url($this->pagedir . '/write_category/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">카테고리

<a href="<?php echo admin_url($this->pagedir . '/write_comment/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">댓글기능

<a href="<?php echo admin_url($this->pagedir . '/write_general/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">일반기능

<a href="<?php echo admin_url($this->pagedir . '/write_point/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">포인트기능

<a href="<?php echo admin_url($this->pagedir . '/write_alarm/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">메일/쪽지/문자

<a href="<?php echo admin_url($this->pagedir . '/write_rss/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">RSS/사이트맵 설정

<a href="<?php echo admin_url($this->pagedir . '/write_access/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">권한관리

<a href="<?php echo admin_url($this->pagedir . '/write_extravars/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">사용자정의

<a href="<?php echo admin_url($this->pagedir . '/write_admin/' . element('brd_id', element('data', $view))); ?>" onclick="return check_form_changed();">게시판관리자

        <?php
        echo validation_errors('
', '
');
        echo show_alert_message(element('alert_message', $view), '
<button type="button" class="close alertclose" >×</button>', '
');
        $attributes = array('class' => 'form-horizontal', 'name' => 'fadminwrite', 'id' => 'fadminwrite');
        echo form_open(current_full_url(), $attributes);
        ?>
            <input type="hidden" name="is_submit" value="1" />
            <input type="hidden" name="<?php echo element('primary_key', $view); ?>" value="<?php echo element(element('primary_key', $view), element('data', $view)); ?>" />

                    원글 수정 및 삭제 금지 기간

                        <input type="number" class="form-control" name="protect_post_day" value="<?php echo set_value('protect_post_day', element('protect_post_day', element('data', $view)) + 0); ?>" />일이 지난 원글은 수정 및 삭제가 불가합니다, 0 이면 항상 수정 및 삭제 가능

                            <input type="checkbox" name="grp[protect_post_day]" id="grp_protect_post_day" value="1" /> 그룹적용

                            <input type="checkbox" name="all[protect_post_day]" id="all_protect_post_day" value="1" /> 전체적용

                    댓글 수정 및 삭제 금지 기간

                        <input type="number" class="form-control" name="protect_comment_day" value="<?php echo set_value('protect_comment_day', element('protect_comment_day', element('data', $view)) + 0); ?>" />일이 지난 댓글은 수정 및 삭제가 불가합니다, 0 이면 항상 수정 및 삭제 가능

                            <input type="checkbox" name="grp[protect_comment_day]" id="grp_protect_comment_day" value="1" /> 그룹적용

                            <input type="checkbox" name="all[protect_comment_day]" id="all_protect_comment_day" value="1" /> 전체적용

                    원글 수정 및 삭제 댓글수

                        <input type="number" class="form-control" name="protect_comment_num" value="<?php echo set_value('protect_comment_num', element('protect_comment_num', element('data', $view)) + 0); ?>" /> 댓글이 해당 개수 이상 달린 원글은 수정 및 삭제가 불가합니다, 0 이면 댓글수에 상관없이 항상 원글 수정 및 삭제가 가능

                            <input type="checkbox" name="grp[protect_comment_num]" id="grp_protect_comment_num" value="1" /> 그룹적용

                            <input type="checkbox" name="all[protect_comment_num]" id="all_protect_comment_num" value="1" /> 전체적용

                    글쓴이 사이드뷰

                            <input type="checkbox" name="use_sideview" id="use_sideview" value="1" <?php echo set_checkbox('use_sideview', '1', (element('use_sideview', element('data', $view)) ? true : false)); ?> /> PC

                            <input type="checkbox" name="use_mobile_sideview" id="use_mobile_sideview" value="1" <?php echo set_checkbox('use_mobile_sideview', '1', (element('use_mobile_sideview', element('data', $view)) ? true : false)); ?> /> 모바일

                            작성자명을 클릭할 경우, 작성자에게 쪽지보내기, 친구등록 등 레이어가 보이게 할지를 결정합니다

                            <input type="checkbox" name="grp[use_sideview]" id="grp_use_sideview" value="1" /> 그룹적용

                            <input type="checkbox" name="all[use_sideview]" id="all_use_sideview" value="1" /> 전체적용

                    작성자명 아이콘 출력여부

                            <input type="checkbox" name="use_sideview_icon" id="use_sideview_icon" value="1" <?php echo set_checkbox('use_sideview_icon', '1', (element('use_sideview_icon', element('data', $view)) ? true : false)); ?> /> PC

                            <input type="checkbox" name="use_mobile_sideview_icon" id="use_mobile_sideview_icon" value="1" <?php echo set_checkbox('use_mobile_sideview_icon', '1', (element('use_mobile_sideview_icon', element('data', $view)) ? true : false)); ?> /> 모바일

                            회원이 회원아이콘을 업로드하였을 경우에, 해당 아이콘이 글쓴이명 좌측에 보일지를 결정합니다.

                            <input type="checkbox" name="grp[use_sideview_icon]" id="grp_use_sideview_icon" value="1" /> 그룹적용

                            <input type="checkbox" name="all[use_sideview_icon]" id="all_use_sideview_icon" value="1" /> 전체적용

                    카테고리 기능

                            <input type="checkbox" name="use_category" id="use_category" value="1" <?php echo set_checkbox('use_category', '1', (element('use_category', element('data', $view)) ? true : false)); ?> /> 사용합니다

                            <input type="checkbox" name="grp[use_category]" id="grp_use_category" value="1" /> 그룹적용

                            <input type="checkbox" name="all[use_category]" id="all_use_category" value="1" /> 전체적용

                    카테고리 목록모양

                        <select name="category_display_style" class="form-control">
                            <option value="" <?php echo set_select('category_display_style', '', (element('category_display_style', element('data', $view)) === '' ? true : false)); ?>>셀렉트박스</option>
                            <option value="tab" <?php echo set_select('category_display_style', 'tab', (element('category_display_style', element('data', $view)) === 'tab' ? true : false)); ?>>탭메뉴형태</option>
                        </select>

                            카테고리 기능을 사용시 목록에 보이는 카테고리 선택 메뉴가 보이는 형식을 결정합니다. 탭메뉴형태를 선택시 1차카테고리만 보이게 됩니다.

                            <input type="checkbox" name="grp[category_display_style]" id="grp_category_display_style" value="1" /> 그룹적용

                            <input type="checkbox" name="all[category_display_style]" id="all_category_display_style" value="1" /> 전체적용

                    카테고리 목록모양 (모바일)

                        <select name="mobile_category_display_style" class="form-control">
                            <option value="" <?php echo set_select('mobile_category_display_style', '', (element('mobile_category_display_style', element('data', $view)) === '' ? true : false)); ?>>셀렉트박스</option>
                            <option value="tab" <?php echo set_select('mobile_category_display_style', 'tab', (element('mobile_category_display_style', element('data', $view)) === 'tab' ? true : false)); ?>>탭메뉴형태</option>
                        </select>

                            카테고리 기능을 사용시 목록에 보이는 카테고리 선택 메뉴가 보이는 형식을 결정합니다. 탭메뉴형태를 선택시 1차카테고리만 보이게 됩니다.

                            <input type="checkbox" name="grp[mobile_category_display_style]" id="grp_mobile_category_display_style" value="1" /> 그룹적용

                            <input type="checkbox" name="all[mobile_category_display_style]" id="all_mobile_category_display_style" value="1" /> 전체적용

                    네이버 신디케이션

                            <input type="checkbox" name="use_naver_syndi" id="use_naver_syndi" value="1" <?php echo set_checkbox('use_naver_syndi', '1', (element('use_naver_syndi', element('data', $view)) ? true : false)); ?> /> 사용합니다
                            신디케이션 기능을 사용하기 위해서는 환경설정 > 기본환경설정 메뉴에서 네이버 신디케이션 연동키를 입력하셔야 합니다

                            <input type="checkbox" name="grp[use_naver_syndi]" id="grp_use_naver_syndi" value="1" /> 그룹적용

                            <input type="checkbox" name="all[use_naver_syndi]" id="all_use_naver_syndi" value="1" /> 전체적용

                    1:1 게시판

                            <input type="checkbox" name="use_personal" id="use_personal" value="1" <?php echo set_checkbox('use_personal', '1', (element('use_personal', element('data', $view)) ? true : false)); ?> /> 사용합니다

                            <input type="checkbox" name="grp[use_personal]" id="grp_use_personal" value="1" /> 그룹적용

                            <input type="checkbox" name="all[use_personal]" id="all_use_personal" value="1" /> 전체적용

                    익명 게시판

                            <input type="checkbox" name="use_anonymous" id="use_anonymous" value="1" <?php echo set_checkbox('use_anonymous', '1', (element('use_anonymous', element('data', $view)) ? true : false)); ?> /> 사용합니다

                            <input type="checkbox" name="grp[use_anonymous]" id="grp_use_anonymous" value="1" /> 그룹적용

                            <input type="checkbox" name="all[use_anonymous]" id="all_use_anonymous" value="1" /> 전체적용

                    임시 저장기능

                            <input type="checkbox" name="use_tempsave" id="use_tempsave" value="1" <?php echo set_checkbox('use_tempsave', '1', (element('use_tempsave', element('data', $view)) ? true : false)); ?> /> 사용합니다    게시글을 작성하다가 다른 페이지로 이동시 내용을 임시서장하여 다음번에 다시 글쓰기를 하려고 할 때 불러옵니다

                            <input type="checkbox" name="grp[use_tempsave]" id="grp_use_tempsave" value="1" /> 그룹적용

                            <input type="checkbox" name="all[use_tempsave]" id="all_use_tempsave" value="1" /> 전체적용

                    삭제글 남김(원글)

                            <input type="checkbox" name="use_post_delete_log" id="use_post_delete_log" value="1" <?php echo set_checkbox('use_post_delete_log', '1', (element('use_post_delete_log', element('data', $view)) ? true : false)); ?> /> 사용합니다
                            글을 삭제하면 "이 글은 000님에 의해 0000년 00월 00일 00시 00분에 삭제되었습니다" 라고 표시됨

                            <input type="checkbox" name="grp[use_post_delete_log]" id="grp_use_post_delete_log" value="1" /> 그룹적용

                            <input type="checkbox" name="all[use_post_delete_log]" id="all_use_post_delete_log" value="1" /> 전체적용

                    삭제글 남김(댓글)

                            <input type="checkbox" name="use_comment_delete_log" id="use_comment_delete_log" value="1" <?php echo set_checkbox('use_comment_delete_log', '1', (element('use_comment_delete_log', element('data', $view)) ? true : false)); ?> /> 사용합니다
                            글을 삭제하면 "이 글은 000님에 의해 0000년 00월 00일 00시 00분에 삭제되었습니다" 라고 표시됨

                            <input type="checkbox" name="grp[use_comment_delete_log]" id="grp_use_comment_delete_log" value="1" /> 그룹적용

                            <input type="checkbox" name="all[use_comment_delete_log]" id="all_use_comment_delete_log" value="1" /> 전체적용

                    목록 날짜 표시 방법 (PC)

                        <select name="list_date_style" class="form-control select-date-style" data-display-target="list_date_style_manual_wrapper">
                            <option value="" <?php echo set_select('list_date_style', '', (element('list_date_style', element('data', $view)) === '' ? true : false)); ?>>기본</option>
                            <option value="sns" <?php echo set_select('list_date_style', 'sns', (element('list_date_style', element('data', $view)) === 'sns' ? true : false)); ?>>SNS 스타일</option>
                            <option value="user" <?php echo set_select('list_date_style', 'user', (element('list_date_style', element('data', $view)) === 'user' ? true : false)); ?>>사용자정의</option>
                        </select>
                        <span id="list_date_style_manual_wrapper" style="display:<?php echo (element('list_date_style', element('data', $view)) === 'user') ? 'inline' : 'none'; ?>">
                        <?php echo date("<input type="text" class="form-control" name="list_date_style_manual" value="<?php echo set_value('list_date_style_manual', element('list_date_style_manual', element('data', $view))); ?>" />", $posttime); ?>

                            <input type="checkbox" name="grp[list_date_style]" id="grp_list_date_style" value="1" /> 그룹적용

                            <input type="checkbox" name="all[list_date_style]" id="all_list_date_style" value="1" /> 전체적용

                    본문 날짜 표시 방법 (PC)

                        <select name="view_date_style" class="form-control select-date-style" data-display-target="view_date_style_manual_wrapper">
                            <option value="" <?php echo set_select('view_date_style', '', (element('view_date_style', element('data', $view)) === '' ? true : false)); ?>>기본</option>
                            <option value="sns" <?php echo set_select('view_date_style', 'sns', (element('view_date_style', element('data', $view)) === 'sns' ? true : false)); ?>>SNS 스타일</option>
                            <option value="user" <?php echo set_select('view_date_style', 'user', (element('view_date_style', element('data', $view)) === 'user' ? true : false)); ?>>사용자정의</option>
                        </select>
                        <span id="view_date_style_manual_wrapper" style="display:<?php echo (element('view_date_style', element('data', $view)) === 'user') ? 'inline' : 'none'; ?>">
                        <?php echo date("<input type="text" class="form-control" name="view_date_style_manual" value="<?php echo set_value('view_date_style_manual', element('view_date_style_manual', element('data', $view))); ?>" />", $posttime); ?>

                            <input type="checkbox" name="grp[view_date_style]" id="grp_view_date_style" value="1" /> 그룹적용

                            <input type="checkbox" name="all[view_date_style]" id="all_view_date_style" value="1" /> 전체적용

                    댓글 날짜 표시 방법 (PC)

                        <select name="comment_date_style" class="form-control select-date-style" data-display-target="comment_date_style_manual_wrapper" >
                            <option value="" <?php echo set_select('comment_date_style', '', (element('comment_date_style', element('data', $view)) === '' ? true : false)); ?>>기본</option>
                            <option value="sns" <?php echo set_select('comment_date_style', 'sns', (element('comment_date_style', element('data', $view)) === 'sns' ? true : false)); ?>>SNS 스타일</option>
                            <option value="user" <?php echo set_select('comment_date_style', 'user', (element('comment_date_style', element('data', $view)) === 'user' ? true : false)); ?>>사용자정의</option>
                        </select>
                        <span id="comment_date_style_manual_wrapper" style="display:<?php echo (element('comment_date_style', element('data', $view)) === 'user') ? 'inline' : 'none'; ?>">
                        <?php echo date("<input type="text" class="form-control" name="comment_date_style_manual" value="<?php echo set_value('comment_date_style_manual', element('comment_date_style_manual', element('data', $view))); ?>" />", $posttime); ?>

                            <input type="checkbox" name="grp[comment_date_style]" id="grp_comment_date_style" value="1" /> 그룹적용

                            <input type="checkbox" name="all[comment_date_style]" id="all_comment_date_style" value="1" /> 전체적용

                    목록 날짜 표시 방법 (모바일)

                        <select name="mobile_list_date_style" class="form-control select-date-style" data-display-target="mobile_list_date_style_manual_wrapper">
                            <option value="" <?php echo set_select('mobile_list_date_style', '', (element('mobile_list_date_style', element('data', $view)) === '' ? true : false)); ?>>기본</option>
                            <option value="sns" <?php echo set_select('mobile_list_date_style', 'sns', (element('mobile_list_date_style', element('data', $view)) === 'sns' ? true : false)); ?>>SNS 스타일</option>
                            <option value="user" <?php echo set_select('mobile_list_date_style', 'user', (element('mobile_list_date_style', element('data', $view)) === 'user' ? true : false)); ?>>사용자정의</option>
                        </select>
                        <span id="mobile_list_date_style_manual_wrapper" style="display:<?php echo (element('mobile_list_date_style', element('data', $view)) === 'user') ? 'inline' : 'none'; ?>">
                        <?php echo date("<input type="text" class="form-control" name="mobile_list_date_style_manual" value="<?php echo set_value('mobile_list_date_style_manual', element('mobile_list_date_style_manual', element('data', $view))); ?>" />", $posttime); ?>

                            <input type="checkbox" name="grp[mobile_list_date_style]" id="grp_mobile_list_date_style" value="1" /> 그룹적용

                            <input type="checkbox" name="all[mobile_list_date_style]" id="all_mobile_list_date_style" value="1" /> 전체적용

                    본문 날짜 표시 방법 (모바일)

                        <select name="mobile_view_date_style" class="form-control select-date-style" data-display-target="mobile_view_date_style_manual_wrapper">
                            <option value="" <?php echo set_select('mobile_view_date_style', '', (element('mobile_view_date_style', element('data', $view)) === '' ? true : false)); ?>>기본</option>
                            <option value="sns" <?php echo set_select('mobile_view_date_style', 'sns', (element('mobile_view_date_style', element('data', $view)) === 'sns' ? true : false)); ?>>SNS 스타일</option>
                            <option value="user" <?php echo set_select('mobile_view_date_style', 'user', (element('mobile_view_date_style', element('data', $view)) === 'user' ? true : false)); ?>>사용자정의</option>
                        </select>
                        <span id="mobile_view_date_style_manual_wrapper" style="display:<?php echo (element('mobile_view_date_style', element('data', $view)) === 'user') ? 'inline' : 'none'; ?>">
                        <?php echo date("<input type="text" class="form-control" name="mobile_view_date_style_manual" value="<?php echo set_value('mobile_view_date_style_manual', element('mobile_view_date_style_manual', element('data', $view))); ?>" />", $posttime); ?>

                            <input type="checkbox" name="grp[mobile_view_date_style]" id="grp_mobile_view_date_style" value="1" /> 그룹적용

                            <input type="checkbox" name="all[mobile_view_date_style]" id="all_mobile_view_date_style" value="1" /> 전체적용

                    댓글 날짜 표시 방법 (모바일)

                        <select name="mobile_comment_date_style" class="form-control select-date-style" data-display-target="mobile_comment_date_style_manual_wrapper" >
                            <option value="" <?php echo set_select('mobile_comment_date_style', '', (element('mobile_comment_date_style', element('data', $view)) === '' ? true : false)); ?>>기본</option>
                            <option value="sns" <?php echo set_select('mobile_comment_date_style', 'sns', (element('mobile_comment_date_style', element('data', $view)) === 'sns' ? true : false)); ?>>SNS 스타일</option>
                            <option value="user" <?php echo set_select('mobile_comment_date_style', 'user', (element('mobile_comment_date_style', element('data', $view)) === 'user' ? true : false)); ?>>사용자정의</option>
                        </select>
                        <span id="mobile_comment_date_style_manual_wrapper" style="display:<?php echo (element('mobile_comment_date_style', element('data', $view)) === 'user') ? 'inline' : 'none'; ?>">
                        <?php echo date("<input type="text" class="form-control" name="mobile_comment_date_style_manual" value="<?php echo set_value('mobile_comment_date_style_manual', element('mobile_comment_date_style_manual', element('data', $view))); ?>" />", $posttime); ?>

                            <input type="checkbox" name="grp[mobile_comment_date_style]" id="grp_mobile_comment_date_style" value="1" /> 그룹적용

                            <input type="checkbox" name="all[mobile_comment_date_style]" id="all_mobile_comment_date_style" value="1" /> 전체적용

                    <a href="<?php echo admin_url($this->pagedir); ?>" class="btn btn-default btn-sm">목록으로
                    <button type="submit" class="btn btn-success btn-sm">저장하기</button>

        <?php echo form_close(); ?>


text:
module DataMapper
  module Constraints
    module PostgresAdapter
      module SQL
        include DataMapper::Constraints::DataObjectsAdapter::SQL

        private

        def constraint_exists?(storage_name, constraint_name)
          statement = <<-EOS.compress_lines
            SELECT COUNT(*)
            FROM "information_schema"."table_constraints"
            WHERE "table_schema" = current_schema()
            AND "table_name" = ?
            AND "constraint_name" = ?
          EOS
          query(statement, storage_name, constraint_name).first > 0
        end
      end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
//Write a program to check if in a given expression the brackets are put correctly.
//Example of correct expression: ((a+b)/5-d).
//Example of incorrect expression: )(a+b)).

using System;
using System.Collections.Generic;

class Brackets
{
    static void Main()
    {
        string expression1 = "((a+b)/5-d)";
        string expression2 = ")(a+b))";
        if (CorrectBrackets(expression1)) Console.WriteLine("The expression {0} is correct!", expression1); else Console.WriteLine("The expression {0} is incorrect!", expression1);
        if (CorrectBrackets(expression2)) Console.WriteLine("The expression {0} is correct!", expression2); else Console.WriteLine("The expression {0} is incorrect!", expression2);
    }

    private static bool CorrectBrackets(string expression)
    {
        Stack<char> brackets = new Stack<char>();
        bool isCorrect = true;
        for (int i = 0; i < expression.Length; i++)
        {
            char ch = expression[i];
            if (ch == '(') brackets.Push(ch);
            else if (ch == ')' && brackets.Count > 0) brackets.Pop();
            else if (brackets.Count == 0) isCorrect = false;
        }

        if (brackets.Count > 0) isCorrect = false;

        return isCorrect;

    }

}


text:
// ------------------------------------------------------------------------------
//  Copyright (c) 2015 Microsoft Corporation
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
// ------------------------------------------------------------------------------

namespace Microsoft.OneDrive.Sdk
{
    using System;
    using Microsoft.IdentityModel.Clients.ActiveDirectory;

    public interface IAuthenticationResult
    {
        /// <summary>
        /// Gets the access token.
        /// </summary>
        string AccessToken { get; }

        /// <summary>
        /// Gets the type of the access token.
        /// </summary>
        string AccessTokenType { get; }

        /// <summary>
        /// Gets the point in time in which the access token expires.
        /// This value is calculated based on current UTC time.
        /// </summary>
        DateTimeOffset ExpiresOn { get; }

        /// <summary>
        /// Gets the ID token.
        /// </summary>
        string IdToken { get; }

        /// <summary>
        /// Gets a value indicating whether or not the refresh token can be used for requesting
        /// access tokens for other resources.
        /// </summary>
        bool IsMultipleResourceRefreshToken { get; }

        /// <summary>
        /// Gets the refresh token for the current access token.
        /// </summary>
        string RefreshToken { get; }

        /// <summary>
        /// Gets an identifier for the tenant from which the access token was acquired.
        /// </summary>
        string TenantId { get; }

        /// <summary>
        /// Gets user information, such as user ID.
        /// </summary>
        UserInfo UserInfo { get; }

#if WINRT
        /// <summary>
        /// Gets the error code if authentication failed.
        /// </summary>
        string Error { get; }

        /// <summary>
        /// Gets the error description if authentication failed.
        /// </summary>
        string ErrorDescription { get; }

        /// <summary>
        /// Gets the <see cref="AuthenticationStatus"/> of authentication.
        /// </summary>
        AuthenticationStatus Status { get; }

        /// <summary>
        /// Gets the authentication status code.
        /// </summary>
        int StatusCode { get; set; }
#endif
    }
}


text:
package com.zuolg.zsite.gen.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.zuolg.commons.annotation.AComment;

/** 分类表。标签、专题、类别等都属于taxonomy。 */
@Entity
@Table(name = "z_taxonomy")
@AComment(comment="分类表。标签、专题、类别等都属于taxonomy。")
public class BaseTaxonomy implements Serializable {

	private static final long serialVersionUID = 1L;

	/** 主键ID */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="id", length=20)
	@AComment(comment="主键ID")
	private Integer id;

	/** 标题 */
	@Column(name="title", length=512)
	@AComment(comment="标题")
	private String title;

	/** 内容描述 */
	@Column(name="text", length=65535)
	@AComment(comment="内容描述")
	private String text;

	/** slug */
	@Column(name="slug", length=128)
	@AComment(comment="slug")
	private String slug;

	/** 类型 */
	@Column(name="type", length=32)
	@AComment(comment="类型")
	private String type;

	/** 图标 */
	@Column(name="icon", length=128)
	@AComment(comment="图标")
	private String icon;

	/** 对于的内容模型 */
	@Column(name="content_module", length=32)
	@AComment(comment="对于的内容模型")
	private String contentModule;

	/** 该分类的内容数量 */
	@Column(name="content_count", length=11)
	@AComment(comment="该分类的内容数量")
	private Integer contentCount;

	/** 排序编码 */
	@Column(name="order_number", length=11)
	@AComment(comment="排序编码")
	private Integer orderNumber;

	/** 父级分类的ID */
	@Column(name="parent_id", length=20)
	@AComment(comment="父级分类的ID")
	private Integer parentId;

	/** 关联的对象ID */
	@Column(name="object_id", length=20)
	@AComment(comment="关联的对象ID")
	private Integer objectId;

	/** 标识 */
	@Column(name="flag", length=256)
	@AComment(comment="标识")
	private String flag;

	/** 经度 */
	@Column(name="lat", length=20)
	@AComment(comment="经度")
	private Double lat;

	/** 纬度 */
	@Column(name="lng", length=20)
	@AComment(comment="纬度")
	private Double lng;

	/** SEO关键字 */
	@Column(name="meta_keywords", length=256)
	@AComment(comment="SEO关键字")
	private String metaKeywords;

	/** SEO描述内容 */
	@Column(name="meta_description", length=256)
	@AComment(comment="SEO描述内容")
	private String metaDescription;

	/** 创建日期 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@Column(name="created")
	@AComment(comment="创建日期")
	private Date created;

	public Integer getId() {
		return this.id;
	}

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

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getSlug() {
		return this.slug;
	}

	public void setSlug(String slug) {
		this.slug = slug;
	}

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

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

	public String getIcon() {
		return this.icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getContentModule() {
		return this.contentModule;
	}

	public void setContentModule(String contentModule) {
		this.contentModule = contentModule;
	}

	public Integer getContentCount() {
		return this.contentCount;
	}

	public void setContentCount(Integer contentCount) {
		this.contentCount = contentCount;
	}

	public Integer getOrderNumber() {
		return this.orderNumber;
	}

	public void setOrderNumber(Integer orderNumber) {
		this.orderNumber = orderNumber;
	}

	public Integer getParentId() {
		return this.parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public Integer getObjectId() {
		return this.objectId;
	}

	public void setObjectId(Integer objectId) {
		this.objectId = objectId;
	}

	public String getFlag() {
		return this.flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public Double getLat() {
		return this.lat;
	}

	public void setLat(Double lat) {
		this.lat = lat;
	}

	public Double getLng() {
		return this.lng;
	}

	public void setLng(Double lng) {
		this.lng = lng;
	}

	public String getMetaKeywords() {
		return this.metaKeywords;
	}

	public void setMetaKeywords(String metaKeywords) {
		this.metaKeywords = metaKeywords;
	}

	public String getMetaDescription() {
		return this.metaDescription;
	}

	public void setMetaDescription(String metaDescription) {
		this.metaDescription = metaDescription;
	}

	public Date getCreated() {
		return this.created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

}


text:
module Importers
  # Imports data from an array of hashes (key value pairs) into the database.
  # Provides both creation of new records and updating of existing records.
  class Importer
    DO_NOT_IMPORT = "DO-NOT-IMPORT"

    attr_reader :current_row

    def initialize(class_name)
      @klass = Kernel.const_get(class_name)
      reset
    end

    def import(rows)
      reset
      rows.each { |row| import_row(row) }
    end

    def error_text
      @errors.join("\n").truncate(64_000)
    end

    def import_row(row)
      @current_row += 1

      if (object = find_object(row))
        update_object(object, row)
      else
        create_object(row)
      end
    end

    def importable_attributes
      @attrs ||= @klass.respond_to?(:importable_attributes) ? @klass.importable_attributes : @klass.attribute_names
    end

    def find_object(row)
      @klass.find_by(import_id => row[import_id])
    end

    def import_id
      @import_id ||= @klass.respond_to?(:import_id) ? @klass.import_id : "id"
    end

    private

    def reset
      @current_row = 1
      @errors = []
    end

    def update_object(object, row)
      update_fail(row) unless object.update(attributes(row))
    end

    def create_object(row)
      object = @klass.new(attributes(row))
      begin
        create_fail(row) unless object.save
      rescue => e
        @errors <<
          "[#{@current_row}] Failed to create: #{row} - #{e.class}: #{e}"
      end
    end

    def attributes(row)
      row
        .to_hash
        .slice(*importable_attributes)
        .delete_if { |_, v| v == DO_NOT_IMPORT }
    end

    def update_fail(row)
      @errors << "[#{@current_row}] Failed to update: #{row}"
    end

    def create_fail(row)
      @errors << "[#{@current_row}] Failed to create: #{row}"
    end
  end
end


text:
using System;
using System.Globalization;

namespace _11.RandomNumbersInGivenRange
{
    class RandomNumbersInGivenRange
    {
        static void Main()
        {
            // 11.Write a program that enters 3 integers n, min and max (min != max) and prints n random numbers in the range [min...max].

            Random rand = new Random();

            Console.Write("Enter an integer number N: ");
            int N = int.Parse(Console.ReadLine(), CultureInfo.InvariantCulture);
            Console.Write("Enter an integer number Min: ");
            int min = int.Parse(Console.ReadLine(), CultureInfo.InvariantCulture);
            Console.Write("Enter an integer number Max: ");
            int max = int.Parse(Console.ReadLine(), CultureInfo.InvariantCulture);

            if (min != max)
            {
                for (int count = 0; count < N; count++)
                {
                    Console.WriteLine(rand.Next(min, max));
                }
            }
            else
            {
                Console.WriteLine("Invalid input numbers. You should have enter (min != max)");
                return;
            }
        }
    }
}


text:
@echo off

IF NOT DEFINED MSBUILD CALL findMsBuild.cmd

SET ToolsVersion=15.0
SET ProjectName=Msbuild.All
SET Configuration=Debug
SET Platform="Any CPU"

"%MSBUILD%" dirs.proj /nologo /m:1  /fl /toolsversion:%ToolsVersion% /flp:logfile=%ProjectName%.%Platform%.log;v=d /flp1:logfile=%ProjectName%.%Platform%.wrn;warningsonly /flp2:logfile=%ProjectName%.%Platform%.err;errorsonly /p:Configuration=%Configuration% /p:Platform=%Platform% /p:RunCodeAnalysis="False" /flp3:logfile=%ProjectName%.%Platform%.prf;performancesummary /flp4:logfile=%ProjectName%.%Platform%.exec.log;showcommandline /p:BuildSingleFilePackage=true /p:IsOfficialBuild=%IsOfficialBuild% /p:RunTests=True

pause


text:
<!DOCTYPE html>

    <title>PostGIS Country Boundaries</title>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">


text:
<?php

namespace VinaiKopp\PostCodeFilter\Rule;

use VinaiKopp\PostCodeFilter\Rule\Components\Country;
use VinaiKopp\PostCodeFilter\Rule\Components\CustomerGroupId;
use VinaiKopp\PostCodeFilter\Rule\Components\CustomerGroupIdList;
use VinaiKopp\PostCodeFilter\Rule\Components\PostCode;
use VinaiKopp\PostCodeFilter\Rule\Components\PostCodeList;

class ExistingRule implements Rule
{
    /**
     * @var string[]
     */
    private $allowedPostCodes;

    /**
     * @var CustomerGroupId
     */
    private $customerGroupIds;

    /**
     * @var Country
     */
    private $country;

    public function __construct(
        CustomerGroupIdList $customerGroupIds,
        Country $country,
        PostCodeList $allowedPostCodes
    ) {
        $this->customerGroupIds = $customerGroupIds;
        $this->country = $country;
        $this->allowedPostCodes = $allowedPostCodes;
    }

    /**
     * @param string|int|PostCode $input
     * @return bool
     */
    public function isPostCodeAllowed($input)
    {
        $postCode = $this->convertToPostCodeType($input);
        return $this->allowedPostCodes->contains($postCode);
    }

    /**
     * @return CustomerGroupIdList
     */
    public function getCustomerGroupIds()
    {
        return $this->customerGroupIds;
    }

    /**
     * @return int[]
     */
    public function getCustomerGroupIdValues()
    {
        return $this->customerGroupIds->getValues();
    }

    /**
     * @return Country
     */
    public function getCountry()
    {
        return $this->country;
    }

    /**
     * @return string
     */
    public function getCountryValue()
    {
        return $this->country->getValue();
    }

    /**
     * @return PostCodeList
     */
    public function getPostCodes()
    {
        return $this->allowedPostCodes;
    }

    /**
     * @return int[]|string[]
     */
    public function getPostCodeValues()
    {
        return $this->allowedPostCodes->getValues();
    }

    /**
     * @param int|string|PostCode $input
     * @return PostCode
     */
    private function convertToPostCodeType($input)
    {
        if ($input instanceof PostCode) {
            return $input;
        } else {
            return PostCode::fromIntOrString($input);
        }
    }
}


text:
import React from 'react';

import Immutable from 'immutable';
import styled from 'styled-components';

import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';

import {
  Models,
  Types
} from 'lattice';

import LoadingSpinner from '../../../components/asynccontent/LoadingSpinner';
import StyledFlexContainerStacked from '../../../components/flex/StyledFlexContainerStacked';

import * as OrgsUtils from '../utils/OrgsUtils';

import {
  AddButton,
  SearchIcon,
  StyledElement,
  StyledInput,
  StyledListItem
} from './StyledListGroupComponents';

import StyledSectionHeading from './StyledSectionHeading';

import {
  addMemberToOrganizationRequest,
  clearUserSearchResults,
  removeMemberFromOrganizationRequest
} from '../actions/OrganizationActionFactory';

import {
  updateAclRequest
} from '../../permissions/PermissionsActionFactory';

import {
  searchAllUsersRequest
} from '../../principals/PrincipalsActionFactory';

const {
  AclBuilder,
  AclDataBuilder,
  AceBuilder,
  PrincipalBuilder
} = Models;

const {
  ActionTypes,
  PermissionTypes,
  PrincipalTypes
} = Types;

const SearchContainer = styled.div`
  min-height: 150px;
  padding-bottom: 50px;
  width: 400px;
`;

const SearchSpinner = styled(StyledElement)`
  padding: 0;
  flex: 0;
`;

function mapStateToProps(state) {

  const isSearchingUsers = state.getIn(['organizations', 'isSearchingUsers']);
  const usersSearchResults = state.getIn(['organizations', 'usersSearchResults'], Immutable.Map());

  return {
    isSearchingUsers,
    usersSearchResults
  };
}

function mapDispatchToProps(dispatch) {

  const actions = {
    addMemberToOrganizationRequest,
    clearUserSearchResults,
    removeMemberFromOrganizationRequest,
    searchAllUsersRequest,
    updateAclRequest
  };

  return {
    actions: bindActionCreators(actions, dispatch)
  };
}

class OrganizationAddMembersSectionComponent extends React.Component {

  static propTypes = {
    actions: React.PropTypes.shape({
      addMemberToOrganizationRequest: React.PropTypes.func.isRequired,
      clearUserSearchResults: React.PropTypes.func.isRequired,
      removeMemberFromOrganizationRequest: React.PropTypes.func.isRequired,
      searchAllUsersRequest: React.PropTypes.func.isRequired,
      updateAclRequest: React.PropTypes.func.isRequired
    }).isRequired,
    isSearchingUsers: React.PropTypes.bool.isRequired,
    organization: React.PropTypes.instanceOf(Immutable.Map).isRequired,
    usersSearchResults: React.PropTypes.instanceOf(Immutable.Map).isRequired
  }

  constructor(props) {

    super(props);

    this.state = {
      searchInputValue: ''
    };
  }

  componentWillUnmount() {
    const { actions } = this.props;
    actions.clearUserSearchResults();
  }

  search = (searchQuery) => {

    if (!searchQuery) {
      return;
    }

    this.props.actions.searchAllUsersRequest(searchQuery);
  }

  handleOnChangeSearchInput = (event) => {

    this.setState({
      searchInputValue: event.target.value
    });
  }

  handleOnKeyDownSearchInput = (event) => {

    switch (event.keyCode) {
      case 8: { // 'Backspace' key code
        this.props.actions.clearUserSearchResults();
        break;
      }
      case 13: // 'Enter' key code
        if (event.target.value.length === 0) {
          this.props.actions.clearUserSearchResults();
        }
        else {
          this.search(event.target.value);
        }
        break;
      default:
        break;
    }
  }

  renderSearchBox = () => {

    // TODO: think about refactoring into a shared styled compontent
    return (

    );
  }

  handleOnClickAddMember = (userId) => {

    if (!userId) {
      // TODO: this shouldn't happen, how do we handle it?
      return;
    }

    this.props.actions.addMemberToOrganizationRequest(
      this.props.organization.get('id'),
      userId
    );

    const principal = (new PrincipalBuilder())
      .setType(PrincipalTypes.USER)
      .setId(userId)
      .build();

    const ace = (new AceBuilder())
      .setPermissions([PermissionTypes.READ])
      .setPrincipal(principal)
      .build();

    const acl = (new AclBuilder())
      .setAclKey([this.props.organization.get('id')])
      .setAces([ace])
      .build();

    const aclData = (new AclDataBuilder())
      .setAction(ActionTypes.ADD)
      .setAcl(acl)
      .build();

    this.props.actions.updateAclRequest(aclData);
  }

  renderSearchResults = () => {

    if (this.props.isSearchingUsers) {
      return null;
    }

    // // TODO: only show this when a search was performed and the results are empty
    if (this.props.usersSearchResults.isEmpty()) {
      return No users found.;
    }

    const users = [];

    this.props.usersSearchResults.forEach((user) => {

      const userId :string = user.get('user_id');
      const label = OrgsUtils.getUserNameLabelValue(user);

      const userListItem = (

          <AddButton
              onClick={() => {
                this.handleOnClickAddMember(userId);
              }} />
        </StyledListItem>
      );

      users.push(userListItem);
    });

    return users;
  }

  render() {

    const isOwner = this.props.organization.get('isOwner', false);

    if (!isOwner) {
      return null;
    }

    return (

        <SearchContainer>
          { this.renderSearchBox() }
          { this.renderSearchResults() }
        </SearchContainer>
      </StyledFlexContainerStacked>
    );
  }
}

export default connect(mapStateToProps, mapDispatchToProps)(OrganizationAddMembersSectionComponent);