text:
<#
function Set-PSUtilLogFile ([string]$file, [switch] $delete)
{
    Write-Verbose "New log file is '$file'"
    $global:_PsUtilOptions.LogFile = $file
    if ($delete)
    {
        del $global:_PsUtilOptions.LogFile -ea 0
    }
}
#>
if (! $global:_PsUtilOptions) {
    $global:_PsUtilOptions = @{
        TimeStamp = $true
        LogFile = 'psutil.log'
    }
}

function Set-PSUtilLogFile ([string]$file, [switch] $delete)
{
    Write-Verbose "New log file is '$file'"
    $global:_PsUtilOptions.LogFile = $file
    if ($delete)
    {
        del $global:_PsUtilOptions.LogFile -ea 0
    }
}

function Set-PSUtilTimeStamp ($TimeStamp)
{
    $global:_PsUtilOptions.TimeStamp = $TimeStamp
}

function Get-PSUtilOptions ()
{
    return $_PsUtilOptions
}

function Write-PSUtilLog ()
{
    [CmdletBinding()]
    param (
        [parameter(ValueFromPipeline=$true)]
        [string]$st,
        [ConsoleColor]$color = 'White'
    )
    PROCESS {
        if ($_PsUtilOptions.TimeStamp) {
            $time = "$((Get-date).ToLongTimeString()) "
        } else {
            $time = ''
        }
        if ($st.Length -gt 0)
        {
            $message = "$time$st"
        }
        else
        {
            $message = $st
        }
        Write-Host $message -ForegroundColor $color
        $message >> $global:_PsUtilOptions.LogFile
    }
}


text:
function SlotMachine(option) {
  option = option || {};
  var me = this,
    emptyFn = function () {
    },
    lightEl = option.lightEl,
    sliderA = option.sliderA,
    sliderB = option.sliderB,
    sliderC = option.sliderC,
    sliderList = option.sliderList,
    slotUI = option.slotUI,
    GlobalTouch = option.GlobalTouch,
    sliderTpl = option.sliderTpl,
    lightTimer = 0,
    lightUpeateTime = 0,
    lightStoped = true,
    lightDuration = 350,
    dataLen = 0,
    listHeight = 0,
    twoSameCount = 0,//失败时两个同时出现计数
    moveLen = {},
    winIndex = 0,
    itemIndex = 0,
    data;

  var listLen = option.listLen || 15,//默认组数,全部奖品为一组,一共20组
    wrapHeight = option.wrapHeight || 200,//可视区高度
    itemHeight = option.itemHeight || 83,//项高度
    extraMove = option.extraMove || 30,//额外移动距离,用于调整居中奖品
    moveDuration = option.moveDuration || 2.0,//移动 毫秒每像素
    minMove = option.minMove || 10;//最小滚动15组

  var onPlay = option.onPlay || emptyFn,
    onEndPlay = option.onEndPlay || emptyFn,
    onReset = option.onReset || emptyFn,
    onLighting = option.onLighting || emptyFn;

  this.locked = false;

  this.play = function (index) {
    if (me.locked) {
      return;
    }
    onPlay();
    itemIndex = index;
    var sfn = slideLose;
    if (itemIndex != null) {
      sfn = slideWin;
    } else {
      itemIndex = randomIndex(0, dataLen - 1);
    }
    setTimeout(function () {
      sfn();
    }, 1200);
    slotUI.currentScrollData = data[itemIndex];

    me.locked = true;
  }
  function computeMoveA() {
    winIndex = randomIndex(3, listLen - 1);
    while (winIndex >= (listLen - minMove)) {
      winIndex = randomIndex(3, listLen - 1);
    }
    moveLen.A = ( winIndex * dataLen + (itemIndex) ) * itemHeight - extraMove * 2;
  }

  function slideWin() {
    computeMoveA();
    moveLen.B = moveLen.A + ( randomBool() ? (dataLen * itemHeight) : ( randomBool() ? (-dataLen * itemHeight) : 0 ) );
    moveLen.C = moveLen.A + ( randomBool() ? (dataLen * itemHeight) : ( randomBool() ? (-dataLen * itemHeight) : 0 ) );
    twoSameCount++;

    startMove();
  }

  function slideLose() {
    computeMoveA();
    var _list = ['B', 'C'],
      rs = [];
    rs = _list.sort(function () {
      return randomBool();
    });

    var tmpSame = randomBool(),
      tmpIndex = randomIndex(0, dataLen - 1),
      loseIndex = itemIndex;
    while (loseIndex == itemIndex) {//最后一个不会跟第一个相同
      loseIndex = randomIndex(0, dataLen - 1);
    }
    if (tmpIndex != loseIndex && twoSameCount < (dataLen / 2) && !tmpSame && tmpIndex != itemIndex) {//至少出现2个相同dataLen/2次才考虑出现三个不同
      loseIndex = tmpIndex;
    }
    moveLen[rs[0]] = tmpSame
      ? moveLen.A + ( randomBool() ? (dataLen * itemHeight) : (-dataLen * itemHeight) )
      : ( ( winIndex * dataLen + ( tmpIndex + ( randomBool() ? dataLen : 0) ) ) * itemHeight - extraMove * 2 );
    moveLen[rs[1]] = ( winIndex * dataLen + ( loseIndex + ( randomBool() ? dataLen : 0) ) ) * itemHeight - extraMove * 2;
    if (tmpSame || itemIndex == tmpIndex) {
      twoSameCount++;
      slotUI.currentScrollData = data[itemIndex];
    } else if (tmpIndex == loseIndex) {
      twoSameCount++;
      slotUI.currentScrollData = data[loseIndex];
    } else {
      twoSameCount = 0;
      slotUI.currentScrollData = null;
    }

    startMove();
  }

  function startMove() {
    var _list = [
        {el: sliderB, move: moveLen.B, time: moveDuration * moveLen.B},
        {el: sliderC, move: moveLen.C, time: moveDuration * moveLen.C},
      ],
      rs = [];
    rs = _list.sort(function () {
      return randomBool();
    });

    moveTo({el: sliderA, move: moveLen.A, time: moveDuration * moveLen.A});
    setTimeout(function () {
      moveTo(rs[0]);
    }, 500);
    setTimeout(function () {
      moveTo(rs[1]);
    }, 900);

    startLight();
  }

  this.renderList = function () {
    me.hide();
    data = slotUI.slotChildData;
    dataLen = data.length;
    if (dataLen > 4 && 10 > dataLen - 4) {
      listLen = 15 - (dataLen - 4);
      minMove = 10 - (dataLen - 4);
    }

    var sList = [],
      finalList = [],
      finalHTML,
      total = parseInt(listLen);

    for (var i = 0; i < dataLen; i++) {
      sList.push(sliderTpl({IMG: data[i].image}));
    }
    while (total) {
      finalList.push('
');
      finalList.push(sList.join(''));
      finalList.push('
');
      total--;
    }
    finalHTML = finalList.join('');
    sliderA.html(finalHTML);
    sliderB.html(finalHTML);
    sliderC.html(finalHTML);
    me.reset();
    me.show();
  }
  function moveTo(option) {
    //http://stackoverflow.com/questions/7466070/how-can-i-achieve-a-slot-machine-spinning-effect-with-css3-jquery?rq=1
    option.el.css({
      '-webkit-transform': 'translate3D(0px,' + -option.move + 'px,0px)',
      '-webkit-transition': '-webkit-transform ' + option.time + 'ms ease-in-out'
    });
  }

  this.reset = function () {
    GlobalTouch.preventMove = false;
    stopLight();
    me.locked = false;
    listHeight = itemHeight * dataLen * listLen;
    var move = listHeight - (wrapHeight + itemHeight - extraMove * 2);
    moveTo({el: sliderA, move: move, time: 0});
    moveTo({el: sliderB, move: move, time: 0});
    moveTo({el: sliderC, move: move, time: 0});
    sliderList.removeClass('fadein');
    setTimeout(function () {
      sliderList.addClass('fadein');
    }, 0);
    onReset();
  }
  this.show = function () {
    sliderList.show();
  }
  this.hide = function () {
    sliderList.hide();
  }
  function startLight() {
    lightDuration = 200;
    me.doLight();
    var lastTime = ( Math.max(Math.max(moveLen.A, moveLen.B + 900), moveLen.C + 500) ) * moveDuration;
    secTime = ( Math.min(Math.min(moveLen.A, moveLen.B + 900), moveLen.C + 500) ) * moveDuration;
    setTimeout(function () {
      lightDuration = 600;
    }, secTime);
    setTimeout(function () {
      stopLight();
      onEndPlay();
    }, lastTime - 800);
  }

  function stopLight() {
    lightStoped = true;
    GlobalTouch.preventMove = false;
    lightUpeateTime = 0;
    setTimeout(function () {
      lightDuration = 350;
      lightEl.removeClass('off on');
    }, 600);
  }

  function animateLight() {
    var _nd = new Date().getTime();
    if (_nd - lightUpeateTime >= lightDuration) {
      lightUpeateTime = _nd;
      if (lightEl.hasClass('on')) {
        lightEl.removeClass('on').addClass('off');
      } else if (lightEl.hasClass('off')) {
        lightEl.removeClass('off').addClass('on');
      } else {
        lightEl.addClass('on');
      }
    }
  }

  this.doLight = function () {
    window.scrollTo(0, 1);
    lightStoped = false;
    GlobalTouch.preventMove = true;
    (function animloop() {
      if (lightStoped) {
        lightTimer && cancelRequestAnimFrame(lightTimer);
        lightUpeateTime = 0;
        return;
      }
      lightTimer = requestAnimFrame(animloop);
      animateLight();
    })();
    onLighting();
  }

  function randomIndex(from, to) {
    from = from || 0;
    to = to || 0;
    return Math.floor(Math.random() * (to - from + 1) + from);
  }

  function randomBool() {
    return (0.5 > Math.random());
  }
}//end SlotMachine
module.exports = SlotMachine;

redpajama_set_name: RedPajamaGithub


text:
package br.ufjf.parsifal.model;

/**
 *
 * @author vitorfs
 */
public class SelectionCriteria {

    private Integer id;
    private String criteria_type;
    private String description;
    private Integer review;

    /**
     * @return the id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return the criteria_type
     */
    public String getCriteria_type() {
        return criteria_type;
    }

    /**
     * @param criteria_type the criteria_type to set
     */
    public void setCriteria_type(String criteria_type) {
        this.criteria_type = criteria_type;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the review
     */
    public Integer getReview() {
        return review;
    }

    /**
     * @param review the review to set
     */
    public void setReview(Integer review) {
        this.review = review;
    }

}


text:
class Bar: pass

def func(foo):
    """
    Parameters:
      foo (Bar): ignored
    """
    pass


text:
@interface CCBPEffectLighting : CCEffectLighting <EffectProtocol>

@end


text:
<?php
/**
 *
 */
class Validationform extends CI_Controller
{

  public function index()
	{
    if(isset($_POST['demandeur'])){
      $this->validation();
    } else {
      redirect('formNewLongueur', 'refresh');
    }
	}

  public function validation(){

    /*** table wa_nouvelle_longueur ***/
    $demandeur = $_POST['demandeur'];
    $motif_demande = $_POST['motif_demande'];
    $code_article_citis = $_POST['code_article_citis'];
    $libelle_article_citis = $_POST['libelle_article_citis'];

    /*** table wa_longueur ***/
    $longueur_en_m = $_POST['longueur_en_m'];
    $ref_article_client = $_POST['ref_article_client'];
    $gencod_client = $_POST['gencod_client'];

    /* instanciation des model du framework */
    $this->load->model('nouvelle_longueur_model', 'nouvelleLongueur');
    $this->load->model('longueur_model', 'longueur');

    $resultatNouvelleLongueur = $this->nouvelleLongueur->add_nouvelle_longueur($demandeur, $motif_demande, $code_article_citis, $libelle_article_citis);
    $last_id_insert_nouvelle_longueur = $this->nouvelleLongueur->get_last_id_nouvelle_longueur();
    $last_id_insert_nouvelle_longueur = $last_id_insert_nouvelle_longueur[0]->id_nouvelle_longueur;

    $nbreLongueur = count($longueur_en_m);
    //exit;

    /* par rapport au dernier ID insérer on ajoute dans la table wa_longueur_traitement les champs */
    for ($i=0; $i < $nbreLongueur; $i++) {
      $resultatLongueur = $this->longueur->add_longueur($last_id_insert_nouvelle_longueur, $longueur_en_m[$i], $ref_article_client[$i], $gencod_client[$i]);
    }

    if($resultatNouvelleLongueur == 'true'){
      $data['alert'] = 'true';
      $data['contenu_alert'] = 'La requête d\'insertion a bien été enregistré';
      $this->send_mail($demandeur, $motif_demande, $code_article_citis, $libelle_article_citis);
    } else {
      $data['alert'] = 'false';
      $data['contenu_alert'] = 'une erreur est survenu lors du traitement de la demande';
    }

    $data['title'] = 'Creation nouvelle longueur';
    $this->load->view('header-footer/header.php', $data);
    $this->load->view('form/formNewLongueur/formulaire', $data);
    $this->load->view('header-footer/footer.php');

	}

  public function send_mail($demandeur, $motif_demande, $code_article_citis, $libelle_article_citis){
    $config = Array(
                    'protocol' => 'mail',
                    'mail_host' => 'ExchangeISB.isb.groupe-isb.fr',
                    'mail_port' => 25001,
                    'mail_user' => '',
                    'mail_pass' => '',
                    'mailtype'  => 'html',
                    'charset'   => 'utf-8',
                    'wrapchars' => 76,
                    'newline'   => '\r\n'
                );
    $this->load->library('email', $config);
    $email = $this->email;

    $this->load->library('envoie_email');

    $this->envoie_email->send_mail_for_new_longueur($email, $demandeur, $motif_demande, $code_article_citis, $libelle_article_citis);
	}

}


text:
export function getHost(node) {
    if (!node) {
        throw new Error('Attempting to process a falsy value');
    }
    let parentNode = node;
    while (parentNode && !isShadowRoot(parentNode)) {
        node = parentNode;
        parentNode = node.parentNode;
    }
    return parentNode? parentNode.host : parentNode;
}

function isShadowRoot(node) {
    return node instanceof ShadowRoot;
}


text:
// Author: Alex Edwards
// User Interface
/*
  disentangle <FILE/DIR> <FILE/DIR>
    stops the mirroring of file/directory pairs
*/

public class DisentangleClient {
  public static void main(String[] args){
    switch(args.length){
      case 2: attemptToDisentanglePair(args[0], args[1]); break;
      default: printHelp(); break;
    }
  }
  public static void printHelp(){
    System.out.print(
      "Usage:\n\tdisentangle <FILE/DIR> <FILE/DIR>\n\t\tstops the mirroring of file/directory pairs\n"
    );
  }
  public static void attemptToDisentanglePair(String fileA, String fileB){
    System.out.println(fileA + "\n" + fileB);
  }
}


text:
/* A lot of code below is taken from AFNetworkActivityLogger.m */

@import CocoaLumberjack;
#import "MMXLogger.h"
#import <objc/runtime.h>

//#undef LOG_LEVEL_DEF // Undefine first only if needed
//#define LOG_LEVEL_DEF myLibLogLevel
//static const int myLibLogLevel = LOG_LEVEL_VERBOSE;

NSString * const MMXLoggingConfigKeyRollingFrequency = @"rollingFrequencyInMin";
int const MMXLoggingConfigDefaultRollingFrequency = 86400;  // 60 * 60 * 24 = one day

NSString * const MMXLoggingConfigKeyMaximumFileSize = @"maximumFileSizeInK";
int const MMXLoggingConfigDefaultMaximumFileSize = 2048;  // 2M

NSString * const MMXLoggingConfigKeyMaximumNumberOfLogFiles = @"maximumNumberOfLogFiles";
int const MMXLoggingConfigDefaultMaximumNumberOfLogFiles = 7;

static int ddLogLevel;
static DDFileLogger *fileLogger;

@interface MMXLogger ()
- (void)setupLogging;

- (void)setupTTYLogging;

@end

@implementation MMXLogger

+ (instancetype)sharedLogger {
    static MMXLogger *_sharedLogger = nil;

    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _sharedLogger = [[self alloc] init];
    });

    return _sharedLogger;
}

- (id)init {
    self = [super init];
    if (!self) {
        return nil;
    }

    self.level = MMXLoggerLevelInfo;
    self.options = MMXTTYLogging;

    return self;
}

- (void)dealloc {
    [self stopLogging];
}

- (void)startLogging {
    // Stop before you start
    [self stopLogging];

    [self setupLogging];

    [self info:@"Start logging"];
}

- (void)stopLogging {
    [DDLog removeAllLoggers];
    [[NSNotificationCenter defaultCenter] removeObserver:self];

    [self info:@"Stop logging"];
}

- (void)error:(NSString *)message, ... {
    va_list args;
    va_start(args, message);
    va_end(args);
    [self error:message args:args];
}

- (void)error:(NSString *)message args:(va_list)args {
    DDLogError(@"[ERROR] %@", [[NSString alloc] initWithFormat:message arguments:args]);
}

- (void)warn:(NSString *)message, ... {
    va_list args;
    va_start(args, message);
    va_end(args);
    [self warn:message args:args];
}

- (void)warn:(NSString *)message args:(va_list)args {
    DDLogWarn(@"[WARN] %@", [[NSString alloc] initWithFormat:message arguments:args]);
}

- (void)info:(NSString *)message, ... {
    va_list args;
    va_start(args, message);
    va_end(args);
    [self info:message args:args];
}

- (void)info:(NSString *)message args:(va_list)args {
    DDLogInfo(@"[INFO] %@", [[NSString alloc] initWithFormat:message arguments:args]);
}

- (void)debug:(NSString *)message, ... {
    va_list args;
    va_start(args, message);
    va_end(args);
    [self debug:message args:args];
}

- (void)debug:(NSString *)message args:(va_list)args {
    DDLogDebug(@"[DEBUG] %@", [[NSString alloc] initWithFormat:message arguments:args]);
}

- (void)verbose:(NSString *)message, ... {
    va_list args;
    va_start(args, message);
    va_end(args);
    [self verbose:message args:args];
}

- (void)verbose:(NSString *)message args:(va_list)args {
    DDLogVerbose(@"[VERBOSE] %@", [[NSString alloc] initWithFormat:message arguments:args]);
}

#pragma mark - Private implementation

- (void)setupLogging {
    switch (self.level) {
        case MMXLoggerLevelOff:{
            ddLogLevel = DDLogLevelOff;
            break;
        }
        case MMXLoggerLevelVerbose: {
            ddLogLevel = DDLogLevelVerbose;
            break;
        }
        case MMXLoggerLevelDebug:{
            ddLogLevel = DDLogLevelDebug;
            break;
        }
        case MMXLoggerLevelInfo:{
            ddLogLevel = DDLogLevelInfo;
            break;
        }
        case MMXLoggerLevelWarn:{
            ddLogLevel = DDLogLevelWarning;
            break;
        }
        case MMXLoggerLevelError:{
            ddLogLevel = DDLogLevelError;
            break;
        }
    }

    [self setupTTYLogging];

    BOOL shouldLogToFile = (self.options & MMXFileLogging);
    if(shouldLogToFile) {
        [self setupFileLogging];
    }
}

- (void)setupFileLogging {
    fileLogger = [[DDFileLogger alloc] init];
    NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"LoggingConfigurations" ofType:@"plist"];
    NSDictionary *configs = [NSDictionary dictionaryWithContentsOfFile:path];
    int rollingFrequency = configs[MMXLoggingConfigKeyRollingFrequency] ? [configs[MMXLoggingConfigKeyRollingFrequency] intValue] : MMXLoggingConfigDefaultRollingFrequency;
    int maxFileSize = configs[MMXLoggingConfigKeyMaximumFileSize] ? [configs[MMXLoggingConfigKeyMaximumFileSize] intValue] : MMXLoggingConfigDefaultMaximumFileSize;
    int maxFiles = configs[MMXLoggingConfigKeyMaximumNumberOfLogFiles] ? [configs[MMXLoggingConfigKeyMaximumNumberOfLogFiles] intValue] : MMXLoggingConfigDefaultMaximumNumberOfLogFiles;
    [fileLogger setRollingFrequency:rollingFrequency * 60];
    [fileLogger setMaximumFileSize:maxFileSize * 1024];
    [fileLogger.logFileManager setMaximumNumberOfLogFiles:maxFiles];

    [DDLog addLogger:fileLogger];

    [self info:@"Logging is setup (\"%@\")", [fileLogger.logFileManager logsDirectory]];
}

- (void)setupTTYLogging {
    BOOL shouldLogToConsole = (self.options & MMXTTYLogging);
    if (shouldLogToConsole) {
        [DDLog addLogger:[DDTTYLogger sharedInstance]];
    }
}

@end


text:
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.Design.NoActionBar">
        <!-- Customize your theme here. -->

    </style>

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>

    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

    <style name="ImageTranslucentTheme" parent="AppTheme">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowBackground">@drawable/login_splash</item>
        <item name="android:launchMode">singleTask</item>
        <item name="android:screenOrientation">portrait</item>
        <!--<item name="android:windowIsTranslucent">true</item>-->
        <!--在Android 4.4之前的版本上运行,直接跟随系统主题-->
    </style>

    <style name="SplashTheme" parent="AppTheme">
        <item name="android:windowActionBar">false</item>
        <item name="android:windowFullscreen">false</item>
        <item name="android:windowBackground">@drawable/login_splash</item>
        <item name="android:launchMode">singleTask</item>
        <item name="android:screenOrientation">portrait</item>
    </style>

    <style name="NormalTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowActionBar">false</item>
        <item name="android:windowFullscreen">true</item>
    </style>

    <style name="ToolbarStyle" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
        <item name="actionBarItemBackground">@drawable/toolbarItemBackground</item>
        <item name="selectableItemBackground">@drawable/toolbarItemBackground</item>
        <item name="titleTextAppearance">@style/ToolBar.Title</item>
        <item name="subtitleTextAppearance">@style/Toolbar.SubTitle</item>
        <item name="android:windowNoTitle">true</item>
    </style>

    <style name="ToolBar.Title" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Title">
        <item name="android:textSize">17.0sp</item>
        <item name="android:textColor">@color/toolbarTextColor</item>
    </style>

    <style name="Toolbar.SubTitle" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Subtitle">
        <item name="android:textSize">12.0sp</item>
        <item name="android:textColor">#ff928e91</item>
    </style>

    <style name="Base.AppTheme" parent="@style/Theme.AppCompat.Light">
        <item name="android:windowBackground">@color/normalBackground</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:fadingEdgeLength">0.0dip</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <!--<item name="windowActionModeOverlay">true</item>-->
        <!--<item name="searchViewStyle">@style/MySearchViewStyle</item>-->
        <!--<item name="colorPrimary">@color/theme_color_Primary</item>-->
        <!--<item name="colorPrimaryDark">@color/theme_color_PrimaryDark</item>-->
        <!--<item name="colorAccent">@color/theme_color_PrimaryAccent</item>-->
    </style>

    <style name="MySearchViewStyle" parent="@style/Widget.AppCompat.SearchView" />

    <style name="anim_menu_bottombar">
        <item name="android:windowEnterAnimation">@anim/menu_bottombar_in</item>
        <item name="android:windowExitAnimation">@anim/menu_bottombar_out</item>
    </style>

    <style name="SplashTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

    <style name="SplashTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

    <style name="FullscreenTheme" parent="SplashTheme">
        <item name="android:actionBarStyle">@style/FullscreenActionBarStyle</item>
        <item name="android:windowActionBarOverlay">true</item>
        <item name="android:windowBackground">@null</item>
        <item name="metaButtonBarStyle">?android:attr/buttonBarStyle</item>
        <item name="metaButtonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
    </style>

    <style name="FullscreenActionBarStyle" parent="Widget.AppCompat.ActionBar">
        <item name="android:background">@color/black_overlay</item>
    </style>

    <style name="PopupAnimation" parent="android:Animation">
        <item name="android:windowEnterAnimation">@anim/push_bottom_in</item>
        <item name="android:windowExitAnimation">@anim/push_bottom_out</item>
    </style>

    <style name="LetterIndexTextViewStyle">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:paddingLeft">16dp</item>
        <item name="android:paddingRight">@dimen/side_letter_bar_width</item>
        <item name="android:paddingTop">8dp</item>
        <item name="android:paddingBottom">8dp</item>
        <item name="android:textSize">16sp</item>
        <item name="android:textColor">@color/gray</item>
    </style>

    <!-- styles -->
    <style name="UserInfo" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/user_color</item>
        <item name="colorPrimaryDark">@color/user_color</item>
    </style>

    <style name="TextDefault">
        <item name="android:textSize">16sp</item>
        <item name="android:textColor">#d1000000</item>
    </style>

</resources>


text:
<?xml version="1.0" standalone="no"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<testcase>
  <info>
    <p>
      This test checks that IDs coming from images properly appear in the IF output.
    </p>
  </info>
  <fo>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
        <fo:simple-page-master master-name="page"
          page-height="320pt" page-width="420pt" margin="10pt">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>

      <fo:page-sequence master-reference="page">
        <fo:flow flow-name="xsl-region-body" text-align="justify">
          <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
            bibendum auctor. <fo:external-graphic src="../resources/images/fop-logo-color-24bit.png"
              id="external-graphic"/>Vivamus porttitor sollicitudin tortor eu vulputate. In vel
            libero libero, a semper est.</fo:block>
        </fo:flow>
      </fo:page-sequence>

      <fo:page-sequence master-reference="page">
        <fo:flow flow-name="xsl-region-body" text-align="justify">
          <fo:block>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce rutrum leo a diam
            bibendum auctor. <fo:instream-foreign-object id="instream-foreign-object" width="120pt"
              display-align="center" content-width="scale-to-fit">
              <svg xmlns="http://www.w3.org/2000/svg" width="300" height="286.6">
                <g style="fill-opacity:0.7; stroke:black; stroke-width:3"
                  transform="translate(0, 286.6) scale(1, -1) translate(100, 100)">
                  <circle cx="50"  cy="86.6" r="80" style="fill:red;"/>
                  <circle cx="0"   cy="0"    r="80" style="fill:green;"/>
                  <circle cx="100" cy="0"    r="80" style="fill:blue;"/>
                </g>
              </svg>
            </fo:instream-foreign-object> Vivamus porttitor sollicitudin tortor eu vulputate. In vel
            libero libero, a semper est.</fo:block>
        </fo:flow>
      </fo:page-sequence>

    </fo:root>
  </fo>
  <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">

    <!-- Page 1 -->
    <eval expected="7"          xpath="count(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'])"/>

    <eval expected="text"  xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][1])"/>
    <eval expected="text"  xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][2])"/>
    <eval expected="id"    xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][3])"/>
    <eval expected="image" xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][4])"/>
    <eval expected="id"    xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][5])"/>
    <eval expected="text"  xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][6])"/>
    <eval expected="text"  xpath="local-name(//if:page-sequence[1]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][7])"/>

    <eval expected="external-graphic" xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][1]/@name"/>
    <eval expected=""                 xpath="//if:page-sequence[1]/descendant::*[local-name() = 'id'][2]/@name"/>

    <!-- Page 2 -->
    <eval expected="7"          xpath="count(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'])"/>

    <eval expected="text"  xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][1])"/>
    <eval expected="text"  xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][2])"/>
    <eval expected="id"    xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][3])"/>
    <eval expected="image" xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][4])"/>
    <eval expected="id"    xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][5])"/>
    <eval expected="text"  xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][6])"/>
    <eval expected="text"  xpath="local-name(//if:page-sequence[2]/descendant::*[local-name() = 'text' or local-name() = 'image' or local-name() = 'id'][7])"/>

    <eval expected="instream-foreign-object" xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][1]/@name"/>
    <eval expected=""                        xpath="//if:page-sequence[2]/descendant::*[local-name() = 'id'][2]/@name"/>

  </if-checks>
</testcase>


text:
package cn.xmut.experiment.dao.impl.jdbc;

import java.io.File;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.fileupload.FileItem;

import cn.xmut.experiment.dao.IExperimentDao;
import cn.xmut.experiment.domain.Experiment;
import cn.xmut.experiment.domain.ShowExperiment;
import cn.xmut.experiment.util.JdbcUtils;

public class ExperimentDaoImpl implements IExperimentDao {

	public boolean addExperiment(Experiment experiment,String docName, String dirPath, FileItem fileItem) {
		Connection conn = null;
		PreparedStatement ps = null;
		boolean b = false;
		try {
			File dir = new File(dirPath);
			File file = new File(dir, docName);
			String docPath = file.getAbsolutePath();
			conn = JdbcUtils.getConnection();
			conn.setAutoCommit(false);
			StringBuilder sql = new StringBuilder();
			sql.append("INSERT INTO experiment(experimentName,courseId,experimentCategory,specialtyId,");
			sql.append("experimentDemand,creditHours,openTimeId,introduction,docPath,experimentType,teacherId) ");
			sql.append("VALUES(?,?,?,?,?,?,?,?,?,?,?)");
			ps = conn.prepareStatement(sql.toString());
			ps.setString(1, experiment.getExperimentName());
			ps.setInt(2, experiment.getCourseId());
			ps.setString(3, experiment.getExperimentCategory());
			ps.setInt(4, experiment.getSpecialtyId());
			ps.setString(5, experiment.getExperimentDemand());
			ps.setInt(6, experiment.getCreditHours());
			ps.setInt(7, experiment.getOpenTimeId());
			ps.setString(8, experiment.getIntroduction());
			ps.setString(9, docPath);
			ps.setString(10, experiment.getExperimentType());
			ps.setString(11, experiment.getTeacherId());
			int result = ps.executeUpdate();
			if(result == 1) {
				if (!file.getParentFile().exists()) {
					file.getParentFile().mkdirs();
				}
				fileItem.write(file);
			}
			conn.commit();
			b = true;
		} catch (Exception e) {
			try {
				conn.rollback();
			} catch (SQLException e1) {
				e1.printStackTrace();
			}
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, ps, conn);
		}
		return b;
	}

	public boolean updateExperiment(Experiment experiment) {
		Connection conn = null;
		PreparedStatement ps = null;
		boolean b = false;
		try {
			conn = JdbcUtils.getConnection();
			ps = conn.prepareStatement("UPDATE experiment SET appraisalStatus=?,experimentType=? WHERE experimentId=?");
			ps.setString(1, experiment.getAppraisalStatus());
			ps.setString(2, experiment.getExperimentType());
			ps.setInt(3, experiment.getExperimentId());
			int result = ps.executeUpdate();
			if(result == 1) {
				b = true;
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, ps, conn);
		}
		return b;
	}

	public String getDocPath(int experimentId) {
		Connection conn = null;
		PreparedStatement ps = null;
		ResultSet rs = null;
		String docPath = null;
		try {
			conn = JdbcUtils.getConnection();
			ps = conn.prepareStatement("SELECT docPath FROM experiment WHERE experimentId=?");
			ps.setInt(1, experimentId);
			rs = ps.executeQuery();
			if(rs.next()) {
				docPath = rs.getString(1);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, ps, conn);
		}
		return docPath;
	}

	public Experiment getExperiment(int experimentId) {
		Connection conn = null;
		PreparedStatement ps = null;
		ResultSet rs = null;
		Experiment experiment = new Experiment();
		experiment.setExperimentId(experimentId);
		try {
			conn = JdbcUtils.getConnection();
			StringBuilder sql = new StringBuilder();
			sql.append("SELECT courseName,experimentName,experimentCategory,schoolYear,schoolTerm,");
			sql.append("experimentDemand,specialtyName,creditHours,experimentType,introduction ");
			sql.append("FROM experiment,course,specialty,openTime ");
			sql.append("WHERE experiment.courseId=course.courseId AND experiment.specialtyId=specialty.specialtyId ");
			sql.append("AND experiment.openTimeId=openTime.openTimeId AND experimentId=?");
			ps = conn.prepareStatement(sql.toString());
			ps.setInt(1, experimentId);
			rs = ps.executeQuery();
			if(rs.next()) {
				experiment.setCourseName(rs.getString(1));
				experiment.setExperimentName(rs.getString(2));
				experiment.setExperimentCategory(rs.getString(3));
				experiment.setSchoolYear(rs.getString(4));
				experiment.setSchoolTerm(rs.getInt(5));
				experiment.setExperimentDemand(rs.getString(6));
				experiment.setSpecialtyName(rs.getString(7));
				experiment.setCreditHours(rs.getInt(8));
				experiment.setExperimentType(rs.getString(9));
				experiment.setIntroduction(rs.getString(10));
			}

		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, ps, conn);
		}
		return experiment;
	}

	public List<ShowExperiment> queryPass(Experiment experiment) {
		Connection conn = null;
		PreparedStatement ps = null;
		ResultSet rs = null;
		List<ShowExperiment> list = new ArrayList<ShowExperiment>();
		try {
			conn = JdbcUtils.getConnection();
			StringBuilder sql = new StringBuilder();
			sql.append("SELECT experimentId,experimentName ");
			sql.append("FROM experiment ");
			sql.append("WHERE appraisalStatus='通过' AND courseId=? ");
			sql.append("AND openTimeId=(SELECT openTimeId FROM openTime WHERE schoolYear=? AND schoolTerm=?)");
			ps = conn.prepareStatement(sql.toString());
			ps.setInt(1, experiment.getCourseId());
			ps.setString(2, experiment.getSchoolYear());
			ps.setInt(3, experiment.getSchoolTerm());
			rs = ps.executeQuery();
			while(rs.next()) {
				ShowExperiment showExperiment = new ShowExperiment();
				showExperiment.setExperimentId(rs.getInt(1));
				showExperiment.setExperimentName(rs.getString(2));
				list.add(showExperiment);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, ps, conn);
		}
		return list;
	}

	public List<ShowExperiment> queryNodistribute(Experiment experiment) {
		Connection conn = null;
		PreparedStatement ps = null;
		ResultSet rs = null;
		List<ShowExperiment> list = new ArrayList<ShowExperiment>();
		try {
			conn = JdbcUtils.getConnection();
			StringBuilder sql = new StringBuilder();
			sql.append("SELECT experimentId,experimentName ");
			sql.append("FROM experiment ");
			sql.append("WHERE courseId=? AND appraisalStatus IS NULL ");
			sql.append("AND openTimeId=(SELECT openTimeId FROM openTime WHERE schoolYear=? AND schoolTerm=?) ");
			sql.append("AND experimentId NOT IN (SELECT DISTINCT experimentId FROM appraisal)");
			ps = conn.prepareStatement(sql.toString());
			ps.setInt(1, experiment.getCourseId());
			ps.setString(2, experiment.getSchoolYear());
			ps.setInt(3, experiment.getSchoolTerm());
			rs = ps.executeQuery();
			while(rs.next()) {
				ShowExperiment showExperiment = new ShowExperiment();
				showExperiment.setExperimentId(rs.getInt(1));
				showExperiment.setExperimentName(rs.getString(2));
				list.add(showExperiment);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, ps, conn);
		}
		return list;
	}

	public List<ShowExperiment> expertQueryNoExtimate(Experiment experiment, String expertId) {
		Connection conn = null;
		PreparedStatement ps = null;
		ResultSet rs = null;
		List<ShowExperiment> list = new ArrayList<ShowExperiment>();
		try {
			conn = JdbcUtils.getConnection();
			StringBuilder sql = new StringBuilder();
			sql.append("SELECT experimentId,experimentName ");
			sql.append("FROM experiment WHERE courseId=? ");
			sql.append("AND experimentId IN(SELECT experimentId FROM appraisal WHERE expertId=? AND appraisal.experimentType IS NULL) ");
			sql.append("AND openTimeId=(SELECT openTimeId FROM openTime WHERE schoolYear=? AND schoolTerm=?)");
			ps = conn.prepareStatement(sql.toString());
			ps.setInt(1, experiment.getCourseId());
			ps.setString(2, expertId);
			ps.setString(3, experiment.getSchoolYear());
			ps.setInt(4, experiment.getSchoolTerm());
			rs = ps.executeQuery();
			while(rs.next()) {
				ShowExperiment showExperiment = new ShowExperiment();
				showExperiment.setExperimentId(rs.getInt(1));
				showExperiment.setExperimentName(rs.getString(2));
				list.add(showExperiment);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, ps, conn);
		}
		return list;
	}

	public List<ShowExperiment> managerQueryNoExtimate(Experiment experiment) {
		Connection conn = null;
		PreparedStatement ps = null;
		ResultSet rs = null;
		List<ShowExperiment> list = new ArrayList<ShowExperiment>();
		try {
			conn = JdbcUtils.getConnection();
			StringBuilder sql = new StringBuilder();
			sql.append("SELECT experimentId,experimentName ");
			sql.append("FROM experiment ");
			sql.append("WHERE courseId=? AND appraisalStatus IS NULL  ");
			sql.append("AND 3=(SELECT COUNT(*) FROM appraisal WHERE experiment.experimentId=appraisal.experimentId AND appraisal.appraisalStatus IS NOT NULL) ");
			sql.append("AND openTimeId=(SELECT openTimeId FROM openTime WHERE schoolYear=? AND schoolTerm=?)");
			ps = conn.prepareStatement(sql.toString());
			ps.setInt(1, experiment.getCourseId());
			ps.setString(2, experiment.getSchoolYear());
			ps.setInt(3, experiment.getSchoolTerm());
			rs = ps.executeQuery();
			while(rs.next()) {
				ShowExperiment showExperiment = new ShowExperiment();
				showExperiment.setExperimentId(rs.getInt(1));
				showExperiment.setExperimentName(rs.getString(2));
				list.add(showExperiment);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, ps, conn);
		}
		return list;
	}

	public List<ShowExperiment> managerQueryNoPass(Experiment experiment) {
		Connection conn = null;
		PreparedStatement ps = null;
		ResultSet rs = null;
		List<ShowExperiment> list = new ArrayList<ShowExperiment>();
		try {
			conn = JdbcUtils.getConnection();
			StringBuilder sql = new StringBuilder();
			sql.append("SELECT experimentId,experimentName ");
			sql.append("FROM experiment ");
			sql.append("WHERE appraisalStatus='未通过' AND courseId=? ");
			sql.append("AND openTimeId=(SELECT openTimeId FROM openTime WHERE schoolYear=? AND schoolTerm=?)");
			ps = conn.prepareStatement(sql.toString());
			ps.setInt(1, experiment.getCourseId());
			ps.setString(2, experiment.getSchoolYear());
			ps.setInt(3, experiment.getSchoolTerm());
			rs = ps.executeQuery();
			while(rs.next()) {
				ShowExperiment showExperiment = new ShowExperiment();
				showExperiment.setExperimentId(rs.getInt(1));
				showExperiment.setExperimentName(rs.getString(2));
				list.add(showExperiment);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, ps, conn);
		}
		return list;
	}

	public boolean delExperiment(Experiment experiment) {
		Connection conn = null;
		Statement stmt = null;
		boolean b = false;
		try {
			String docPath = experiment.getDocPath();
			File file = new File(docPath);
			if(file.exists() && file.isFile()) {
				conn = JdbcUtils.getConnection();
				conn.setAutoCommit(false);
				stmt = conn.createStatement();
				stmt.addBatch("DELETE FROM appraisal WHERE experimentId=" + experiment.getExperimentId());
				stmt.addBatch("DELETE FROM experiment WHERE experimentId=" + experiment.getExperimentId());
				int[] result = stmt.executeBatch();
				if(result.length > 0) {
					file.delete();
				}
			}
			conn.commit();
			b = true;
		} catch (Exception e) {
			try {
				conn.rollback();
			} catch (SQLException e1) {
				e1.printStackTrace();
			}
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, stmt, conn);
		}
		return b;
	}

	public List<ShowExperiment> headmanQueryNoPass(Experiment experiment) {
		Connection conn = null;
		PreparedStatement ps = null;
		ResultSet rs = null;
		List<ShowExperiment> list = new ArrayList<ShowExperiment>();
		try {
			conn = JdbcUtils.getConnection();
			StringBuilder sql = new StringBuilder();
			sql.append("SELECT experimentId,experimentName ");
			sql.append("FROM experiment ");
			sql.append("WHERE courseId=? AND teacherId=? AND appraisalStatus='未通过' ");
			sql.append("AND openTimeId=(SELECT openTimeId FROM openTime WHERE schoolYear=? AND schoolTerm=?)");
			ps = conn.prepareStatement(sql.toString());
			ps.setInt(1, experiment.getCourseId());
			ps.setString(2, experiment.getTeacherId());
			ps.setString(3, experiment.getSchoolYear());
			ps.setInt(4, experiment.getSchoolTerm());
			rs = ps.executeQuery();
			while(rs.next()) {
				ShowExperiment showExperiment = new ShowExperiment();
				showExperiment.setExperimentId(rs.getInt(1));
				showExperiment.setExperimentName(rs.getString(2));
				list.add(showExperiment);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			JdbcUtils.close(null, ps, conn);
		}
		return list;
	}
}


text:
package org.bds.cluster.healthCondition;

import org.bds.cluster.host.HostSsh;

/**
 * Memory usage condition
 * @author pcingola
 */
public class HealthConditionMem extends HealthCondition {

	public HealthConditionMem(HostSsh host) {
		super(host);
	}

	@Override
	public Light test() {
		if (host.getHealth().getMemUsage() >= healthRed.getMemUsage()) return Light.Red;
		if (host.getHealth().getMemUsage() >= healthYellow.getMemUsage()) return Light.Yellow;
		return Light.Green;
	}
}


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Product_Sales extends CI_Controller
{
	public function __construct()
    {
        parent::__construct();
        $this->load->model('Users_model');
        $this->load->model('Notification_model');
        $this->load->model('Recipes_model');
        $this->curpage = "Product Sales";
    }

	public function index()
	{
		$no_logsess = $this->session->userdata('log_sess')->USER_ID;

		$perm = $this->Users_model->get_permiss($no_logsess);
		$permis = "";
		foreach ($perm as $per) {
			$permis = $per->PERMISSION;
		}
		$details = array (
			// 'permission_cntnt'		=> 	explode("|", $this->session->userdata('log_sess')->PERMISSION),
			'permission_cntnt'		=> 	explode("|", $permis),
			'get_notification'	=>	$this->Notification_model->get_notification(),
			'get_info_name'				=>	$this->Users_model->get_user_details($no_logsess),
			'get_all_notification_rows'	=> $this->Notification_model->get_all_notification_rows(),
			'get_prod_sells'	=>	$this->Recipes_model->get_prod_sells()
		);

		$data['content'] = $this->load->view('admin/product/product_sales.php', $details, TRUE);
		$data['curpage'] = $this->curpage;
		$data['title'] = $this->curpage;
		$this->load->view('admin/template_admin.php', $data);
	}

}


text:
package org.jetbrains.plugins.groovy.lang.psi.api.statements.branch;

import com.intellij.psi.PsiElement;
import javax.annotation.Nullable;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrLabeledStatement;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrStatement;

/**
 * @author ilyas
 */
public interface GrFlowInterruptingStatement extends GrStatement {
  @Nullable
  PsiElement getLabelIdentifier();

  @javax.annotation.Nullable
  String getLabelName();

  @javax.annotation.Nullable
  GrStatement findTargetStatement();

  @javax.annotation.Nullable
  GrLabeledStatement resolveLabel();

  String getStatementText();
}


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

<title>Documentation1</title>
<meta name="date" content="2013-12-09">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Class Documentation1

java.lang.Object

Documentation1

public class Documentation1
extends java.lang.Object

A class comment

Field Summary

Fields

Modifier and Type
Field and Description

int
i

A field comment

Constructor Summary

Constructors

Constructor and Description

Documentation1()

Method Summary

Methods

Modifier and Type
Method and Description

void
f()

A method comment

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

i

public int i

A field comment

Constructor Detail

Documentation1

public Documentation1()

Method Detail

f

public void f()

A method comment

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion

class Migration(migrations.Migration):

    dependencies = [
        ('document', '0021_auto_20161214_1122'),
    ]

    operations = [
        migrations.AlterField(
            model_name='voteindividual',
            name='parliament_member',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='parliament.ParliamentMember'),
        ),
        migrations.AlterField(
            model_name='voteparty',
            name='party',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='parliament.PoliticalParty'),
        ),
    ]


text:
title: NativeScript for Cross-Platform Native App Development with JavaScript
author: azu
layout: post
itemUrl: 'http://www.telerik.com/nativescript'
editJSONPath: 'https://github.com/jser/jser.info/edit/gh-pages/data/2015/02/index.json'
date: '2015-02-07T16:08:15+00:00'
tags:
  - JavaScript
  - mobile
  - app
---
JavaScript + CSS + XMLを使ったクロスプラットフォームなモバイルアプリ開発できるツール


text:
package com.amazonaws.services.cloudfront.model;

import javax.annotation.Generated;

/**
 * <p>
 * The maximum size of a profile for field-level encryption was exceeded.
 * </p>
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class FieldLevelEncryptionProfileSizeExceededException extends com.amazonaws.services.cloudfront.model.AmazonCloudFrontException {
    private static final long serialVersionUID = 1L;

    /**
     * Constructs a new FieldLevelEncryptionProfileSizeExceededException with the specified error message.
     *
     * @param message
     *        Describes the error encountered.
     */
    public FieldLevelEncryptionProfileSizeExceededException(String message) {
        super(message);
    }

}


text:
'use strict';

const RelayConcreteNode = require('RelayConcreteNode');
const RelayStoreUtils = require('RelayStoreUtils');

const invariant = require('invariant');

import type {SelectorData} from 'RelayCombinedEnvironmentTypes';
import type {
  ConcreteFragmentSpread,
  ConcreteLinkedField,
  ConcreteNode,
  ConcreteScalarField,
  ConcreteSelection,
  ConcreteSelectableNode,
} from 'RelayConcreteNode';
import type {DataID} from 'RelayInternalTypes';
import type {
  IRecordSource,
  IRecordReader,
  Selector,
  TSnapshot,
} from 'RelayStoreTypes';
import type {Variables} from 'RelayTypes';

const {
  CONDITION,
  FRAGMENT_SPREAD,
  INLINE_FRAGMENT,
  LINKED_FIELD,
  SCALAR_FIELD,
} = RelayConcreteNode;
const {FRAGMENTS_KEY, ID_KEY, getArgumentValues} = RelayStoreUtils;

function read<TRecord>(
  recordSource: IRecordSource<TRecord>,
  selector: Selector,
  recordReader: IRecordReader<TRecord>,
): TSnapshot<TRecord> {
  const {dataID, node, variables} = selector;
  const reader = new RelayReader(recordSource, variables, recordReader);
  return reader.read(node, dataID);
}

/**
 * @private
 */
class RelayReader<TRecord> {
  _recordSource: IRecordSource<TRecord>;
  _seenRecords: {[dataID: DataID]: ?TRecord};
  _variables: Variables;
  _recordReader: IRecordReader<TRecord>;

  constructor(
    recordSource: IRecordSource<TRecord>,
    variables: Variables,
    recordReader: IRecordReader<TRecord>,
  ) {
    this._recordSource = recordSource;
    this._seenRecords = {};
    this._variables = variables;
    this._recordReader = recordReader;
  }

  read(node: ConcreteSelectableNode, dataID: DataID): TSnapshot<TRecord> {
    const data = this._traverse(node, dataID, null);
    return {
      data,
      dataID,
      node,
      seenRecords: this._seenRecords,
      variables: this._variables,
    };
  }

  _traverse(
    node: ConcreteNode,
    dataID: DataID,
    prevData: ?SelectorData,
  ): ?SelectorData {
    const record = this._recordSource.get(dataID);
    this._seenRecords[dataID] = record;
    if (record == null) {
      return record;
    }
    const data = prevData || {};
    this._traverseSelections(node.selections, record, data);
    return data;
  }

  _getVariableValue(name: string): mixed {
    invariant(
      this._variables.hasOwnProperty(name),
      'RelayReader(): Undefined variable `%s`.',
      name,
    );
    return this._variables[name];
  }

  _traverseSelections(
    selections: Array<ConcreteSelection>,
    record: TRecord,
    data: SelectorData,
  ): void {
    selections.forEach(selection => {
      if (selection.kind === SCALAR_FIELD) {
        this._readScalar(selection, record, data);
      } else if (selection.kind === LINKED_FIELD) {
        if (selection.plural) {
          this._readPluralLink(selection, record, data);
        } else {
          this._readLink(selection, record, data);
        }
      } else if (selection.kind === CONDITION) {
        const conditionValue = this._getVariableValue(selection.condition);
        if (conditionValue === selection.passingValue) {
          this._traverseSelections(selection.selections, record, data);
        }
      } else if (selection.kind === INLINE_FRAGMENT) {
        const typeName = this._recordReader.getType(record);
        if (typeName != null && typeName === selection.type) {
          this._traverseSelections(selection.selections, record, data);
        }
      } else if (selection.kind === FRAGMENT_SPREAD) {
        this._createFragmentPointer(selection, record, data);
      } else {
        invariant(
          false,
          'RelayReader(): Unexpected ast kind `%s`.',
          selection.kind,
        );
      }
    });
  }

  _readScalar(
    field: ConcreteScalarField,
    record: TRecord,
    data: SelectorData,
  ): void {
    const applicationName = field.alias || field.name;
    const variables = field.args
      ? getArgumentValues(field.args, this._variables)
      : null;
    const value = this._recordReader.getValue(record, field.name, variables);
    data[applicationName] = value;
  }

  _readLink(
    field: ConcreteLinkedField,
    record: TRecord,
    data: SelectorData,
  ): void {
    const applicationName = field.alias || field.name;
    const variables = field.args
      ? getArgumentValues(field.args, this._variables)
      : null;
    const linkedID = this._recordReader.getLinkedRecordID(
      record,
      field.name,
      variables,
    );

    if (linkedID == null) {
      data[applicationName] = linkedID;
      return;
    }

    const prevData = data[applicationName];
    invariant(
      prevData == null || typeof prevData === 'object',
      'RelayReader(): Expected data for field `%s` on record `%s` ' +
        'to be an object, got `%s`.',
      applicationName,
      this._recordReader.getDataID(record),
      prevData,
    );
    data[applicationName] = this._traverse(field, linkedID, prevData);
  }

  _readPluralLink(
    field: ConcreteLinkedField,
    record: TRecord,
    data: SelectorData,
  ): void {
    const applicationName = field.alias || field.name;
    const variables = field.args
      ? getArgumentValues(field.args, this._variables)
      : null;
    const linkedIDs = this._recordReader.getLinkedRecordIDs(
      record,
      field.name,
      variables,
    );

    if (linkedIDs == null) {
      data[applicationName] = linkedIDs;
      return;
    }

    const prevData = data[applicationName];
    invariant(
      prevData == null || Array.isArray(prevData),
      'RelayReader(): Expected data for field `%s` on record `%s` ' +
        'to be an array, got `%s`.',
      applicationName,
      this._recordReader.getDataID(record),
      prevData,
    );
    const linkedArray = prevData || [];
    linkedIDs.forEach((linkedID, nextIndex) => {
      if (linkedID == null) {
        linkedArray[nextIndex] = linkedID;
        return;
      }
      const prevItem = linkedArray[nextIndex];
      invariant(
        prevItem == null || typeof prevItem === 'object',
        'RelayReader(): Expected data for field `%s` on record `%s` ' +
          'to be an object, got `%s`.',
        applicationName,
        this._recordReader.getDataID(record),
        prevItem,
      );
      const linkedItem = this._traverse(field, linkedID, prevItem);
      linkedArray[nextIndex] = linkedItem;
    });
    data[applicationName] = linkedArray;
  }

  _createFragmentPointer(
    fragmentSpread: ConcreteFragmentSpread,
    record: TRecord,
    data: SelectorData,
  ): void {
    let fragmentPointers = data[FRAGMENTS_KEY];
    if (!fragmentPointers) {
      fragmentPointers = data[FRAGMENTS_KEY] = {};
    }
    invariant(
      typeof fragmentPointers === 'object' && fragmentPointers,
      'RelayReader: Expected fragment spread data to be an object, got `%s`.',
      fragmentPointers,
    );
    data[ID_KEY] = data[ID_KEY] || this._recordReader.getDataID(record);
    const variables = fragmentSpread.args
      ? getArgumentValues(fragmentSpread.args, this._variables)
      : {};
    fragmentPointers[fragmentSpread.name] = variables;
  }
}

module.exports = {read};