text:
0.5.0 / 2015-10-13
------------------
- Prevent `pandoc` from throwing an error if `embode_code` is `false`. See: https://github.com/skywrite/sky-tumblr-export/pull/10

0.4.0 / 2015-05-04
------------------
- added photos, quote, and other blog generator support https://github.com/skywrite/sky-tumblr-export/pull/9

0.3.0 / 2014-04-28
------------------
* added raw post in metadata #6

0.2.0 / 2013-08-21
------------------
* added support for `links`, `photos`, and `videos`.

0.1.0 / 2013-05-24
------------------
* bug fix: fixed script name after npm install. see #4
* bug fix: include `utils` package, see #4
* update docs on `pandoc` requirement
* force `pandoc` check on startup.
* upgrade `markdown-page` dep

0.0.1 / 2013-02-23
------------------
* Initial release.

redpajama_set_name: RedPajamaGithub


text:
layout: default
title: RHVoice
---
# RHVoice

![AwesomeTTS note editor dialog with the RHVoice service activated](/assets/images/services.rhvoice.png)
<!-- “Add TTS Audio to Note” dialog with the RHVoice      service activated -->

> 激活状态下的RHVoice配置窗口

<!-- [RHVoice](//github.com/Olga-Yakovleva/RHVoice.html) is  a free and open source speech synthesizer for Russian, Georgian, English,  and Esperanto. -->

[RHVoice](//github.com/Olga-Yakovleva/RHVoice.html)是一个免费开源的语音合成软件。它支持俄语、格鲁吉亚语还有世界语。

<!-- ## Windows Users -->

## Windows用户

<!-- If using the installer package, most Windows users will actually use the  RHVoice service via the [Microsoft Speech API](/services/sapi5.html)  rather than direct access. -->

如果你安装了RHVoice服务,Windows用户会通过微软语音接口来调用。

<!-- ## Linux Users -->

## Linux用户

<!-- On Linux, AwesomeTTS must be able to find the `RHVoice-client`  binary in your system `$PATH` _and_ be able to discover  the list of installed voices. To find the voices, AwesomeTTS will search  `~/share/RHVoice/voices`, `~/usr/share/RHVoice/voices`,  `/usr/local/share/RHVoice/voices`, then finally  `/usr/share/RHVoice/voices`. -->

Linux平台必须确保`RHVoice-client`在你的环境变量中。而且AwesomeTTS会按照`~/share/RHVoice/voices`、`~/usr/share/RHVoice/voices`、`/usr/local/share/RHVoice/voices`、`/usr/share/RHVoice/voices`的顺序来查找你安装的语言包。

<!-- Additionally, if the RHVoice service is not already running, AwesomeTTS  will try to start it directly by calling `RHVoice-service`. -->

另外,如果找不到RHVoice service,AwesomeTTS会尝试直接调用`RHVoice-service`。

<!-- ## Options -->

## 选项

<!-- When using RHVoice directly, **speed**,  **pitch**, and **volume** can be adjusted. -->

当使用RHVoice的时候可以调节**速度**、**音高**、**音量**选项。

<!-- If you are accessing RHVoice via the Microsoft Speech API on Windows, then  **pitch** will not be available. -->

如果你通过微软语音接口调用服务的话,**音高**选项不可用。


text:
<?php
// *** Tangra (Application Framework and Tools for PHP)
// $Id$
//

require_once(DIR_INC.'modules/web_site_vanilla/vanilla_web_page_view.class.php');

class Strawberry_Web_Page_View extends Vanilla_Web_Page_View {

}


text:
module Web.Ohloh.SizeFact (
  SizeFact(..),
  xpSizeFact
) where

import Text.XML.HXT.Arrow.Pickle

import Web.Ohloh.Common

-- | 'SizeFact' is a pre-computed collection of statistics about
--   'Web.Ohloh.Project.Project' source code.
data SizeFact = SizeFact {
  sfMonth :: String,
  sfCode :: Int,
  sfComments :: Int,
  sfBlanks :: Int,
  sfCommentRatio :: Double,
  sfCommits :: Int,
  sfManMonths :: Int
} deriving (Eq, Read, Show)

instance XmlPickler SizeFact where
  xpickle = xpSizeFact

instance ReadXmlString SizeFact
instance ShowXmlString SizeFact

xpSizeFact :: PU SizeFact
xpSizeFact =
  xpElem "size_fact" $
    xpWrap (uncurry7 SizeFact,
            \(SizeFact m  c  co  b  cr  cm  mm) ->
                      (m, c, co, b, cr, cm, mm)) $
    xp7Tuple (xpElem "month" xpText0)
             (xpElem "code" xpInt)
             (xpElem "comments" xpInt)
             (xpElem "blanks" xpInt)
             (xpElem "comment_ratio" xpPrim)
             (xpElem "commits" xpInt)
             (xpElem "man_months" xpInt)


text:
namespace {

// Strings used in alignment properties.
constexpr char kAlignmentCenter[] = "center";
constexpr char kAlignmentTop[] = "top";
constexpr char kAlignmentBottom[] = "bottom";
constexpr char kAlignmentLeft[] = "left";
constexpr char kAlignmentRight[] = "right";

// Strings used in background tiling repetition properties.
constexpr char kTilingNoRepeat[] = "no-repeat";
constexpr char kTilingRepeatX[] = "repeat-x";
constexpr char kTilingRepeatY[] = "repeat-y";
constexpr char kTilingRepeat[] = "repeat";

SkColor GetLightModeColor(int id) {
#if BUILDFLAG(IS_WIN)
  const SkColor kDefaultColorNTPBackground =
      color_utils::GetSysSkColor(COLOR_WINDOW);
  const SkColor kDefaultColorNTPText =
      color_utils::GetSysSkColor(COLOR_WINDOWTEXT);
  const SkColor kDefaultColorNTPLink =
      color_utils::GetSysSkColor(COLOR_HOTLIGHT);
#else
  // TODO(beng): source from theme provider.
  constexpr SkColor kDefaultColorNTPBackground = SK_ColorWHITE;
  constexpr SkColor kDefaultColorNTPText = SK_ColorBLACK;
  constexpr SkColor kDefaultColorNTPLink = SkColorSetRGB(0x06, 0x37, 0x74);
#endif  // BUILDFLAG(IS_WIN)

  switch (id) {
    // Properties stored in theme pack.  If you change these defaults, you must
    // increment the version number in browser_theme_pack.cc.
    case ThemeProperties::COLOR_FRAME_ACTIVE:
    case ThemeProperties::COLOR_TAB_BACKGROUND_INACTIVE_FRAME_ACTIVE:
    case ThemeProperties::COLOR_WINDOW_CONTROL_BUTTON_BACKGROUND_ACTIVE:
      return SkColorSetRGB(0xDE, 0xE1, 0xE6);
    case ThemeProperties::COLOR_FRAME_INACTIVE:
    case ThemeProperties::COLOR_TAB_BACKGROUND_INACTIVE_FRAME_INACTIVE:
    case ThemeProperties::COLOR_WINDOW_CONTROL_BUTTON_BACKGROUND_INACTIVE:
      return color_utils::HSLShift(
          GetLightModeColor(ThemeProperties::COLOR_FRAME_ACTIVE),
          ThemeProperties::GetDefaultTint(ThemeProperties::TINT_FRAME_INACTIVE,
                                          false));
    case ThemeProperties::COLOR_TOOLBAR:
    case ThemeProperties::COLOR_TAB_BACKGROUND_ACTIVE_FRAME_ACTIVE:
    case ThemeProperties::COLOR_TAB_BACKGROUND_ACTIVE_FRAME_INACTIVE:
      return SK_ColorWHITE;
    case ThemeProperties::COLOR_TAB_FOREGROUND_INACTIVE_FRAME_ACTIVE:
    case ThemeProperties::COLOR_TAB_FOREGROUND_INACTIVE_FRAME_INACTIVE:
    case ThemeProperties::COLOR_TOOLBAR_TEXT:
      return gfx::kGoogleGrey800;
    case ThemeProperties::COLOR_NTP_BACKGROUND:
      return kDefaultColorNTPBackground;
    case ThemeProperties::COLOR_NTP_TEXT:
      return kDefaultColorNTPText;
    case ThemeProperties::COLOR_NTP_LINK:
      return kDefaultColorNTPLink;
    case ThemeProperties::COLOR_NTP_HEADER:
      return SkColorSetRGB(0x96, 0x96, 0x96);
    case ThemeProperties::COLOR_CONTROL_BUTTON_BACKGROUND:
      return SK_ColorTRANSPARENT;
    case ThemeProperties::COLOR_NTP_LOGO:
      return SkColorSetRGB(0xEE, 0xEE, 0xEE);
    case ThemeProperties::COLOR_NTP_SHORTCUT:
      return gfx::kGoogleGrey100;

    // Properties not stored in theme pack.
    case ThemeProperties::COLOR_TAB_STROKE_FRAME_ACTIVE:
    case ThemeProperties::COLOR_TAB_STROKE_FRAME_INACTIVE:
    case ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR_FRAME_ACTIVE:
    case ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR_FRAME_INACTIVE:
      return SkColorSetA(SK_ColorBLACK, 0x40);
    case ThemeProperties::COLOR_FEATURE_PROMO_BUBBLE_BACKGROUND:
    case ThemeProperties::COLOR_FEATURE_PROMO_BUBBLE_DEFAULT_BUTTON_FOREGROUND:
      return gfx::kGoogleBlue700;
    case ThemeProperties::COLOR_FEATURE_PROMO_BUBBLE_BUTTON_BORDER:
      return gfx::kGoogleGrey300;
    case ThemeProperties::COLOR_FEATURE_PROMO_BUBBLE_CLOSE_BUTTON_INK_DROP:
      return gfx::kGoogleBlue300;
    case ThemeProperties::COLOR_FEATURE_PROMO_BUBBLE_FOREGROUND:
    case ThemeProperties::COLOR_FEATURE_PROMO_BUBBLE_DEFAULT_BUTTON_BACKGROUND:
      return SK_ColorWHITE;

    case ThemeProperties::COLOR_FRAME_ACTIVE_INCOGNITO:
    case ThemeProperties::COLOR_FRAME_INACTIVE_INCOGNITO:
    case ThemeProperties::COLOR_TAB_BACKGROUND_ACTIVE_FRAME_ACTIVE_INCOGNITO:
    case ThemeProperties::COLOR_TAB_BACKGROUND_ACTIVE_FRAME_INACTIVE_INCOGNITO:
    case ThemeProperties::COLOR_TAB_BACKGROUND_INACTIVE_FRAME_ACTIVE_INCOGNITO:
    case ThemeProperties::
        COLOR_TAB_BACKGROUND_INACTIVE_FRAME_INACTIVE_INCOGNITO:
    case ThemeProperties::COLOR_TAB_FOREGROUND_ACTIVE_FRAME_ACTIVE_INCOGNITO:
    case ThemeProperties::COLOR_TAB_FOREGROUND_ACTIVE_FRAME_INACTIVE_INCOGNITO:
    case ThemeProperties::COLOR_TAB_FOREGROUND_INACTIVE_FRAME_ACTIVE_INCOGNITO:
    case ThemeProperties::
        COLOR_TAB_FOREGROUND_INACTIVE_FRAME_INACTIVE_INCOGNITO:
    case ThemeProperties::
        COLOR_WINDOW_CONTROL_BUTTON_BACKGROUND_INCOGNITO_ACTIVE:
    case ThemeProperties::
        COLOR_WINDOW_CONTROL_BUTTON_BACKGROUND_INCOGNITO_INACTIVE:
      NOTREACHED() << "This color should be queried via its non-incognito "
                      "equivalent and an appropriate |incognito| value.";
      return gfx::kPlaceholderColor;
    default:
      NOTREACHED() << "This color should only be queried through ThemeService.";
      return gfx::kPlaceholderColor;
  }
}

absl::optional<SkColor> GetIncognitoColor(int id) {
  switch (id) {
    case ThemeProperties::COLOR_FRAME_ACTIVE:
    case ThemeProperties::COLOR_TAB_BACKGROUND_INACTIVE_FRAME_ACTIVE:
      return color_utils::HSLShift(
          GetLightModeColor(ThemeProperties::COLOR_FRAME_ACTIVE),
          ThemeProperties::GetDefaultTint(ThemeProperties::TINT_FRAME, true));
    case ThemeProperties::COLOR_FRAME_INACTIVE:
    case ThemeProperties::COLOR_TAB_BACKGROUND_INACTIVE_FRAME_INACTIVE:
      return color_utils::HSLShift(
          GetLightModeColor(ThemeProperties::COLOR_FRAME_ACTIVE),
          ThemeProperties::GetDefaultTint(ThemeProperties::TINT_FRAME_INACTIVE,
                                          true));
    case ThemeProperties::COLOR_TOOLBAR:
    case ThemeProperties::COLOR_NTP_BACKGROUND:
    case ThemeProperties::COLOR_TAB_BACKGROUND_ACTIVE_FRAME_ACTIVE:
    case ThemeProperties::COLOR_TAB_BACKGROUND_ACTIVE_FRAME_INACTIVE:
      return SkColorSetRGB(0x35, 0x36, 0x3A);
    case ThemeProperties::COLOR_NTP_SHORTCUT:
      return gfx::kGoogleGrey900;
    case ThemeProperties::COLOR_TOOLBAR_TEXT:
      return SK_ColorWHITE;
    case ThemeProperties::COLOR_NTP_TEXT:
      return gfx::kGoogleGrey200;
    case ThemeProperties::COLOR_TAB_FOREGROUND_INACTIVE_FRAME_ACTIVE:
    case ThemeProperties::COLOR_TAB_FOREGROUND_INACTIVE_FRAME_INACTIVE:
      return gfx::kGoogleGrey400;
    case ThemeProperties::COLOR_NTP_LINK:
      return gfx::kGoogleBlue300;
    default:
      return absl::nullopt;
  }
}

absl::optional<SkColor> GetDarkModeColor(int id) {
  // Current UX thinking is to use the same colors for dark mode and incognito,
  // but this is very subject to change. Additionally, dark mode incognito may
  // end up having a different look. For now, just call into GetIncognitoColor
  // for convenience, but maintain a separate interface.
  return GetIncognitoColor(id);
}

}  // namespace

// static
constexpr int ThemeProperties::kFrameHeightAboveTabs;

// static
int ThemeProperties::StringToAlignment(const std::string& alignment) {
  int alignment_mask = 0;
  for (const std::string& component : base::SplitString(
           alignment, base::kWhitespaceASCII,
           base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY)) {
    if (base::EqualsCaseInsensitiveASCII(component, kAlignmentTop))
      alignment_mask |= ALIGN_TOP;
    else if (base::EqualsCaseInsensitiveASCII(component, kAlignmentBottom))
      alignment_mask |= ALIGN_BOTTOM;
    else if (base::EqualsCaseInsensitiveASCII(component, kAlignmentLeft))
      alignment_mask |= ALIGN_LEFT;
    else if (base::EqualsCaseInsensitiveASCII(component, kAlignmentRight))
      alignment_mask |= ALIGN_RIGHT;
  }
  return alignment_mask;
}

// static
int ThemeProperties::StringToTiling(const std::string& tiling) {
  if (base::EqualsCaseInsensitiveASCII(tiling, kTilingRepeatX))
    return REPEAT_X;
  if (base::EqualsCaseInsensitiveASCII(tiling, kTilingRepeatY))
    return REPEAT_Y;
  if (base::EqualsCaseInsensitiveASCII(tiling, kTilingRepeat))
    return REPEAT;
  // NO_REPEAT is the default choice.
  return NO_REPEAT;
}

// static
std::string ThemeProperties::AlignmentToString(int alignment) {
  // Convert from an AlignmentProperty back into a string.
  std::string vertical_string(kAlignmentCenter);
  std::string horizontal_string(kAlignmentCenter);

  if (alignment & ALIGN_TOP)
    vertical_string = kAlignmentTop;
  else if (alignment & ALIGN_BOTTOM)
    vertical_string = kAlignmentBottom;

  if (alignment & ALIGN_LEFT)
    horizontal_string = kAlignmentLeft;
  else if (alignment & ALIGN_RIGHT)
    horizontal_string = kAlignmentRight;

  return horizontal_string + " " + vertical_string;
}

// static
std::string ThemeProperties::TilingToString(int tiling) {
  // Convert from a TilingProperty back into a string.
  if (tiling == REPEAT_X)
    return kTilingRepeatX;
  if (tiling == REPEAT_Y)
    return kTilingRepeatY;
  if (tiling == REPEAT)
    return kTilingRepeat;
  return kTilingNoRepeat;
}

// static
color_utils::HSL ThemeProperties::GetDefaultTint(int id,
                                                 bool incognito,
                                                 bool dark_mode) {
  DCHECK(id != TINT_FRAME_INCOGNITO && id != TINT_FRAME_INCOGNITO_INACTIVE)
      << "These values should be queried via their respective non-incognito "
         "equivalents and an appropriate |incognito| value.";

  // If you change these defaults, you must increment the version number in
  // browser_theme_pack.cc.

  // TINT_BUTTONS is used by ThemeService::GetDefaultColor() for both incognito
  // and dark mode, and so must be applied to both.
  if ((id == TINT_BUTTONS) && (incognito || dark_mode))
    return {-1, 0.57, 0.9605};  // kGoogleGrey700 -> kGoogleGrey100

  if ((id == TINT_FRAME) && incognito)
    return {-1, 0.7, 0.075};  // #DEE1E6 -> kGoogleGrey900
  if (id == TINT_FRAME_INACTIVE) {
    // |dark_mode| is only true here when attempting to tint the Windows native
    // frame color while in dark mode when using OS accent titlebar colors.
    // The goal in this case is to match the difference between Chrome default
    // dark mode active and inactive frames as closely as possible without
    // a hue change.
    if (dark_mode)
      return {-1, 0.54, 0.567};  // Roughly kGoogleGrey900 -> kGoogleGrey800

    if (incognito)
      return {0.57, 0.65, 0.1405};  // #DEE1E6 -> kGoogleGrey800
    return {-1, -1, 0.642};         // #DEE1E6 -> #E7EAED
  }

  return {-1, -1, -1};
}

// static
SkColor ThemeProperties::GetDefaultColor(int id,
                                         bool incognito,
                                         bool dark_mode) {
  if (incognito) {
    absl::optional<SkColor> incognito_color = GetIncognitoColor(id);
    if (incognito_color.has_value())
      return incognito_color.value();
  }
  if (dark_mode) {
    absl::optional<SkColor> dark_mode_color = GetDarkModeColor(id);
    if (dark_mode_color.has_value())
      return dark_mode_color.value();
  }
  return GetLightModeColor(id);
}


text:
#if UNITY_EDITOR
using System.Reflection;
using System.Text;

namespace QFramework
{
    public class PropertyAPIRenderInfo
    {
        private readonly PropertyInfo mPropertyInfo;

        public PropertyAPIRenderInfo(PropertyInfo propertyInfo)
        {
            mPropertyInfo = propertyInfo;
        }

        public void BuildString(StringBuilder builder)
        {
            var exampleCodeAttribute = mPropertyInfo.GetCustomAttribute<APIExampleCodeAttribute>();

            var description = string.Empty;

            if (LocaleKitEditor.IsCN.Value)
            {
                description = mPropertyInfo.GetAttribute<APIDescriptionCNAttribute>().Description;
            }
            else
            {
                description = mPropertyInfo.GetAttribute<APIDescriptionENAttribute>(false).Description;
            }

            builder
                .Append("|").Append(mPropertyInfo.PropertyType.Name + " " + mPropertyInfo.Name).Append("|")
                .Append(description).AppendLine("|")
                .AppendLine("|-|-|")
                .Append("|").Append(APIDocLocale.ExampleCode).Append("|").AppendLine(" |")
                .AppendLine("```")
                .AppendLine(exampleCodeAttribute.Code)
                .AppendLine("```")
                .AppendLine("--------");
        }
    }
}
#endif


text:
$(document).ready(function() {
	var visitortimezone = (-new Date().getTimezoneOffset()/60);
	$.ajax({
		type: "GET",
		url: "ajax/timezone.php",
		data: 'time='+ visitortimezone,
		success: function(){
			location.reload();
		}
	});
});


text:
//
//  OWNotice.h
//  SmartPartyBuilding
//
//  Created by 王卫华 on 2017/7/2.
//  Copyright © 2017年 王卫华. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface OWNotice : NSObject

/** id */
@property (nonatomic, assign) int id;
/** 是否已读 */
@property (nonatomic, assign) int isRead;
/** 通知id */
@property (nonatomic, assign) int messageId;
/** 读取时间 */
@property (nonatomic, copy) NSString *readTime;
/** 标题 */
@property (nonatomic, copy) NSString *title;
/** 通知类型 */
@property (nonatomic, assign) int type;
/** 创建时间 */
@property (nonatomic, copy) NSString *createTime;
/** 用户id */
@property (nonatomic, assign) int userId;
/** 消息内容 */
@property (nonatomic, copy) NSString *newsContent;

@end


text:
namespace clang {

/// The basic abstraction for the target Objective-C runtime.
class ObjCRuntime {
public:
  /// The basic Objective-C runtimes that we know about.
  enum Kind {
    /// 'macosx' is the Apple-provided NeXT-derived runtime on Mac OS
    /// X platforms that use the non-fragile ABI; the version is a
    /// release of that OS.
    MacOSX,

    /// 'macosx-fragile' is the Apple-provided NeXT-derived runtime on
    /// Mac OS X platforms that use the fragile ABI; the version is a
    /// release of that OS.
    FragileMacOSX,

    /// 'ios' is the Apple-provided NeXT-derived runtime on iOS or the iOS
    /// simulator;  it is always non-fragile.  The version is a release
    /// version of iOS.
    iOS,

    /// 'watchos' is a variant of iOS for Apple's watchOS. The version
    /// is a release version of watchOS.
    WatchOS,

    /// 'gcc' is the Objective-C runtime shipped with GCC, implementing a
    /// fragile Objective-C ABI
    GCC,

    /// 'gnustep' is the modern non-fragile GNUstep runtime.
    GNUstep,

    /// 'objfw' is the Objective-C runtime included in ObjFW
    ObjFW
  };

private:
  Kind TheKind = MacOSX;
  VersionTuple Version;

public:
  /// A bogus initialization of the runtime.
  ObjCRuntime() = default;
  ObjCRuntime(Kind kind, const VersionTuple &version)
      : TheKind(kind), Version(version) {}

  void set(Kind kind, VersionTuple version) {
    TheKind = kind;
    Version = version;
  }

  Kind getKind() const { return TheKind; }
  const VersionTuple &getVersion() const { return Version; }

  /// Does this runtime follow the set of implied behaviors for a
  /// "non-fragile" ABI?
  bool isNonFragile() const {
    switch (getKind()) {
    case FragileMacOSX: return false;
    case GCC: return false;
    case MacOSX: return true;
    case GNUstep: return true;
    case ObjFW: return true;
    case iOS: return true;
    case WatchOS: return true;
    }
    llvm_unreachable("bad kind");
  }

  /// The inverse of isNonFragile():  does this runtime follow the set of
  /// implied behaviors for a "fragile" ABI?
  bool isFragile() const { return !isNonFragile(); }

  /// The default dispatch mechanism to use for the specified architecture
  bool isLegacyDispatchDefaultForArch(llvm::Triple::ArchType Arch) {
    // The GNUstep runtime uses a newer dispatch method by default from
    // version 1.6 onwards
    if (getKind() == GNUstep && getVersion() >= VersionTuple(1, 6)) {
      if (Arch == llvm::Triple::arm ||
          Arch == llvm::Triple::x86 ||
          Arch == llvm::Triple::x86_64)
        return false;
    }
    else if ((getKind() ==  MacOSX) && isNonFragile() &&
             (getVersion() >= VersionTuple(10, 0)) &&
             (getVersion() < VersionTuple(10, 6)))
        return Arch != llvm::Triple::x86_64;
    // Except for deployment target of 10.5 or less,
    // Mac runtimes use legacy dispatch everywhere now.
    return true;
  }

  /// Is this runtime basically of the GNU family of runtimes?
  bool isGNUFamily() const {
    switch (getKind()) {
    case FragileMacOSX:
    case MacOSX:
    case iOS:
    case WatchOS:
      return false;
    case GCC:
    case GNUstep:
    case ObjFW:
      return true;
    }
    llvm_unreachable("bad kind");
  }

  /// Is this runtime basically of the NeXT family of runtimes?
  bool isNeXTFamily() const {
    // For now, this is just the inverse of isGNUFamily(), but that's
    // not inherently true.
    return !isGNUFamily();
  }

  /// Does this runtime allow ARC at all?
  bool allowsARC() const {
    switch (getKind()) {
    case FragileMacOSX:
      // No stub library for the fragile runtime.
      return getVersion() >= VersionTuple(10, 7);
    case MacOSX: return true;
    case iOS: return true;
    case WatchOS: return true;
    case GCC: return false;
    case GNUstep: return true;
    case ObjFW: return true;
    }
    llvm_unreachable("bad kind");
  }

  /// Does this runtime natively provide the ARC entrypoints?
  ///
  /// ARC cannot be directly supported on a platform that does not provide
  /// these entrypoints, although it may be supportable via a stub
  /// library.
  bool hasNativeARC() const {
    switch (getKind()) {
    case FragileMacOSX: return getVersion() >= VersionTuple(10, 7);
    case MacOSX: return getVersion() >= VersionTuple(10, 7);
    case iOS: return getVersion() >= VersionTuple(5);
    case WatchOS: return true;

    case GCC: return false;
    case GNUstep: return getVersion() >= VersionTuple(1, 6);
    case ObjFW: return true;
    }
    llvm_unreachable("bad kind");
  }

  /// Does this runtime provide ARC entrypoints that are likely to be faster
  /// than an ordinary message send of the appropriate selector?
  ///
  /// The ARC entrypoints are guaranteed to be equivalent to just sending the
  /// corresponding message.  If the entrypoint is implemented naively as just a
  /// message send, using it is a trade-off: it sacrifices a few cycles of
  /// overhead to save a small amount of code.  However, it's possible for
  /// runtimes to detect and special-case classes that use "standard"
  /// retain/release behavior; if that's dynamically a large proportion of all
  /// retained objects, using the entrypoint will also be faster than using a
  /// message send.
  ///
  /// When this method returns true, Clang will turn non-super message sends of
  /// certain selectors into calls to the correspond entrypoint:
  ///   retain => objc_retain
  ///   release => objc_release
  ///   autorelease => objc_autorelease
  bool shouldUseARCFunctionsForRetainRelease() const {
    switch (getKind()) {
    case FragileMacOSX:
      return false;
    case MacOSX:
      return getVersion() >= VersionTuple(10, 10);
    case iOS:
      return getVersion() >= VersionTuple(8);
    case WatchOS:
      return true;
    case GCC:
      return false;
    case GNUstep:
      return false;
    case ObjFW:
      return false;
    }
    llvm_unreachable("bad kind");
  }

  /// Does this runtime provide entrypoints that are likely to be faster
  /// than an ordinary message send of the "alloc" selector?
  ///
  /// The "alloc" entrypoint is guaranteed to be equivalent to just sending the
  /// corresponding message.  If the entrypoint is implemented naively as just a
  /// message send, using it is a trade-off: it sacrifices a few cycles of
  /// overhead to save a small amount of code.  However, it's possible for
  /// runtimes to detect and special-case classes that use "standard"
  /// alloc behavior; if that's dynamically a large proportion of all
  /// objects, using the entrypoint will also be faster than using a message
  /// send.
  ///
  /// When this method returns true, Clang will turn non-super message sends of
  /// certain selectors into calls to the corresponding entrypoint:
  ///   alloc => objc_alloc
  ///   allocWithZone:nil => objc_allocWithZone
  bool shouldUseRuntimeFunctionsForAlloc() const {
    switch (getKind()) {
    case FragileMacOSX:
      return false;
    case MacOSX:
      return getVersion() >= VersionTuple(10, 10);
    case iOS:
      return getVersion() >= VersionTuple(8);
    case WatchOS:
      return true;

    case GCC:
      return false;
    case GNUstep:
      return false;
    case ObjFW:
      return false;
    }
    llvm_unreachable("bad kind");
  }

  /// Does this runtime provide the objc_alloc_init entrypoint? This can apply
  /// the same optimization as objc_alloc, but also sends an -init message,
  /// reducing code size on the caller.
  bool shouldUseRuntimeFunctionForCombinedAllocInit() const {
    switch (getKind()) {
    case MacOSX:
      return getVersion() >= VersionTuple(10, 14, 4);
    case iOS:
      return getVersion() >= VersionTuple(12, 2);
    case WatchOS:
      return getVersion() >= VersionTuple(5, 2);
    default:
      return false;
    }
  }

  /// Does this runtime supports optimized setter entrypoints?
  bool hasOptimizedSetter() const {
    switch (getKind()) {
      case MacOSX:
        return getVersion() >= VersionTuple(10, 8);
      case iOS:
        return (getVersion() >= VersionTuple(6));
      case WatchOS:
        return true;
      case GNUstep:
        return getVersion() >= VersionTuple(1, 7);
      default:
        return false;
    }
  }

  /// Does this runtime allow the use of __weak?
  bool allowsWeak() const {
    return hasNativeWeak();
  }

  /// Does this runtime natively provide ARC-compliant 'weak'
  /// entrypoints?
  bool hasNativeWeak() const {
    // Right now, this is always equivalent to whether the runtime
    // natively supports ARC decision.
    return hasNativeARC();
  }

  /// Does this runtime directly support the subscripting methods?
  ///
  /// This is really a property of the library, not the runtime.
  bool hasSubscripting() const {
    switch (getKind()) {
    case FragileMacOSX: return false;
    case MacOSX: return getVersion() >= VersionTuple(10, 11);
    case iOS: return getVersion() >= VersionTuple(9);
    case WatchOS: return true;

    // This is really a lie, because some implementations and versions
    // of the runtime do not support ARC.  Probably -fgnu-runtime
    // should imply a "maximal" runtime or something?
    case GCC: return true;
    case GNUstep: return true;
    case ObjFW: return true;
    }
    llvm_unreachable("bad kind");
  }

  /// Does this runtime allow sizeof or alignof on object types?
  bool allowsSizeofAlignof() const {
    return isFragile();
  }

  /// Does this runtime allow pointer arithmetic on objects?
  ///
  /// This covers +, -, ++, --, and (if isSubscriptPointerArithmetic()
  /// yields true) [].
  bool allowsPointerArithmetic() const {
    switch (getKind()) {
    case FragileMacOSX:
    case GCC:
      return true;
    case MacOSX:
    case iOS:
    case WatchOS:
    case GNUstep:
    case ObjFW:
      return false;
    }
    llvm_unreachable("bad kind");
  }

  /// Is subscripting pointer arithmetic?
  bool isSubscriptPointerArithmetic() const {
    return allowsPointerArithmetic();
  }

  /// Does this runtime provide an objc_terminate function?
  ///
  /// This is used in handlers for exceptions during the unwind process;
  /// without it, abort() must be used in pure ObjC files.
  bool hasTerminate() const {
    switch (getKind()) {
    case FragileMacOSX: return getVersion() >= VersionTuple(10, 8);
    case MacOSX: return getVersion() >= VersionTuple(10, 8);
    case iOS: return getVersion() >= VersionTuple(5);
    case WatchOS: return true;
    case GCC: return false;
    case GNUstep: return false;
    case ObjFW: return false;
    }
    llvm_unreachable("bad kind");
  }

  /// Does this runtime support weakly importing classes?
  bool hasWeakClassImport() const {
    switch (getKind()) {
    case MacOSX: return true;
    case iOS: return true;
    case WatchOS: return true;
    case FragileMacOSX: return false;
    case GCC: return true;
    case GNUstep: return true;
    case ObjFW: return true;
    }
    llvm_unreachable("bad kind");
  }

  /// Does this runtime use zero-cost exceptions?
  bool hasUnwindExceptions() const {
    switch (getKind()) {
    case MacOSX: return true;
    case iOS: return true;
    case WatchOS: return true;
    case FragileMacOSX: return false;
    case GCC: return true;
    case GNUstep: return true;
    case ObjFW: return true;
    }
    llvm_unreachable("bad kind");
  }

  bool hasAtomicCopyHelper() const {
    switch (getKind()) {
    case FragileMacOSX:
    case MacOSX:
    case iOS:
    case WatchOS:
      return true;
    case GNUstep:
      return getVersion() >= VersionTuple(1, 7);
    default: return false;
    }
  }

  /// Is objc_unsafeClaimAutoreleasedReturnValue available?
  bool hasARCUnsafeClaimAutoreleasedReturnValue() const {
    switch (getKind()) {
    case MacOSX:
    case FragileMacOSX:
      return getVersion() >= VersionTuple(10, 11);
    case iOS:
      return getVersion() >= VersionTuple(9);
    case WatchOS:
      return getVersion() >= VersionTuple(2);
    case GNUstep:
      return false;
    default:
      return false;
    }
  }

  /// Are the empty collection symbols available?
  bool hasEmptyCollections() const {
    switch (getKind()) {
    default:
      return false;
    case MacOSX:
      return getVersion() >= VersionTuple(10, 11);
    case iOS:
      return getVersion() >= VersionTuple(9);
    case WatchOS:
      return getVersion() >= VersionTuple(2);
    }
  }

  /// Returns true if this Objective-C runtime supports Objective-C class
  /// stubs.
  bool allowsClassStubs() const {
    switch (getKind()) {
    case FragileMacOSX:
    case GCC:
    case GNUstep:
    case ObjFW:
      return false;
    case MacOSX:
    case iOS:
    case WatchOS:
      return true;
    }
    llvm_unreachable("bad kind");
  }

  /// Does this runtime supports direct dispatch
  bool allowsDirectDispatch() const {
    switch (getKind()) {
    case FragileMacOSX: return false;
    case MacOSX: return true;
    case iOS: return true;
    case WatchOS: return true;
    case GCC: return false;
    case GNUstep: return false;
    case ObjFW: return false;
    }
    llvm_unreachable("bad kind");
  }

  /// Try to parse an Objective-C runtime specification from the given
  /// string.
  ///
  /// \return true on error.
  bool tryParse(StringRef input);

  std::string getAsString() const;

  friend bool operator==(const ObjCRuntime &left, const ObjCRuntime &right) {
    return left.getKind() == right.getKind() &&
           left.getVersion() == right.getVersion();
  }

  friend bool operator!=(const ObjCRuntime &left, const ObjCRuntime &right) {
    return !(left == right);
  }
};

raw_ostream &operator<<(raw_ostream &out, const ObjCRuntime &value);

} // namespace clang

#endif // LLVM_CLANG_BASIC_OBJCRUNTIME_H


text:
<?php

namespace Behat\Sf2DemoBundle\Features\Context;

use Symfony\Component\HttpKernel\KernelInterface;
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Behat\MinkExtension\Context\MinkContext;

use Behat\Behat\Context\BehatContext,
    Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode,
    Behat\Gherkin\Node\TableNode;

require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Framework/Assert/Functions.php';

class FeatureContext extends BehatContext implements KernelAwareInterface
{
    private $kernel;
    private $parameters;
    private $containerParameters;
    private $parameterKey;

    /**
     * Initializes context with parameters from behat.yml.
     *
     * @param array $parameters
     */
    public function __construct(array $parameters)
    {
        $this->parameters = $parameters;
    }

    /**
     * Sets HttpKernel instance.
     * This method will be automatically called by Symfony2Extension ContextInitializer.
     *
     * @param KernelInterface $kernel
     */
    public function setKernel(KernelInterface $kernel)
    {
        $this->kernel = $kernel;
    }

    /**
     * @Given /^I have a kernel instance$/
     */
    public function iHaveAKernelInstance()
    {
        assertInstanceOf('Symfony\\Component\\HttpKernel\\KernelInterface', $this->kernel);
    }

    /**
     * @When /^I get container parameters from it$/
     */
    public function iGetContainerParametersFromIt()
    {
        $this->containerParameters = $this->kernel->getContainer()->getParameterBag()->all();
    }

    /**
     * @Then /^there should be "([^"]*)" parameter$/
     */
    public function thereShouldBeParameter($key)
    {
        assertArrayHasKey($key, $this->containerParameters);
        $this->parameterKey = $key;
    }

    /**
     * @Then /^there should not be "([^"]*)" parameter$/
     */
    public function thereShouldNotBeParameter($key)
    {
        assertArrayNotHasKey($key, $this->containerParameters);
    }

    /**
     * @Given /^it should be set to "([^"]*)" value$/
     */
    public function itShouldBeSetToValue($val)
    {
        assertSame($val, $this->containerParameters[$this->parameterKey]);
    }
}


text:
describe('GGRC.Components.mapperResultsItem', function () {
  'use strict';

  var viewModel;

  beforeEach(function () {
    viewModel = GGRC.Components.getViewModel('mapperResultsItem');
  });

  describe('displayItem() method', function () {
    it('returns content of revesion if itemData.revesion defined',
     function () {
       var result;
       viewModel.attr('itemData', {
         revision: {
           content: 'mockData'
         }
       });
       result = viewModel.displayItem();
       expect(result).toEqual('mockData');
     });

    it('returns itemData if itemData.revesion undefined',
      function () {
        var result;
        viewModel.attr('itemData', 'mockData');
        result = viewModel.displayItem();
        expect(result).toEqual('mockData');
      });
  });

  describe('title() method', function () {
    var itemData;
    beforeEach(function () {
      itemData = {
        title: 'mockTitle',
        description_inline: 'mockDescription',
        name: 'mockName',
        email: 'mockEmail'
      };
    });

    it('returns item title', function () {
      var result;
      viewModel.attr('itemData', itemData);
      result = viewModel.title();
      expect(result).toEqual('mockTitle');
    });

    it('returns item description if no title', function () {
      var result;
      viewModel.attr('itemData', _.assign(itemData, {
        title: undefined
      }));
      result = viewModel.title();
      expect(result).toEqual('mockDescription');
    });

    it('returns item name if no title and description', function () {
      var result;
      viewModel.attr('itemData', _.assign(itemData, {
        title: undefined,
        description_inline: undefined
      }));
      result = viewModel.title();
      expect(result).toEqual('mockName');
    });

    it('returns item email if no title, description, name',
      function () {
        var result;
        viewModel.attr('itemData', _.assign(itemData, {
          title: undefined,
          description_inline: undefined,
          name: undefined
        }));
        result = viewModel.title();
        expect(result).toEqual('mockEmail');
      });
  });

  describe('toggleIconCls() method', function () {
    it('returns fa-caret-down if showDetails is true', function () {
      var result;
      viewModel.attr('showDetails', true);
      result = viewModel.toggleIconCls();
      expect(result).toEqual('fa-caret-down');
    });

    it('returns fa-caret-right if showDetails is false',
      function () {
        var result;
        viewModel.attr('showDetails', false);
        result = viewModel.toggleIconCls();
        expect(result).toEqual('fa-caret-right');
      });
  });

  describe('toggleDetails() method', function () {
    it('changes viewModel.showDetails to false if was true', function () {
      viewModel.attr('showDetails', true);
      viewModel.toggleDetails();
      expect(viewModel.attr('showDetails')).toEqual(false);
    });
    it('changes viewModel.showDetails to true if was false', function () {
      viewModel.attr('showDetails', false);
      viewModel.toggleDetails();
      expect(viewModel.attr('showDetails')).toEqual(true);
    });
  });

  describe('isSnapshot() method', function () {
    it('returns true if it is snapshot', function () {
      var result;
      viewModel.attr('itemData', {
        type: CMS.Models.Snapshot.model_singular
      });
      result = viewModel.isSnapshot();
      expect(result).toEqual(true);
    });

    it('returns false if it is not snapshot', function () {
      var result;
      viewModel.attr('itemData', {
        type: 'mockType'
      });
      result = viewModel.isSnapshot();
      expect(result).toEqual(false);
    });
  });

  describe('objectType() method', function () {
    it('returns child_type if it is snapshot', function () {
      var result;
      viewModel.attr('itemData', {
        type: CMS.Models.Snapshot.model_singular,
        child_type: 'mockType'
      });
      result = viewModel.objectType();
      expect(result).toEqual('mockType');
    });

    it('returns type if it is not snapshot', function () {
      var result;
      viewModel.attr('itemData', {
        type: 'mockType'
      });
      result = viewModel.objectType();
      expect(result).toEqual('mockType');
    });
  });

  describe('objectTypeIcon() method', function () {
    it('returns object type icon', function () {
      var postfix;
      var result;
      viewModel.attr('itemData', {
        type: 'Program'
      });
      postfix = CMS.Models.Program.table_singular;
      result = viewModel.objectTypeIcon();
      expect(result).toEqual('fa-' + postfix);
    });
  });

  describe('showRelatedAssessments() method', function () {
    it('dispatches event', function () {
      spyOn(viewModel, 'dispatch');
      viewModel.attr('itemData', 'mockData');
      viewModel.showRelatedAssessments();
      expect(viewModel.dispatch).toHaveBeenCalledWith(
        jasmine.objectContaining({
          type: 'showRelatedAssessments',
          instance: 'mockData'
        })
      );
    });
  });
});


text:
import PropTypes from "prop-types";
import React, { Component } from "react";
import { Tooltip as VanillaTooltip } from "hig-vanilla";
import TooltipAdapter from "../../adapters/TooltipAdapter";

export default class Tooltip extends Component {
  constructor(props) {
    super(props);
    this.state = {
      open: false
    };
  }

  closeTooltip = () => {
    this.setState({ open: false });
  };

  openTooltip = () => {
    this.setState({ open: true });
  };

  render() {
    const target = this.props.children
      ? React.cloneElement(this.props.children, { onClick: this.openTooltip })
      : null;
    return (
      <TooltipAdapter
        anchorPoint={this.props.anchorPoint}
        open={this.state.open}
        onClickOutside={this.closeTooltip}
        content={this.props.content}
      >
        {target}
      </TooltipAdapter>
    );
  }
}

Tooltip.propTypes = {
  /**
   * Where the tooltip will be anchored relative to target
   */
  anchorPoint: PropTypes.oneOf(VanillaTooltip.AvailableAnchorPoints),
  /**
   * Target component to open the tooltip
   */
  children: PropTypes.node,
  /**
   * Content for the tooltip
   */
  content: PropTypes.string
};


text:
package edu.incense.android.results;

import android.content.Context;
import android.os.AsyncTask;
import android.widget.Toast;

public class QueueFileTask extends AsyncTask<ResultFile, Void, Integer> {
    private Context context;

    public QueueFileTask(Context context) {
        super();
        this.context = context;
    }

    @Override
    protected Integer doInBackground(ResultFile... params) {
        ResultsUploader resultsUploader = new ResultsUploader(context);
        for (ResultFile rf : params) {
            resultsUploader.offerFile(rf);
        }
        return params.length;
    }

    @Override
    protected void onPostExecute(Integer result) {
        if (result > 0) {
            Toast.makeText(context,
                    result + " files were added to the uploader queue.",
                    Toast.LENGTH_LONG).show();
        }
    }
}


text:
<!DOCTYPE html>

  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="generator" content="Hugo 0.26" />

  <title>Themes · 高等统计初学者</title>

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pure/1.0.0/pure-min.css">

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pure/1.0.0/grids-responsive-min.css">

  <link rel="stylesheet" href="/css/side-menu.css">

  <link rel="stylesheet" href="/css/blackburn.css">

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

  <link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css">

  <link rel="alternate" type="application/rss+xml" title="高等统计初学者" href="/tags/themes/index.xml" />

  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">

  <link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" />

          关于

          博客

          简历

          主页

      RSS

      LinkedIn

      GitHub

    © 2012-2017. All rights reserved.

    Built with Hugo
    Theme Blackburn

Themes

(Hu)go Template Primer

    <time>2014/04/02</time>

      go /

      golang /

      templates /

      themes /

      development

  Hugo uses the excellent go html/template library for its template engine. It is an extremely lightweight engine that provides a very small amount of logic. In our experience that it is just the right amount of logic to be able to create a good static website. If you have used other template systems from different languages or frameworks you will find a lot of similarities in go templates.
This document is a brief primer on using go templates.

    Read more


text:
[![Build Status](https://travis-ci.org/CabeiriIO/cabeiri-editor.svg?branch=master)](https://travis-ci.org/CabeiriIO/cabeiri-editor)

A tool for programming your embeded devices easily.

 - Setup your logic through the visual editor
 - Code only what matters. Code what is unique to your project.

Depending on the platform you are targetting, there are some required software :

##AVR/ARDUINO
 - AVR-GCC
 - AVR Dude


text:
package mineserver;

import java.io.IOException;
import java.net.BindException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

public class LocalAddressFactory {
    private static final int[] octets = { 0, 0, 1 };
    private static Boolean canCycle = null;
    private static boolean enabled = true;

    private void toggle(boolean enabled) {
        LocalAddressFactory.enabled = enabled;
    }

    public synchronized String getNextAddress() {
        if (!enabled || !canCycle()) {
            return "127.0.0.1";
        }

        if (octets[2] >= 255) {
            if (octets[1] >= 255) {
                if (octets[0] >= 255) {
                    octets[0] = 0;
                } else {
                    ++octets[0];
                }
                octets[1] = 0;
            } else {
                ++octets[1];
            }
            octets[2] = 2;
        } else {
            ++octets[2];
        }

        return "127." + octets[0] + "." + octets[1] + "." + octets[2];
    }

    private boolean canCycle() {
        if (canCycle == null) {
            InetAddress testDestination;
            InetAddress testSource;
            try {
                testDestination = InetAddress.getByName(null);
                testSource = InetAddress.getByName("127.0.1.2");
            } catch (UnknownHostException e) {
                canCycle = false;
                return false;
            }

            try {
                Socket testSocket = new Socket(testDestination, 80, testSource, 0);
                testSocket.close();
            } catch (BindException e) {
                canCycle = false;
                return false;
            } catch (IOException e) {
                // Probably nothing listening on port 80
            }

            canCycle = true;
        }

        return canCycle;
    }
}


text:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.cbrtDependencies = void 0;

var _dependenciesTyped = require("./dependenciesTyped.generated");

var _factoriesNumber = require("../../factoriesNumber.js");

/**
 * THIS FILE IS AUTO-GENERATED
 * DON'T MAKE CHANGES HERE
 */
var cbrtDependencies = {
  typedDependencies: _dependenciesTyped.typedDependencies,
  createCbrt: _factoriesNumber.createCbrt
};
exports.cbrtDependencies = cbrtDependencies;


text:
syft.core.node.common.node\_service
===================================

.. automodule:: syft.core.node.common.node_service

.. rubric:: Modules

.. autosummary::
   :toctree:
   :recursive:

   syft.core.node.common.node_service.accept_or_deny_request
   syft.core.node.common.node_service.association_request
   syft.core.node.common.node_service.auth
   syft.core.node.common.node_service.child_node_lifecycle
   syft.core.node.common.node_service.dataset_manager
   syft.core.node.common.node_service.generic_payload
   syft.core.node.common.node_service.get_remaining_budget
   syft.core.node.common.node_service.get_repr
   syft.core.node.common.node_service.heritage_update
   syft.core.node.common.node_service.msg_forwarding
   syft.core.node.common.node_service.network_search
   syft.core.node.common.node_service.node_credential
   syft.core.node.common.node_service.node_route
   syft.core.node.common.node_service.node_service
   syft.core.node.common.node_service.node_setup
   syft.core.node.common.node_service.object_action
   syft.core.node.common.node_service.object_delete
   syft.core.node.common.node_service.object_request
   syft.core.node.common.node_service.object_search
   syft.core.node.common.node_service.object_search_permission_update
   syft.core.node.common.node_service.object_transfer
   syft.core.node.common.node_service.peer_discovery
   syft.core.node.common.node_service.ping
   syft.core.node.common.node_service.request_answer
   syft.core.node.common.node_service.request_handler
   syft.core.node.common.node_service.request_receiver
   syft.core.node.common.node_service.resolve_pointer_type
   syft.core.node.common.node_service.role_manager
   syft.core.node.common.node_service.simple
   syft.core.node.common.node_service.sleep
   syft.core.node.common.node_service.success_resp_message
   syft.core.node.common.node_service.tensor_manager
   syft.core.node.common.node_service.testing_services
   syft.core.node.common.node_service.upload_service
   syft.core.node.common.node_service.user_auth
   syft.core.node.common.node_service.user_manager
   syft.core.node.common.node_service.vm_request_service
   syft.core.node.common.node_service.vpn


text:
package com.example.zjy.niklauslibrary.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.FrameLayout;

import com.example.zjy.niklauslibrary.R;

/**
 * Created by zjy on 2016/10/17.
 * 组合控件的使用
 * 1.先创建一个layout Xml文件,将要组合起来的自定义view放进去
 * 2.创建一个(组合)类继承该Xml布局
 * 3.在要使用组合控件的时候调用
 */
public class CombinationView extends FrameLayout implements SlideBar.OnTouchSlideBarListener {
    private SlideBar slideBar;
    private LabelView labelView;
    private ChooseWord chooseWord;
    public void setChooseWord(ChooseWord chooseWord){
        this.chooseWord = chooseWord;
    }
    public CombinationView(Context context) {
        this(context, null);
    }

    public CombinationView(Context context, AttributeSet attrs) {
        this(context, attrs , 0);
    }

    public CombinationView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {
        LayoutInflater.from(getContext()).inflate(R.layout.combination,this,true);
        slideBar = (SlideBar) findViewById(R.id.slideBar);
        slideBar.setOnTouchSlideBarListener(this);
        labelView = (LabelView) findViewById(R.id.lv);
    }

    @Override
    public void select(String content, int position) {
        labelView.setContent(content);
        if(chooseWord != null){
            chooseWord.chooseWordInfo(content,position);
        }
    }

    @Override
    public void unTouch() {
        labelView.setContent(null);
    }

    public interface ChooseWord{
        void chooseWordInfo(String word,int position);
    }
}


text:
using namespace BeeeOn;

RoleAccessPolicy::~RoleAccessPolicy()
{
}


text:
'use strict';

import React         from 'react';
import Parse         from 'parse';
import ParseReact    from 'parse-react';
import {Link}        from 'react-router';
import DocumentTitle from 'react-document-title';

var ParseComponent = ParseReact.Component(React);

class TBItem extends ParseComponent {

    constructor(props) {
      super(props);
      this.state = {
        itemAdded: false
      };

      this.isItemAdded = this.isItemAdded.bind(this);
      this.handleAddItem = this.handleAddItem.bind(this);
    }

    observe(props, state) {
    }

    componentDidMount() {
      this.isItemAdded(this.props.ItemId);
    }

    isItemAdded(itemId) {
      var query = new Parse.Query('AddedItemIdToUser');
      query.equalTo("username", Parse.User.current().get("username"));
      query.equalTo("ItemId", itemId);
      query.find(
        {
          success: function() {
            console.log("Item " + itemId + " Is already added to " );
            console.log(Parse.User.current().get("username"));
            this.setState({
              itemAdded: true
            })

          }.bind(this),
          error: function() {
            console.log("Item " + itemId + " Is NOT added to ")
            console.log(Parse.User.current().get("username"));
            this.setState({
              itemAdded: false
            })
          }.bind(this)
        }
      );
    }

    handleAddItem(event){
      event.preventDefault();
      var AddItem = Parse.Object.extend("AddedItemIdToUser");
      var itemToAdd = new AddItem();
      var itemId =this.props.ItemId

      itemToAdd.save({
        ItemId: itemId,
        username: Parse.User.current().get("username")
        }, {
          success: function() {
            console.log(":) Added item to my items!")
          },
          error: function() {
            console.log("could not add item to my items");
          }
      });

    }

    render() {
      return (

            <Link to="/reviews">

            </Link>

            {(this.state.itemAdded == true)?
              Added :
              <button onClick={this.handleAddItem}>Add this to My Items</button>
            }

{this.props.objectName}

{this.props.description}

      );
    }
}

export default TBItem;


text:
namespace SpringBoot {

  type Item = { key: string; value: any; };

  export class Info {
    items: Item[];

    constructor(obj: any) {
      const items = this.flatten(obj);
      items.sort((a, b) => {
        if (a.key > b.key) return 1;
        if (a.key < b.key) return -1;
        return 0;
      });
      this.items = items;
    }

    private flatten(obj: any): Item[] {
      return Object.entries(obj)
        // flatMap shim
        .reduce((acc, [key, value]) => {
          if (typeof value === 'object') {
            const items = this.flatten(value).map(item => this.prefixKey(key, item));
            acc.push(...items);
          } else {
            acc.push({ key, value });
          }
          return acc;
        }, []);
    }

    private prefixKey(prefix: string, item: Item): Item {
      return { key: `${prefix}.${item.key}`, value: item.value };
    }
  }

}


text:
var events = [];

$(function() {

  // animate the banner
  $("#highlights").tvCredits({direction: 'left', speed: 300000,});

  // add press-releases
  getData();

  function getData() {
    $.ajax({
      type: 'HEAD',
      url: 'data/releases.json',
      success: compareETags
    });
  };

  function compareETags(data, status, xhr) {
    eTag = xhr.getResponseHeader('eTag');
    if (eTag === localStorage.getItem('eTag')) {
    console.log('cache hit');
    fetchFromLS();
    } else {
    console.log('cache miss');
    fetchFromJSON(eTag);
    }
  };

  function fetchFromLS() {
    var stringArray = localStorage.getItem('releases');
    var releasesArray = JSON.parse(stringArray);
    releasesArray.forEach(function(item) {
      events.push(item);
    });
    initReleases();
  };

  function fetchFromJSON (eTag) {
    console.log('fetch from JSON');
    $.getJSON('data/releases.json', function(data) {
      events = data;
      localStorage.setItem('releases', JSON.stringify(data));
      initReleases();
    })
    .done(function() {
      localStorage.setItem('eTag', eTag);
    });
  };

  function initReleases() {
    $.get('templates/press-releases.handlebars', function(data) {
      var template = Handlebars.compile(data);
      events.forEach(function(item) {
        var compiledHtml = template(item);
        $('#updates').append(compiledHtml);
      });
    });
  }

})


text:
package km.crawler.multithread;

public class WorkerThread implements Runnable {

    private WorkerTask task;
    private Thread t;

    public WorkerThread(String name, WorkerTask task) {
        this.task = task;
        this.t = new Thread(this, name);
    }

    public void start() {
        t.start();
    }

    @Override
    public void run() {
        task.process();
    }
}


text:
Que souhaitez-vous chercher ?

	<form class="form-inline" ng-submit="searchText()">

			<input type="text" ng-model="search" class="form-group"></input>
			<button type="submit" class="btn btn-default">Rechercher</button>

	</form>

		{{result.url}}

        <button onclick="bookmarklet();">Test</button>
        <a href="javascript:(function () { var url = 'http://localhost:8080/api/index'; if (window.myBookmarklet === undefined) { var done = false; var script = document.createElement('script'); script.src = 'http://localhost:8080/js/myLib.js'; script.onload = script.onreadystatechange = function () { if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { done = true; myBookmarklet(); } }; document.getElementsByTagName('head')[0].appendChild(script); } else { myBookmarklet(); }})();">Drag
            this link to favotites

            by


text:
package resource_pool

import (
	"sync/atomic"

	"github.com/dropbox/godropbox/errors"
)

// A resource handle managed by a resource pool.
type ManagedHandle interface {
	// This returns the handle's resource location.
	ResourceLocation() string

	// This returns the underlying resource handle (or error if the handle
	// is no longer active).
	Handle() (interface{}, error)

	// This returns the resource pool which owns this handle.
	Owner() ResourcePool

	// The releases the underlying resource handle to the caller and marks the
	// managed handle as inactive.  The caller is responsible for cleaning up
	// the released handle.  This returns nil if the managed handle no longer
	// owns the resource.
	ReleaseUnderlyingHandle() interface{}

	// This indictes a user is done with the handle and releases the handle
	// back to the resource pool.
	Release() error

	// This indicates the handle is an invalid state, and that the
	// connection should be discarded from the connection pool.
	Discard() error
}

// A physical implementation of ManagedHandle
type ManagedHandleImpl struct {
	location string
	handle   interface{}
	pool     ResourcePool
	isActive int32 // atomic bool
	options  Options
}

// This creates a managed handle wrapper.
func NewManagedHandle(
	resourceLocation string,
	handle interface{},
	pool ResourcePool,
	options Options) ManagedHandle {

	h := &ManagedHandleImpl{
		location: resourceLocation,
		handle:   handle,
		pool:     pool,
		options:  options,
	}
	atomic.StoreInt32(&h.isActive, 1)

	return h
}

// See ManagedHandle for documentation.
func (c *ManagedHandleImpl) ResourceLocation() string {
	return c.location
}

// See ManagedHandle for documentation.
func (c *ManagedHandleImpl) Handle() (interface{}, error) {
	if atomic.LoadInt32(&c.isActive) == 0 {
		return c.handle, errors.New("Resource handle is no longer valid")
	}
	return c.handle, nil
}

// See ManagedHandle for documentation.
func (c *ManagedHandleImpl) Owner() ResourcePool {
	return c.pool
}

// See ManagedHandle for documentation.
func (c *ManagedHandleImpl) ReleaseUnderlyingHandle() interface{} {
	if atomic.CompareAndSwapInt32(&c.isActive, 1, 0) {
		return c.handle
	}
	return nil
}

// See ManagedHandle for documentation.
func (c *ManagedHandleImpl) Release() error {
	return c.pool.Release(c)
}

// See ManagedHandle for documentation.
func (c *ManagedHandleImpl) Discard() error {
	return c.pool.Discard(c)
}


text:
package akka_tests.java.actor;

import akka_tests.java.message.Greeting;
import akka_tests.java.message.Shutdown;
import akka_tests.java.message.Stop;
import akka_tests.java.message.Wait;
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.actor.UntypedActor;
import akka.event.Logging;
import akka.event.LoggingAdapter;

// import akka.testkit.JavaTestKit;  // only for tests

import scala.concurrent.duration.Duration;

/**
 * Greeting actor, as a sample.
 * <br/>
 * This code is derived from Akka Samples.
 */
public class GreetingActor extends UntypedActor
{
    LoggingAdapter log = Logging.getLogger(getContext().system(), this);

	/** Default constructor */
	public GreetingActor() {
	}

    @Override
    public void onReceive(Object message) throws Exception
    {
        String messageClassName = message.getClass().getName();

        if (message == null)
        {
            log.warning(messageClassName + ": null message");
            unhandled(message);
        }
        else if (message instanceof Greeting)
        {
			log.info(messageClassName + ": Hello \"" + ((Greeting) message).getWho() + "\"");
			getSender().tell("Hello \"" + ((Greeting) message).getWho() + "\"", getSelf());  // reply to the sender
        }
		else if (message instanceof String)
        {
			log.info(messageClassName + ": \"" + message.toString() + "\"");
			getSender().tell(message, getSelf());  // reply to the sender
		}
        else
        {
            if (message != null)
				log.warning("Unknown message type " + messageClassName + ", contents: \"" + message.toString() + "\"");
			else
				log.warning("Unknown message type " + messageClassName + ", message is null");

            unhandled(message);
        }
		/*
// TODO: enable after set base class ...
		else {
			super.onReceive(message);
		}
		 */
    }
}


text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Collections.Immutable
Imports Microsoft.CodeAnalysis.Classification
Imports Microsoft.CodeAnalysis.Editor.UnitTests.Classification.FormattedClassifications
Imports Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
Imports Microsoft.CodeAnalysis.Text

Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Classification
    Public Class SemanticClassifierTests
        Inherits AbstractVisualBasicClassifierTests

        Protected Overrides Function GetClassificationSpansAsync(code As String, span As TextSpan, parseOptions As ParseOptions) As Task(Of ImmutableArray(Of ClassifiedSpan))
            Using workspace = TestWorkspace.CreateVisualBasic(code)
                Dim document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id)

                Return GetSemanticClassificationsAsync(document, span)
            End Using
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestTypeName1() As Task
            Await TestInMethodAsync(
                className:="C(Of T)",
                methodName:="M",
                code:="Dim x As New C(Of Integer)()",
                [Class]("C"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestImportsType() As Task
            Await TestAsync("Imports System.Console",
            [Namespace]("System"),
            [Class]("Console"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestImportsAlias() As Task
            Await TestAsync("Imports M = System.Math",
                [Class]("M"),
                [Namespace]("System"),
                [Class]("Math"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestMSCorlibTypes() As Task
            Dim code =
"Imports System
Module Program
    Sub Main(args As String())
        Console.WriteLine()
    End Sub
End Module"

            Await TestAsync(code,
                [Namespace]("System"),
                [Class]("Console"),
                Method("WriteLine"),
                [Static]("WriteLine"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestConstructedGenericWithInvalidTypeArg() As Task
            Await TestInMethodAsync(
                className:="C(Of T)",
                methodName:="M",
                code:="Dim x As New C(Of UnknownType)()",
                [Class]("C"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestMethodCall() As Task
            Await TestInMethodAsync(
                className:="Program",
                methodName:="M",
                code:="Program.Main()",
                [Class]("Program"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        <WorkItem(538647, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/538647")>
        Public Async Function TestRegression4315_VariableNamesClassifiedAsType() As Task
            Dim code =
"Module M
    Sub S()
        Dim goo
    End Sub
End Module"

            Await TestAsync(code)
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        <WorkItem(541267, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541267")>
        Public Async Function TestRegression7925_TypeParameterCantCastToMethod() As Task
            Dim code =
"Class C
    Sub GenericMethod(Of T1)(i As T1)
    End Sub
End Class"

            Await TestAsync(code,
                TypeParameter("T1"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        <WorkItem(541610, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541610")>
        Public Async Function TestRegression8394_AliasesShouldBeClassified1() As Task
            Dim code =
"Imports S = System.String
Class T
    Dim x As S = ""hello""
End Class"

            Await TestAsync(code,
                [Class]("S"),
                [Namespace]("System"),
                [Class]("String"),
                [Class]("S"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        <WorkItem(541610, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/541610")>
        Public Async Function TestRegression8394_AliasesShouldBeClassified2() As Task
            Dim code =
"Imports D = System.IDisposable
Class T
    Dim x As D = Nothing
End Class"

            Await TestAsync(code,
                [Interface]("D"),
                [Namespace]("System"),
                [Interface]("IDisposable"),
                [Interface]("D"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestConstructorNew1() As Task
            Dim code =
"Class C
    Sub New
    End Sub
    Sub [New]
    End Sub
    Sub New(x)
        Me.New
    End Sub
End Class"

            Await TestAsync(code,
                Keyword("New"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestConstructorNew2() As Task
            Dim code =
"Class B
    Sub New()
    End Sub
End Class
Class C
    Inherits B
    Sub New(x As Integer)
        MyBase.New
    End Sub
End Class"

            Await TestAsync(code,
                [Class]("B"),
                Keyword("New"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestConstructorNew3() As Task
            Dim code =
"Class C
    Sub New
    End Sub
    Sub [New]
    End Sub
    Sub New(x)
        MyClass.New
    End Sub
End Class"

            Await TestAsync(code,
                Keyword("New"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestConstructorNew4() As Task
            Dim code =
"Class C
    Sub New
    End Sub
    Sub [New]
    End Sub
    Sub New(x)
        With Me
            .New
        End With
    End Sub
End Class"

            Await TestAsync(code,
                Keyword("New"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAlias() As Task
            Dim code =
"Imports E = System.Exception
Class C
    Inherits E
End Class"

            Await TestAsync(code,
                [Class]("E"),
                [Namespace]("System"),
                [Class]("Exception"),
                [Class]("E"))
        End Function

        <WorkItem(542685, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542685")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestOptimisticallyColorFromInDeclaration() As Task
            Await TestInExpressionAsync("From ",
                Keyword("From"))
        End Function

        <WorkItem(542685, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542685")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestOptimisticallyColorFromInAssignment() As Task
            Dim code =
"Dim q = 3
q = From"

            Await TestInMethodAsync(code,
                Local("q"),
                Keyword("From"))
        End Function

        <WorkItem(542685, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542685")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestDontColorThingsOtherThanFromInDeclaration() As Task
            Await TestInExpressionAsync("Fro ")
        End Function

        <WorkItem(542685, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542685")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestDontColorThingsOtherThanFromInAssignment() As Task
            Dim code =
"Dim q = 3
q = Fro "

            Await TestInMethodAsync(code,
                Local("q"))
        End Function

        <WorkItem(542685, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542685")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestDontColorFromWhenBoundInDeclaration() As Task
            Dim code =
"Dim From = 3
Dim q = From"

            Await TestInMethodAsync(code,
                Local("From"))
        End Function

        <WorkItem(542685, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/542685")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestDontColorFromWhenBoundInAssignment() As Task
            Dim code =
"Dim From = 3
Dim q = 3
q = From"

            Await TestInMethodAsync(code,
                Local("q"),
                Local("From"))
        End Function

        <Fact, WorkItem(10507, "DevDiv_Projects/Roslyn"), Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestArraysInGetType() As Task
            Await TestInMethodAsync("GetType(System.Exception()",
                [Namespace]("System"),
                [Class]("Exception"))
            Await TestInMethodAsync("GetType(System.Exception(,)",
                [Namespace]("System"),
                [Class]("Exception"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestNewOfInterface() As Task
            Await TestInMethodAsync("Dim a = New System.IDisposable()",
                [Namespace]("System"),
                [Interface]("IDisposable"))
        End Function

        <WorkItem(543404, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/543404")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestNewOfClassWithNoPublicConstructors() As Task
            Dim code =
"Public Class C1
    Private Sub New()
    End Sub
End Class
Module Program
    Sub Main()
        Dim f As New C1()
    End Sub
End Module"

            Await TestAsync(code,
                [Class]("C1"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAsyncKeyword1() As Task
            Dim code =
"Class C
    Sub M()
        Dim x = Async
    End Sub
End Class"

            Await TestAsync(code,
                Keyword("Async"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAsyncKeyword2() As Task
            Dim code =
"Class C
    Sub M()
        Dim x = Async S
    End Sub
End Class"

            Await TestAsync(code,
                Keyword("Async"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAsyncKeyword3() As Task
            Dim code =
"Class C
    Sub M()
        Dim x = Async Su
    End Sub
End Class"

            Await TestAsync(code,
                Keyword("Async"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAsyncKeyword4() As Task
            Dim code =
"Class C
    Async
End Class"

            Await TestAsync(code,
                Keyword("Async"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAsyncKeyword5() As Task
            Dim code =
"Class C
    Private Async
End Class"

            Await TestAsync(code,
                Keyword("Async"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAsyncKeyword6() As Task
            Dim code =
"Class C
    Private Async As
End Class"

            Await TestAsync(code)
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAsyncKeyword7() As Task
            Dim code =
"Class C
    Private Async =
End Class"

            Await TestAsync(code)
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestIteratorKeyword1() As Task
            Dim code =
"Class C
    Sub M()
        Dim x = Iterator
    End Sub
End Class"

            Await TestAsync(code,
                Keyword("Iterator"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestIteratorKeyword2() As Task
            Dim code =
"Class C
    Sub M()
        Dim x = Iterator F
    End Sub
End Class"

            Await TestAsync(code,
                Keyword("Iterator"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestIteratorKeyword3() As Task
            Dim code =
"Class C
    Sub M()
        Dim x = Iterator Functio
    End Sub
End Class"

            Await TestAsync(code,
                Keyword("Iterator"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestIteratorKeyword4() As Task
            Dim code =
"Class C
    Iterator
End Class"

            Await TestAsync(code,
                Keyword("Iterator"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestIteratorKeyword5() As Task
            Dim code =
"Class C
    Private Iterator
End Class"

            Await TestAsync(code,
                Keyword("Iterator"))
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestIteratorKeyword6() As Task
            Dim code =
"Class C
    Private Iterator As
End Class"

            Await TestAsync(code)
        End Function

        <WorkItem(578145, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/578145")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestIteratorKeyword7() As Task
            Dim code =
"Class C
    Private Iterator =
End Class"

            Await TestAsync(code)
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestMyNamespace() As Task
            Dim code =
"Class C
    Sub M()
        Dim m = My.Goo
    End Sub
End Class"

            Await TestAsync(code,
                Keyword("My"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAwaitInNonAsyncFunction1() As Task
            Dim code = "dim m = Await"

            Await TestInMethodAsync(code,
                Keyword("Await"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAwaitInNonAsyncFunction2() As Task
            Dim code =
"sub await()
end sub

sub test()
    dim m = Await
end sub"

            Await TestInClassAsync(code,
                Method("Await"))
        End Function

        <WorkItem(21524, "https://github.com/dotnet/roslyn/issues/21524")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestAttribute() As Task
            Dim code =
"Imports System

<AttributeUsage()>
Class Program
End Class"

            Await TestAsync(code,
                [Namespace]("System"), [Class]("AttributeUsage"))
        End Function

        <WpfFact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestRegex1() As Task
            Await TestAsync(
"
imports System.Text.RegularExpressions

class Program
    sub Goo()
        ' language=regex
        var r = ""$(\b\G\z)|(?<name>sub){0,5}?^""
    end sub
end class",
[Namespace]("System"),
[Namespace]("Text"),
[Namespace]("RegularExpressions"),
Regex.Anchor("$"),
Regex.Grouping("("),
Regex.Anchor("\"),
Regex.Anchor("b"),
Regex.Anchor("\"),
Regex.Anchor("G"),
Regex.Anchor("\"),
Regex.Anchor("z"),
Regex.Grouping(")"),
Regex.Alternation("|"),
Regex.Grouping("("),
Regex.Grouping("?"),
Regex.Grouping("<"),
Regex.Grouping("name"),
Regex.Grouping(">"),
Regex.Text("sub"),
Regex.Grouping(")"),
Regex.Quantifier("{"),
Regex.Quantifier("0"),
Regex.Quantifier(","),
Regex.Quantifier("5"),
Regex.Quantifier("}"),
Regex.Quantifier("?"),
Regex.Anchor("^"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestConstField() As Task
            Dim code =
"Const Number = 42
Dim x As Integer = Number"

            Await TestInClassAsync(code,
                Constant("Number"),
                [Static]("Number"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestConstLocal() As Task
            Dim code =
"Const Number = 42
Dim x As Integer = Number"

            Await TestInMethodAsync(code,
                Constant("Number"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestModifiedIdentifiersInLocals() As Task
            Dim code =
"Dim x$ = ""23""
x$ = ""19"""

            Await TestInMethodAsync(code,
                Local("x$"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestModifiedIdentifiersInFields() As Task
            Dim code =
"Const x$ = ""23""
Dim y$ = x$"

            Await TestInClassAsync(code,
                Constant("x$"),
                [Static]("x$"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestFunctionNamesWithTypeCharacters() As Task
            Dim code =
"Function x%()
    x% = 42
End Function"

            Await TestInClassAsync(code,
                Local("x%"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestExtensionMethod() As Task
            Dim code = "
Imports System.Runtime.CompilerServices

Module M
    <Extension>
    Sub Square(ByRef x As Integer)
        x = x * x
    End Sub
End Module

Class C
    Sub Test()
        Dim x = 42
        x.Square()
        M.Square(x)
    End Sub
End Class"

            Await TestAsync(code,
                [Namespace]("System"),
                [Namespace]("Runtime"),
                [Namespace]("CompilerServices"),
                [Class]("Extension"),
                ExtensionMethod("Square"),
                Parameter("x"),
                Parameter("x"),
                Parameter("x"),
                Local("x"),
                ExtensionMethod("Square"),
                [Module]("M"),
                Method("Square"),
                [Static]("Square"),
                Local("x"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestSimpleEvent() As Task
            Dim code = "
Event E(x As Integer)

Sub M()
    RaiseEvent E(42)
End Sub"

            Await TestInClassAsync(code,
                [Event]("E"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestOperators() As Task
            Dim code = "
Public Shared Operator Not(t As Test) As Test
    Return New Test()
End Operator
Public Shared Operator +(t1 As Test, t2 As Test) As Integer
    Return 1
End Operator"

            Await TestInClassAsync(code)
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestStringEscape1() As Task
            Await TestInMethodAsync("dim goo = ""goo""""bar""",
                Escape(""""""))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestStringEscape2() As Task
            Await TestInMethodAsync("dim goo = $""goo{{1}}bar""",
                Escape("{{"),
                Escape("}}"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestStringEscape3() As Task
            Await TestInMethodAsync("dim goo = $""goo""""{{1}}""""bar""",
                Escape(""""""),
                Escape("{{"),
                Escape("}}"),
                Escape(""""""))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestStringEscape4() As Task
            Await TestInMethodAsync("dim goo = $""goo""""{1}""""bar""",
                Escape(""""""),
                Escape(""""""))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestStringEscape5() As Task
            Await TestInMethodAsync("dim goo = $""{{goo{1}bar}}""",
                Escape("{{"),
                Escape("}}"))
        End Function

        <WorkItem(29451, "https://github.com/dotnet/roslyn/issues/29451")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestDirectiveStringLiteral() As Task
            Await TestAsync("#region ""goo""""bar""",
                Escape(""""""))
        End Function

        <WorkItem(30378, "https://github.com/dotnet/roslyn/issues/30378")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestFormatSpecifierInInterpolation() As Task
            Await TestInMethodAsync("dim goo = $""goo{{1:0000}}bar""",
                Escape("{{"),
                Escape("}}"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestLabelName() As Task
            Dim code = "
Sub M()
E:
    GoTo E
End Sub"

            Await TestInClassAsync(code,
                [Label]("E"))
        End Function

        <WorkItem(29492, "https://github.com/dotnet/roslyn/issues/29492")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestOperatorOverloads_BinaryExpression() As Task
            Dim code =
"Class C
    Public Sub M(a As C)
        Dim b = 1 + 1
        Dim c = a + Me
    End Sub

    Public Shared Operator +(a As C, b As C) As C
        Return New C
    End Operator
End Class"

            Await TestAsync(code,
                [Class]("C"),
                Parameter("a"),
                OverloadedOperators.Plus,
                [Class]("C"),
                [Class]("C"),
                [Class]("C"),
                [Class]("C"))
        End Function

        <WorkItem(29492, "https://github.com/dotnet/roslyn/issues/29492")>
        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestOperatorOverloads_UnaryExpression() As Task
            Dim code =
"Class C
    Public Sub M()
        Dim b = -1
        Dim c = -Me
    End Sub

    Public Shared Operator -(a As C) As C
        Return New C
    End Operator
End Class"

            Await TestAsync(code,
                OverloadedOperators.Minus,
                [Class]("C"),
                [Class]("C"),
                [Class]("C"))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.Classification)>
        Public Async Function TestCatchStatement() As Task
            Dim code =
"Try

Catch ex As Exception
    Throw ex
End Try"

            Await TestInMethodAsync(code,
                Local("ex"),
                [Class]("Exception"),
                Local("ex"))
        End Function
    End Class
End Namespace


text:
const gstreamer = require('..');

const fragment_shader =	`
	#version 100
	#ifdef GL_ES
	precision mediump float;
	#endif
	varying vec2 v_texcoord;
	uniform sampler2D tex;
	void main () {
	  vec4 c = texture2D( tex, v_texcoord );
	  gl_FragColor = c.bgra;
	}
`;

let pipeline = new gstreamer.Pipeline('videotestsrc ! glupload ! glshader name=glshader ! glimagesink' )

const glshader = pipeline.findChild('glshader')
glshader.fragment = fragment_shader;

pipeline.play();

setInterval( function() {
	console.log("running")
}, 1000 );


text:
from .counted_usage import CountedUsage

from .preprint_metrics import (
    PreprintView,
    PreprintDownload,
)

from .institution_metrics import (
    InstitutionProjectCounts,
    UserInstitutionProjectCounts,
)

from .registry_metrics import RegistriesModerationMetrics

from .reports import (
    AddonUsageReport,
    DownloadCountReport,
    InstitutionSummaryReport,
    NewUserDomainReport,
    NodeSummaryReport,
    OsfstorageFileCountReport,
    PreprintSummaryReport,
    UserSummaryReport,
)

DAILY_REPORTS = (
    AddonUsageReport,
    DownloadCountReport,
    InstitutionSummaryReport,
    NewUserDomainReport,
    NodeSummaryReport,
    OsfstorageFileCountReport,
    PreprintSummaryReport,
    UserSummaryReport,
)

__all__ = (
    'CountedUsage',
    'DAILY_REPORTS',
    'InstitutionProjectCounts',
    'PreprintView',
    'PreprintDownload',
    'RegistriesModerationMetrics',
    'UserInstitutionProjectCounts',
)


text:
package com.rhomobile.rhodes.osfunctionality;

import com.rhomobile.rhodes.Logger;
import com.rhomobile.rhodes.RhoConf;
import com.rhomobile.rhodes.util.ContextFactory;

import android.content.Context;
import android.content.pm.ActivityInfo;
import android.view.Display;
import android.view.Surface;
import android.view.WindowManager;
import android.webkit.WebSettings;

//Android 2.2
class AndroidFunctionality08 extends AndroidFunctionality07 implements
        AndroidFunctionality {

    public int getDeviceRotation(Context context) {
        Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
        int rotation = display.getRotation();
        return rotation;
    }

    @Override
    public int getScreenOrientation(Context context) {
        Display display = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();

        @SuppressWarnings("deprecation")
        int width = display.getWidth();
        @SuppressWarnings("deprecation")
        int height = display.getHeight();

        switch(display.getRotation()){
        case Surface.ROTATION_0:
        case Surface.ROTATION_90:
            return (width < height) ? ActivityInfo.SCREEN_ORIENTATION_PORTRAIT : ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
        case Surface.ROTATION_180:
        case Surface.ROTATION_270:
            return (width < height) ? ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT : ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
        default:
            return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
        }
    }

    @Override
    protected void setWebPlugins(WebSettings settings) {
        if(RhoConf.getBool("enable_web_plugins")) {
            settings.setPluginState(WebSettings.PluginState.ON);
            Logger.I(TAG, "Set web plugins state 'ON'");
        }
        else {
            settings.setPluginState(WebSettings.PluginState.OFF);
            Logger.I(TAG, "Set web plugins state 'OFF'");
        }
    }

}


text:
package org.apereo.cas.config;

import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.ticket.expiration.RememberMeDelegatingExpirationPolicy;
import org.apereo.cas.util.serialization.ComponentSerializationPlan;
import org.apereo.cas.util.serialization.ComponentSerializationPlanConfigurator;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * This is {@link CasCoreTicketComponentSerializationConfiguration}.
 *
 * @author Misagh Moayyed
 * @since 5.2.0
 */
@Configuration("casCoreComponentSerializationConfiguration")
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class CasCoreTicketComponentSerializationConfiguration implements ComponentSerializationPlanConfigurator {
    @Override
    public void configureComponentSerializationPlan(final ComponentSerializationPlan plan) {
        plan.registerSerializableClass(RememberMeDelegatingExpirationPolicy.class);
    }
}


text:
<?php

use PasswordLib\Core\Strength\Medium as MediumStrength;
use PasswordLibTest\Mocks\Hash\Hash as MockHash;
use PasswordLibTest\Mocks\Hash\Factory as MockFactory;
use PasswordLibTest\Mocks\Random\Generator as MockGenerator;
use PasswordLib\Password\Implementation\SHA256;

require_once 'Password_TestCase.php';

class Unit_Password_Implementation_SHA256Test extends Unit_Password_Implementation_Password_TestCase {

    protected $class = 'PasswordLib\Password\Implementation\SHA256';

    public static function provideTestDetect() {
        return array(
            array(SHA256::getPrefix(), false),
            array('$6$', false),
            array(SHA256::getPrefix() . '................$0123456789012345678901234567890123456789123', true),
            array('$2$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', false),
            array(SHA256::getPrefix() . '07$usesome illystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', false),
            array(SHA256::getPrefix() . '01$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', false),

        );
    }

    public static function provideTestCreate() {
        return array(
            array(4, 'foo', SHA256::getPrefix() . 'rounds=1000$................$expjG7P4AN4svmCMHxzkAc.s8gNGp0fu4bYVVY8iQo1'),
            array(6, 'bar', SHA256::getPrefix() . 'rounds=1000$................$NYlBKYVTrvSD1CYbsBDngbAm7kyAJk/D9XX.3528r05'),
            array(8, 'baz', SHA256::getPrefix() . 'rounds=1000$................$sN32z5PIeyCOerA52tXRmNvbdcwPd/FqWAmZelaX9z6'),
        );
    }

    public static function provideTestVerifyFail() {
        return array(
            array(10, 'foo', SHA256::getPrefix() . 'rounds=1000$................$dxpjG7P4AN4svmCMHxzkAc.s8gNGp0fu4bYVVY8iQo1'),
            array(12, 'bar', SHA256::getPrefix() . 'rounds=1001$................$NYlBKYVTrvSD1CYbsBDngbAm7kyAJk/D9XX.3528r05'),
            array(14, 'baz', SHA256::getPrefix() . 'rounds=1000$...............1$sN32z5PIeyCOerA52tXRmNvbdcwPd/FqWAmZelaX9z6'),
        );
    }

    public static function provideTestVerifyFailException() {
        return array(
            array(10, 'foo', SHA256::getPrefix() . 'rounds=1000$................$dxpjG7P4AN4svmCMHxzkAc.s8gNGp0fu4bYVVY'),
            array(12, 'bar', '$2b$04$......................wy8Ny4IYV94XATD85vz/zPNKyDLSamC'),
            array(14, 'baz', SHA256::getPrefix() . '02$......................wy8Ny4IYV94XATD85vz/zPNKyDLSamC'),
        );
    }

    public function testGetPrefix() {
        $this->assertEquals('$5$', SHA256::getPrefix());
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     * @dataProvider provideTestDetect
     */
    public function testDetect($from, $expect) {
        $this->assertEquals($expect, SHA256::detect($from));
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     */
    public function testLoadFromHash() {
        $test = SHA256::loadFromHash('$5$rounds=1000$................$0123456789012345678901234567890123456789123');
        $this->assertTrue($test instanceof SHA256);
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     * @expectedException InvalidArgumentException
     */
    public function testLoadFromHashFail() {
        SHA256::loadFromHash('foo');
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     */
    public function testConstruct() {
        $hash = new SHA256();
        $this->assertTrue($hash instanceof SHA256);
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     */
    public function testConstructArgs() {
        $iterations = 10;
        $gen = $this->getRandomGenerator(function($size) {});
        $apr = new SHA256($iterations, $gen);
        $this->assertTrue($apr instanceof SHA256);
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     * @expectedException InvalidArgumentException
     */
    public function testConstructFailFail() {
        $hash = new SHA256(40);
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     */
    public function testCreateAndVerify() {
        $hash = new SHA256(10);
        $test = $hash->create('Foobar');
        $this->assertTrue($hash->verify('Foobar', $test));
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     * @dataProvider provideTestCreate
     */
    public function testCreate($iterations, $pass, $expect) {
        $apr = $this->getSHA256MockInstance($iterations);
        $this->assertEquals($expect, $apr->create($pass));
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     * @dataProvider provideTestCreate
     */
    public function testVerify($iterations, $pass, $expect) {
        $apr = $this->getSHA256MockInstance($iterations);
        $this->assertTrue($apr->verify($pass, $expect));
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     * @dataProvider provideTestVerifyFail
     */
    public function testVerifyFail($iterations, $pass, $expect) {
        $apr = $this->getSHA256MockInstance($iterations);
        $this->assertFalse($apr->verify($pass, $expect));
    }

    /**
     * @covers PasswordLib\Password\Implementation\SHA256
     * @dataProvider provideTestVerifyFailException
     * @expectedException InvalidArgumentException
     */
    public function testVerifyFailException($iterations, $pass, $expect) {
        $apr = $this->getSHA256MockInstance($iterations);
        $apr->verify($pass, $expect);
    }

    protected function getSHA256MockInstance($iterations) {
        $gen = $this->getRandomGenerator(function($size) {
            return str_repeat(chr(0), $size);
        });
        return new SHA256($iterations, $gen);
    }

    protected function getSHA256Instance($evaluate, $hmac, $generate) {
        $generator = $this->getRandomGenerator($generate);
        return new SHA256(10, $generator);
    }

    protected function getRandomGenerator($generate) {
        return new MockGenerator(array(
            'generate' => $generate
        ));
    }

}


text: Rails.application.config.assets.precompile << 'solidus_frontend_manifest.js'


text:
/*
 * Use the Page Object pattern to define the page under test.
 * See docs/coding-guide/e2e-tests.md for more info.
 */

export class HomePage {
  url = '/home';

  get welcomeText() {
<% if (props.ui === 'ionic') { -%>
    return cy.get('app-root ion-card-title');
<% } else if (props.ui === 'material') { -%>
    return cy.get('app-root mat-card-title');
<% } else { -%>
    return cy.get('app-root h1');
<% } -%>
  }
}


text:
RIGMACHINE
=======================

Introduction
------------
wopwop


text:
package com.github.mkolisnyk.cucumber.runner;

import org.junit.Ignore;
import org.junit.runner.RunWith;

import cucumber.api.CucumberOptions;

@Ignore
@RunWith(ExtendedCucumber.class)
@ExtendedCucumberOptions(jsonReport = "target/cucumber.json", retryCount = 3, detailedReport = true, detailedAggregatedReport = true, overviewReport = false, toPDF = false, outputFolder = "target")
@CucumberOptions(
        features = { "./src/test/java/com/github/mkolisnyk/cucumber/features" },
        glue = { "com/github/mkolisnyk/cucumber/steps" },
        plugin = {
        "json:target/cucumber.json", "html:target/cucumber-html-report",
        "pretty:target/cucumber-pretty.txt",
        "usage:target/cucumber-usage.json",
        "junit:target/cucumber-junit-results.xml" }, tags = {})
public class CucumberRunnerTest {
}


text:
package com.ociweb.iot.grove.six_axis_accelerometer;

public interface TempValsListener {
}


text:
/* tslint:disable */
/* eslint-disable */
// @generated
// This file was automatically generated and should not be edited.

// ====================================================
// GraphQL mutation operation: createUserMessageChannelMutation
// ====================================================

export interface createUserMessageChannelMutation_create_user_message_channel_channel {
  __typename: "Channel";
  href: string | null;
}

export interface createUserMessageChannelMutation_create_user_message_channel {
  __typename: "CreateUserMessageChannelMutationPayload";
  channel: createUserMessageChannelMutation_create_user_message_channel_channel;
}

export interface createUserMessageChannelMutation {
  create_user_message_channel: createUserMessageChannelMutation_create_user_message_channel | null;
}

export interface createUserMessageChannelMutationVariables {
  id: string;
}


text:
<link rel="stylesheet" href="{{doc_root}}/admin/css/page.css" type="text/css" />
<link rel="stylesheet" href="{{doc_root}}/admin/css/table_jui.css" type="text/css" />
<link rel="stylesheet" href="{{doc_root}}/admin/css/flick/jquery-ui.css" type="text/css" />
<script type="text/javascript" src="{{doc_root}}/admin/js/jquery-ui.js"></script>
<script type="text/javascript" src="{{doc_root}}/admin/js/jquery.dataTables.min.js"></script>


text:
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCardTaskTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('card_task', function (Blueprint $table) {
            $table->increments('id');

            $table->integer('card_id')->unsigned();
            $table->foreign('card_id')->references('id')->on('board_card');
            $table->integer('user_id')->unsigned();
            $table->foreign('user_id')->references('id')->on('users');

            $table->string('task_title');
            $table->timestamp('due_date');
            $table->boolean('is_completed');
            $table->timestamp('date_completed');
            $table->text('result');
            $table->boolean('email_sent');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('card_task');
    }
}