text:
<html>
<head>
<script>
var xhrStatus = -1;
var imgUrl = 'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/images/bookmark_manager_recent.png';

window.onload = function() {
  // The call to pushState with chrome-extension:// URL will succeed, since the
  // test uses --disable-web-security.
  history.pushState('', '',
      'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/main.html');
  var xhr = new XMLHttpRequest();
  xhr.onreadystatechange = function() {
    if (xhr.readyState == 4) {
      xhrStatus = xhr.status;
      if (xhrStatus == 200) {
        document.getElementById('star').src =
            window.URL.createObjectURL(this.response);
      }
      domAutomationController.setAutomationId(0);
      domAutomationController.send(xhr.status);
    }
  }
  xhr.open('GET', imgUrl);
  xhr.responseType = 'blob';
  xhr.send();
}
</script>
</head>
<body>
<img id='star'>
</body>
</html>

redpajama_set_name: RedPajamaGithub


text:
import ParseUser from 'ember-parse/models/parse-user';
import DS from 'ember-data';

var attr = DS.attr;

export default ParseUser.extend({
  /**
   * This model already has this attributes.
   *
   * username: attr('string'),
   * password: attr('password'),
   * email: attr('string'),
   * emailVerified: attr('boolean'),
   * sessionToken: attr('string'),
   * createdAt: attr('date'),
   * updatedAt: attr('date'),
   *
   *
   * Add custom attributes below.
   * For example:
   *
   * firstName: attr('string'),
   * lastName: attr('string')
   */
});


text:
#if !defined (__VDRIVER__)
#define __VDRIVER__

#include "FileMgr.h"

namespace Executor {
typedef struct PACKED
{
  COMMONFSQUEUEDEFS;
  INTEGER ioRefNum;
  INTEGER csCode;
  PACKED_MEMBER(Ptr, csParam);
} VDParamBlock;

typedef VDParamBlock *VDParamBlockPtr;

typedef struct PACKED
{
  PACKED_MEMBER(Ptr, csTable);
  INTEGER csStart;
  INTEGER csCount;
} VDEntryRecord;

typedef VDEntryRecord *VDEntRecPtr;

typedef struct PACKED
{
  PACKED_MEMBER(Ptr, csGTable);
} VDGammaRecord;

typedef VDGammaRecord *VDGamRecPtr;

typedef struct PACKED
{
  INTEGER csMode;
  LONGINT csData;
  INTEGER csPage;
  PACKED_MEMBER(Ptr, csBaseAddr);
} VDPgInfo;

typedef VDPgInfo *VDPgInfoPtr;

typedef struct PACKED
{
  SignedByte flag;
} VDFlagRec;

typedef VDFlagRec *VDFlagPtr;

typedef struct PACKED
{
  SignedByte spID;
} VDDefModeRec;

typedef VDDefModeRec *VDDefModePtr;
}

#endif /* !__VDRIVER__ */


text:
{% load floppyforms %}{% block row %}{% for field in fields %}

    {% with classes=field.css_classes label=label|default:field.label help_text=help_text|default:field.help_text %}
    {% block label %}{% if field|id %}{% endif %}{{ label }}{% if field.field.required %} *{% endif %}{% if label|last not in ".:!?" %}:{% endif %}{% if field|id %}{% endif %}{% endblock %}
    {% block field %}
        {% block widget %}{% formfield field %}{% endblock %}
        {% block hidden_fields %}{% for field in hidden_fields %}{{ field.as_hidden }}{% endfor %}{% endblock %}
    {% endblock %}
    {% endwith %}

{% endfor %}{% endblock %}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Clean Blog - Start Bootstrap Theme</title>

    <link href="/css/bootstrap.min.css" rel="stylesheet">

    <link href="/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>

    <link href="/css/clean-blog.min.css" rel="stylesheet">

        Jacob Nie
        <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
          Menu

        </button>

              Home

              Blog

              Classes

              Contact

Man must explore, and this is exploration at its greatest

Problems look mighty small from 150 miles up

              Posted by
                Start Bootstrap
                on August 24, 2017

Never in all their history have men been able truly to conceive of the world as one: a single sphere, a globe, having the qualities of a globe, a round earth in which all the directions eventually meet, in which there is no center because every point, or none, is center — an equal earth which all men occupy as equals. The airman's earth, if free men make it, will be truly round: a globe in practice, not in theory.

Science cuts two ways, of course; its products can be used for both good and evil. But there's no turning back from science. The early warnings about technological dangers also come from science.

What was most significant about the lunar voyage was not that man set foot on the Moon but that they set eye on the earth.

A Chinese tale tells of some men sent to harm a young girl who, upon seeing her beauty, become her protectors rather than her violators. That's how I felt seeing the Earth for the first time. I could not help but love and cherish her.

For those who have seen the Earth from space, and for the hundreds and perhaps thousands more who will, the experience most certainly changes your perspective. The things that we share in our world are far more valuable than those which divide us.

The Final Frontier

There can be no thought of finishing for 'aiming for the stars.' Both figuratively and literally, it is a task to occupy the generations. And no matter how much progress one makes, there is always the thrill of just beginning.

There can be no thought of finishing for 'aiming for the stars.' Both figuratively and literally, it is a task to occupy the generations. And no matter how much progress one makes, there is always the thrill of just beginning.

The dreams of yesterday are the hopes of today and the reality of tomorrow. Science has not yet mastered prophecy. We predict too much for the next year and yet far too little for the next ten.

Spaceflights cannot be stopped. This is not the work of any one man or even a group of men. It is a historical process which mankind is carrying out in accordance with the natural laws of human development.

Reaching for the Stars

As we got further and further away, it [the Earth] diminished in size. Finally it shrank to the size of a marble, the most beautiful you can imagine. That beautiful, warm, living object looked so fragile, so delicate, that if you touched it with a finger it would crumble and fall apart. Seeing this has to change a man.

            To go places and do things that have never been done before – that's what living is all about.

Space, the final frontier. These are the voyages of the Starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before.

As I stand out here in the wonders of the unknown at Hadley, I sort of realize there's a fundamental truth to our nature, Man must explore, and this is exploration at its greatest.

Placeholder text by
              Space Ipsum. Photographs by
              NASA on The Commons.

Copyright © Your Website 2017


text:
/* THIS FILE IS AUTOGENERATED FROM IDBEnvironment.webidl BY Codegen.py - DO NOT EDIT */

#ifndef mozilla_dom_IDBEnvironmentBinding_h
#define mozilla_dom_IDBEnvironmentBinding_h

#include "js/RootingAPI.h"
#include "jspubtd.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"

namespace mozilla {
namespace dom {

struct NativePropertyHooks;
class ProtoAndIfaceCache;

} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {

} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_IDBEnvironmentBinding_h


text:
<?php

/**
 * AllDbRelatedTest class
 *
 * This test group will run db related tests.
 *
 * @package       Cake.Test.Case
 */
class AllDbRelatedTest extends PHPUnit_Framework_TestSuite {

/**
 * Suite define the tests for this suite
 *
 * @return void
 */
	public static function suite() {
		$suite = new PHPUnit_Framework_TestSuite('All Db Related Tests');

		$path = CORE_TEST_CASES . DS;

		$suite->addTestFile($path . 'AllBehaviorsTest.php');
		$suite->addTestFile($path . 'Controller' . DS . 'Component' . DS . 'PaginatorComponentTest.php');
		$suite->addTestFile($path . 'AllDatabaseTest.php');
		$suite->addTestFile($path . 'Model' . DS . 'ModelTest.php');
		$suite->addTestFile($path . 'View' . DS . 'ViewTest.php');
		$suite->addTestFile($path . 'View' . DS . 'ScaffoldViewTest.php');
		$suite->addTestFile($path . 'View' . DS . 'HelperTest.php');
		$suite->addTestFile($path . 'View' . DS . 'Helper' . DS . 'FormHelperTest.php');
		$suite->addTestFile($path . 'View' . DS . 'Helper' . DS . 'PaginatorHelperTest.php');
		return $suite;
	}
}


text:
'use strict';

describe('errorHandlingBuilder', function(){
  var errorHandlingBuilder, errorHandling, fakeErrorDefinitionSuccess, fakeErrorDefinitionFail, results;

  beforeAll(function(){
    errorHandlingBuilder = require('../../../../src/dictionaryUtility/errorHandlingBuilder');
    errorHandling = errorHandlingBuilder.build();

    results = {
      conditionChecked: {},
      buildErrorCalled: {}
    };

    fakeErrorDefinitionSuccess = {
      errorCondition: function(given) {
        results.conditionChecked.fakeErrorDefinitionSuccess = given;
        return true;
      },
      errorBuilder: function(given) {
        results.buildErrorCalled.fakeErrorDefinitionSuccess = given;
        return 'fakeErrorDefinitionSuccess';
      }
    };

    fakeErrorDefinitionFail = {
      errorCondition: function(given) {
        results.conditionChecked.fakeErrorDefinitionFail = given;
        return false;
      },
      errorBuilder: function(given) {
        results.buildErrorCalled.fakeErrorDefinitionFail = given;
        return 'fakeErrorDefinitionFail';
      }
    };

    errorHandling.addErrorDefinition(fakeErrorDefinitionSuccess);
    errorHandling.addErrorDefinition(fakeErrorDefinitionFail);

  });

  it('should return an object that has an array called errorDefinitions', function(){
    expect(Array.isArray(errorHandling.errorDefinitions)).toBe(true);
  });

  it('should return an object with the function addErrorDefinition that adds to errorDefinitions', function(){
    expect(errorHandling.errorDefinitions.length).toEqual(2);
    expect(errorHandling.errorDefinitions[0].condition).toBe(fakeErrorDefinitionSuccess.errorCondition);
    expect(errorHandling.errorDefinitions[0].buildError).toBe(fakeErrorDefinitionSuccess.errorBuilder);
    expect(errorHandling.errorDefinitions[1].condition).toBe(fakeErrorDefinitionFail.errorCondition);
    expect(errorHandling.errorDefinitions[1].buildError).toBe(fakeErrorDefinitionFail.errorBuilder);
  });

  it('should throw the correct error when it calls throwRelevantError', function() {
    var givenInfo = {
      name: 'foo'
    };
    expect(function(){errorHandling.throwRelevantError(givenInfo);}).toThrow(new Error('fakeErrorDefinitionSuccess'));
    expect(results.conditionChecked.fakeErrorDefinitionSuccess).toBe(givenInfo);
    expect(results.buildErrorCalled.fakeErrorDefinitionSuccess).toBe(givenInfo);
  });
});


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/mainWindow"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bk_image3"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="ucd.denver.com.diskussioner.MainActivity"

    >

    <ImageView
        android:id="@+id/imageView"
        android:layout_width="150dp"
        android:layout_height="150dp"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="35dp"
        android:background="@drawable/ic_launcher" />

    <ProgressBar
        android:id="@+id/google_progress"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_gravity="center"
        android:layout_marginLeft="290dp"
        android:layout_marginTop="175dp" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="175dp"
        android:orientation="vertical">

        <EditText
            android:id="@+id/etEmail"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/round_textbox"
            android:drawableLeft="@drawable/email"
            android:hint="  Email"
            android:textColor="#7f7f7f"
            android:textColorHint="#7f7f7f"

            />

        <EditText
            android:id="@+id/etPass"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="20dp"
            android:layout_marginTop="10dp"
            android:background="@drawable/round_textbox"
            android:drawableLeft="@drawable/password"
            android:hint="  Password"
            android:password="true"
            android:textColor="#e6e6e6"
            android:textColorHint="#e6e6e6" />

        <Button
            android:id="@+id/btnSingIn"
            style="@style/DefaultButtonText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="6dp"
            android:layout_marginTop="10dp"
            android:background="@drawable/round_button"
            android:text="Sign In" />

        <Button
            android:id="@+id/btnSingUp"
            style="@style/DefaultButtonText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="6dp"
            android:background="@drawable/round_button"
            android:text="Sign Up" />

        <ImageView
            android:id="@+id/logo"
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:layout_gravity="center_horizontal"
            android:layout_margin="35dp"
            android:background="@drawable/denver1" />

    </LinearLayout>

    <ImageView
        android:id="@+id/title"
        android:layout_width="300dp"
        android:layout_height="40dp"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="5dp"
        android:background="@drawable/diskussion"
        android:onClick="showDialog" />

</RelativeLayout>


text:
package org.jetbrains.plugins.scala.nailgun;

import com.martiansoftware.nailgun.Alias;
import com.martiansoftware.nailgun.NGServer;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @author Pavel Fatin
 */
public class NailgunRunner {
  private static final String SERVER_ALIAS = "compile-server";
  private static final String SERVER_DESCRIPTION = "Scala compile server";
  private static final String SERVER_CLASS_NAME = "org.jetbrains.jps.incremental.scala.remote.Main";

  private static final String SBT_WATCHER_ALIAS = "play-sbt-watcher";
  private static final String SBT_WATCHER_DESCRIPTION = "Play framework sbt watcher";
  private static final String SBT_WATCHER_CLASS_NAME = "org.jetbrains.jps.incremental.scala.remote.play.SbtWatcherMain";

  private static final String STOP_ALIAS_START = "stop_";
  private static final String STOP_CLASS_NAME = "com.martiansoftware.nailgun.builtins.NGStop";

  public static void main(String[] args) throws UnknownHostException, ClassNotFoundException {
    if (args.length != 2) throw new IllegalArgumentException("Usage: NailgunRunner [port] [id]");

    InetAddress address = InetAddress.getByName(null);
    int port = Integer.parseInt(args[0]);
    String id = args[1];

    NGServer server = createServer(address, port, id);

    Thread thread = new Thread(server);
    thread.setName("NGServer(" + address.toString() + ", " + port + "," + id + ")");
    thread.start();

    Runtime.getRuntime().addShutdownHook(new ShutdownHook(server));
  }

  private static NGServer createServer(InetAddress address, int port, String id)
      throws ClassNotFoundException {
    NGServer server = new NGServer(address, port);

    server.setAllowNailsByClassName(false);

    Class serverClass = Class.forName(SERVER_CLASS_NAME);
    server.getAliasManager().addAlias(new Alias(SERVER_ALIAS, SERVER_DESCRIPTION, serverClass));

    Class watcherServerClass = Class.forName(SBT_WATCHER_CLASS_NAME);
    server.getAliasManager().addAlias(new Alias(SBT_WATCHER_ALIAS, SBT_WATCHER_DESCRIPTION, watcherServerClass));

    Class stopClass = Class.forName(STOP_CLASS_NAME);
    String stopAlias = STOP_ALIAS_START + id;
    server.getAliasManager().addAlias(new Alias(stopAlias, "", stopClass));

    return server;
  }

  private static class ShutdownHook extends Thread {
    public static final int TIMEOUT = 30;

    private NGServer myServer = null;

    ShutdownHook(NGServer server) {
      myServer = server;
    }

    public void run() {
      myServer.shutdown(false);

      for (int i = 0; i < TIMEOUT; i++) {
        if (!myServer.isRunning()) break;

        try {
          Thread.sleep(100);
        } catch (InterruptedException e) {
          // do nothing
        }
      }
    }
  }
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;

namespace Microsoft.Owin.Hosting.ServerFactory
{
    /// <summary>
    /// Located and loads the server factory.
    /// </summary>
    public class ServerFactoryLoader : IServerFactoryLoader
    {
        private readonly IServerFactoryActivator _activator;

        /// <summary>
        /// Allows for a Dependency Injection activator to be specified.
        /// </summary>
        /// <param name="activator"></param>
        public ServerFactoryLoader(IServerFactoryActivator activator)
        {
            _activator = activator;
        }

        /// <summary>
        /// Executes the loader, searching for the server factory by name.
        /// Acceptable inputs:
        /// - Assembly.Name. Look for type Assembly.Name.ServerFactory in the assembly Assembly.Name.
        /// - Assembly.Name.FactoryName.  Look for type Assembly.Name.FactoryName in the assembly Assembly.Name.
        /// </summary>
        /// <param name="serverName">The name of the assembly and type of the server factory</param>
        /// <returns></returns>
        public virtual IServerFactoryAdapter Load(string serverName)
        {
            if (string.IsNullOrWhiteSpace(serverName))
            {
                return null;
            }

            Type serverFactoryType = GetTypeAndMethodNameForConfigurationString(serverName);
            if (serverFactoryType == null)
            {
                return null;
            }

            return new ServerFactoryAdapter(serverFactoryType, _activator);
        }

        private static Type GetTypeAndMethodNameForConfigurationString(string configuration)
        {
            foreach (var hit in HuntForAssemblies(configuration))
            {
                string longestPossibleName = hit.Item1; // type name
                Assembly assembly = hit.Item2;

                // try the longest 2 possibilities at most (because you can't have a dot in the method name)
                // so, typeName could specify a method or a type. we're looking for a type.
                foreach (var typeName in DotByDot(longestPossibleName).Take(2))
                {
                    Type type = assembly.GetType(typeName, false);
                    if (type == null)
                    {
                        // Doesn't exist? next!
                        continue;
                    }

                    return type;
                }
            }
            return null;
        }

        private static IEnumerable<Tuple<string, Assembly>> HuntForAssemblies(string configurationString)
        {
            if (configurationString == null)
            {
                yield break;
            }

            int commaIndex = configurationString.IndexOf(',');
            if (commaIndex >= 0)
            {
                // assembly is given, break the type and assembly apart
                string methodOrTypeName = DotByDot(configurationString.Substring(0, commaIndex)).FirstOrDefault();
                string assemblyName = configurationString.Substring(commaIndex + 1).Trim();
                Assembly assembly = TryAssemblyLoad(assemblyName);
                if (assembly != null)
                {
                    yield return Tuple.Create(methodOrTypeName, assembly);
                }
            }
            else
            {
                // assembly is inferred from type name
                string typeName = DotByDot(configurationString).FirstOrDefault();

                // go through each segment
                foreach (var assemblyName in DotByDot(typeName))
                {
                    Assembly assembly = TryAssemblyLoad(assemblyName);
                    if (assembly != null)
                    {
                        if (assemblyName.Length == typeName.Length)
                        {
                            // No type specified, use the default.
                            yield return Tuple.Create(assemblyName + "." + Constants.OwinServerFactory, assembly);
                        }
                        else
                        {
                            yield return Tuple.Create(typeName, assembly);
                        }
                    }
                }
            }
        }

        private static Assembly TryAssemblyLoad(string assemblyName)
        {
            try
            {
                return Assembly.Load(assemblyName);
            }
            catch (FileNotFoundException)
            {
                return null;
            }
        }

        private static IEnumerable<string> DotByDot(string text)
        {
            if (text == null)
            {
                yield break;
            }

            text = text.Trim('.');
            for (int length = text.Length;
                length > 0;
                length = text.LastIndexOf('.', length - 1, length - 1))
            {
                yield return text.Substring(0, length);
            }
        }
    }
}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package app.metatron.discovery.domain.notebook;

/**
 * Created by james on 2017. 8. 10..
 */
public class NotebookModelSummary {

    String id;

    String name;

    public static NotebookModelSummary valueOf(NotebookModel model) {
        NotebookModelSummary summary = new NotebookModelSummary();
        summary.setId(model.getId());
        summary.setName(model.getName());

        return summary;
    }

    public String getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}


text:
@interface YCChoseBarCell : UICollectionViewCell
@property (nonatomic,strong) UIImageView *iconImageView;
@property (nonatomic,copy) NSString *imageName;
@property (nonatomic,copy) NSString *selectedImageName;
@end

@implementation YCChoseBarCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _iconImageView = ({
            _iconImageView = [[UIImageView  alloc] initWithFrame:self.bounds];
            _iconImageView.contentMode = UIViewContentModeCenter;
//            _iconImageView.backgroundColor = [UIColor clearColor];
//            _iconImageView.userInteractionEnabled = YES;
            _iconImageView;
        });
        [self.contentView addSubview:_iconImageView];
    }
    return self;
}

-(void)setImageName:(NSString *)imageName
{
    _imageName = imageName;
    _iconImageView.image = [UIImage imageNamed:imageName];
    _selectedImageName = [imageName stringByAppendingString:@"_selected"];
}

-(void)setSelected:(BOOL)selected
{
    [super setSelected:selected];
    NSString *currentImageName = selected ? _selectedImageName : _imageName;
    _iconImageView.image = [UIImage imageNamed:currentImageName];
}

@end

static NSString *YCChoseBarCellID = @"YCChoseBarCellID";

@implementation YCChoseBarCollectionView

- (instancetype)initWithFrame:(CGRect)frame
{
    UICollectionViewFlowLayout *flowLayout = [UICollectionViewFlowLayout alloc];
    flowLayout.itemSize = CGSizeMake(frame.size.width/4, frame.size.height);
    flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    flowLayout.minimumInteritemSpacing = 0;
    flowLayout.minimumLineSpacing = 0;
    self = [super initWithFrame:frame collectionViewLayout:flowLayout];
    if (self) {
        // 构造函数,完成之后内部属性才会被创建
        self.pagingEnabled = YES;
        self.bounces = YES;
        self.showsHorizontalScrollIndicator = NO;
        self.dataSource = self;
        //    self.delegate = self;
        self.backgroundColor = [UIColor clearColor];
        _isFirstShow = YES;
        [self registerClass:[YCChoseBarCell class] forCellWithReuseIdentifier:YCChoseBarCellID];
        UIView *seperatorView = ({
            seperatorView = [[UIView alloc] initWithFrame:CGRectMake(15, 0, frame.size.width - 30, 1)];
            seperatorView.backgroundColor = [UIColor darkGrayColor];
            seperatorView;
        });
        [self addSubview:seperatorView];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    if (_isFirstShow) {
        _isFirstShow = NO;
        [self selectItemAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0] animated:NO scrollPosition:UICollectionViewScrollPositionNone];
    }
}

-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return _dataSourceArray.count;
}

-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{

    YCChoseBarCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:YCChoseBarCellID forIndexPath:indexPath];
    NSInteger index = indexPath.item;
    cell.imageName = _dataSourceArray[index];

    return cell;
}

@end


text:
jQuery(function($) {

    var hover = false;
    var focusUsername = false;
    var focusPassword = false;

    var $inputUsername = $("#pinion-page-login-inputs-positioning input[name=username]");
    var $inputPassword = $("#pinion-page-login-inputs-positioning input[name=password]");
    var $inputsWrapper = $("#pinion-page-login-inputs");

    $inputUsername
        .focus(function() {focusUsername = true; checkForSlideDown(); })
        .blur(function() {focusUsername = false; checkForSlideUp(); });

    $inputPassword
        .focus(function() {focusPassword = true; checkForSlideDown(); })
        .blur(function() {focusPassword = false; checkForSlideUp(); });

    $inputsWrapper
        .css("width", $inputsWrapper.width()+"px")
        .hover(function() {
            hover = true;
            checkForSlideDown();
        }, function() {
            hover = false;
            checkForSlideUp();
        })
        .children()
            .css({
                "position": "absolute",
                "bottom": 0
            });

    function checkForSlideUp() {
        setTimeout(function() {
            if(!hover && !focusUsername && !focusPassword) {
                $("#pinion-page-login-inputs")
                    .animate({
                        "height": "29px"
                    }, 100);
            }
        }, 100);
    }

    function checkForSlideDown() {
        if(hover || focusUsername || focusPassword) {
            $inputsWrapper
                .animate({
                    "height": "35px"
                }, 300);
        }
    }

    if($inputUsername.val() == "")
        $inputUsername.focus();
    else
        $inputPassword.focus();
});


text:
class Puppet::Provider::Mysql < Puppet::Provider
  # Without initvars commands won't work.
  initvars

  # Make sure we find mysql commands on CentOS and FreeBSD
  ENV['PATH'] = ENV['PATH'] + ':/usr/libexec:/usr/local/libexec:/usr/local/bin'

  # rubocop:disable Style/HashSyntax
  commands :mysql      => 'mysql'
  commands :mysqld     => 'mysqld'
  commands :mysqladmin => 'mysqladmin'
  # rubocop:enable Style/HashSyntax

  # Optional defaults file
  def self.defaults_file
    "--defaults-extra-file=#{Facter.value(:root_home)}/.my.cnf" if File.file?("#{Facter.value(:root_home)}/.my.cnf")
  end

  def self.mysqld_type
    # find the mysql "dialect" like mariadb / mysql etc.
    mysqld_version_string.scan(%r{mariadb}i) { return 'mariadb' }
    mysqld_version_string.scan(%r{\s\(percona}i) { return 'percona' }
    'mysql'
  end

  def mysqld_type
    self.class.mysqld_type
  end

  def self.mysqld_version_string
    # As the possibility of the mysqld being remote we need to allow the version string to be overridden,
    # this can be done by facter.value as seen below. In the case that it has not been set and the facter
    # value is nil we use the mysql -v command to ensure we report the correct version of mysql for later use cases.
    @mysqld_version_string ||= Facter.value(:mysqld_version) || mysqld('-V')
  end

  def mysqld_version_string
    self.class.mysqld_version_string
  end

  def self.mysqld_version
    # note: be prepared for '5.7.6-rc-log' etc results
    #       versioncmp detects 5.7.6-log to be newer then 5.7.6
    #       this is why we need the trimming.
    mysqld_version_string.scan(%r{\d+\.\d+\.\d+}).first unless mysqld_version_string.nil?
  end

  def mysqld_version
    self.class.mysqld_version
  end

  def defaults_file
    self.class.defaults_file
  end

  def self.users
    mysql([defaults_file, '-NBe', "SELECT CONCAT(User, '@',Host) AS User FROM mysql.user"].compact).split("\n")
  end

  # Optional parameter to run a statement on the MySQL system database.
  def self.system_database
    '--database=mysql'
  end

  def system_database
    self.class.system_database
  end

  # Take root@localhost and munge it to 'root'@'localhost'
  def self.cmd_user(user)
    "'#{user.sub('@', "'@'")}'"
  end

  # Take root.* and return ON `root`.*
  def self.cmd_table(table)
    table_string = ''

    # We can't escape *.* so special case this.
    table_string << if table == '*.*'
                      '*.*'
                    # Special case also for PROCEDURES
                    elsif table.start_with?('PROCEDURE ')
                      table.sub(%r{^PROCEDURE (.*)(\..*)}, 'PROCEDURE `\1`\2')
                    else
                      table.sub(%r{^(.*)(\..*)}, '`\1`\2')
                    end
    table_string
  end

  def self.cmd_privs(privileges)
    return 'ALL PRIVILEGES' if privileges.include?('ALL')
    priv_string = ''
    privileges.each do |priv|
      priv_string << "#{priv}, "
    end
    # Remove trailing , from the last element.
    priv_string.sub(%r{, $}, '')
  end

  # Take in potential options and build up a query string with them.
  def self.cmd_options(options)
    option_string = ''
    options.each do |opt|
      option_string << ' WITH GRANT OPTION' if opt == 'GRANT'
    end
    option_string
  end
end


text: module.exports = require('@konfirm/labrat').export;


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycotaxon 103: 301 (2008)

#### Original name
Candelabrochaete macaronesica M. Dueñas, Tellería & Melo

### Remarks
null


text:
package org.hibernate.test.cascade.circle;

import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.Environment;

/**
 * @author Gail Badner
 */
public class MultiPathCircleCascadeCheckNullFalseDelayedInsertTest extends MultiPathCircleCascadeDelayedInsertTest {
	@Override
	 public void configure(Configuration cfg) {
		super.configure( cfg );
		cfg.setProperty( Environment.CHECK_NULLABILITY, "false" );
	}
}


text:
#import <Foundation/Foundation.h>

@interface NSDictionary (YSKit)

- (BOOL)ys_boolForKey:(NSString *)keyName;
- (float)ys_floatForKey:(NSString *)keyName;
- (NSInteger)ys_integerForKey:(NSString *)keyName;
- (double)ys_doubleForKey:(NSString *)keyName;

- (NSString *)ys_JSONString;

+ (NSDictionary *)ys_dictionaryWithJSON:(NSString *)json;

/**
   Creates and returns a dictionary using the keys and values found in a file specified by a given URL.

   @param URL An URL. The file identified by URL must contain a string representation of a property list whose root object is a dictionary.
   @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, pass in `NULL`.
   @return A new dictionary that contains the dictionary at path, or `nil` if there is a file error or if the contents of the file are an invalid representation of a dictionary.
 */
+ (NSDictionary *)ys_dictionaryWithContentsOfURL:(NSURL *)URL error:(NSError **)error;

/**
   Creates and returns a dictionary using the keys and values found in a file specified by a given path.

   @param path A full or relative pathname. The file identified by path must contain a string representation of a property list whose root object is a dictionary.
   @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, pass in `NULL`.
   @return A new dictionary that contains the dictionary at path, or `nil` if there is a file error or if the contents of the file are an invalid representation of a dictionary.
 */
+ (NSDictionary *)ys_dictionaryWithContentsOfFile:(NSString *)path error:(NSError **)error;

/**
   Creates and returns a dictionary using the keys and values found in the given data.

   @param data The data object identified by data must contain a string representation of a property list whose root object is a dictionary.
   @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, pass in `NULL`.
   @return A new dictionary that contains the dictionary at path, or `nil` if there is a file error or if the contents of the file are an invalid representation of a dictionary.
 */
+ (NSDictionary *)ys_dictionaryWithContentsOfData:(NSData *)data error:(NSError **)error;

@end

@interface NSMutableDictionary (YSKit)

/** Adds to the receiving dictionary the entries from another dictionary with specified keys.

   @param sourceDictionary The dictionary from which to add entries.
   @param firstKey ... Keys specifying which entry will be added to the reciver.
 */
- (NSUInteger)ys_addEntriesFromDictionary:(NSDictionary *)sourceDictionary withSpecifiedKeys:(NSString *)firstKey, ...NS_REQUIRES_NIL_TERMINATION;

- (void)ys_setBool:(BOOL)value forKey:(NSString *)keyName;
- (void)ys_setFloat:(float)value forKey:(NSString *)keyName;
- (void)ys_setInteger:(NSInteger)value forKey:(NSString *)keyName;
- (void)ys_setDouble:(double)value forKey:(NSString *)keyName;

@end


text:
@inline function read(io::IO, ::Type{SA}) where {SA<:StaticArray}
    elements = Ref{NTuple{length(SA),eltype(SA)}}()
    read!(io, elements)
    SA(elements[])
end

@inline function read!(io::IO, a::SA) where {SA<:StaticArray}
    unsafe_read(io, Base.unsafe_convert(Ptr{eltype(SA)}, a), sizeof(a))
    a
end

@deprecate read!(io::IO, SA::Type{<:StaticArray}) read(io, SA)

@inline function write(io::IO, a::SA) where {SA<:StaticArray}
    write(io, Ref(Tuple(a)))
end


text:
package main

import (
	"fmt"
	"log"

	"google.golang.org/api/admin/directory/v1"

	"github.com/urfave/cli"
)

// group list ----------------------------------------------

var commandGroupList = cli.Command{
	Name:  "grouplist",
	Usage: "Shows current groups",
	Description: `Shows current groups on Google Apps for Work

			The record format:
			   [ID] EMAIL (NAME DESCRIPTION)
			`,
	Action: doGroupList,
}

func doGroupList(c *cli.Context) error {
	srv, err := NewService()
	if err != nil {
		return nil
	}

	r, err := srv.directory.Groups.List().Customer("my_customer").Do()
	if err != nil {
		log.Fatalf("Unable to retrieve groups in domain. %v", err)
		return nil
	}

	count := len(r.Groups)
	if count == 0 {
		fmt.Print("No groups found.\n")
	} else {
		for _, g := range r.Groups {
			fmt.Printf("[%v] %v (%v: %v)\n", g.Id, g.Email, g.Name, g.Description)
		}
	}

	return nil
}

// group create ----------------------------------------------

var commandGroupCreate = cli.Command{
	Name:        "groupcreate",
	Usage:       "Create a new group",
	Description: "Create a new group on Google Apps for Work",
	Action:      doGroupCreate,
	Flags: []cli.Flag{
		cli.StringFlag{Name: "email, e", Value: "", Usage: "The group's email address"},
		cli.StringFlag{Name: "description, d", Value: "", Usage: "An extended description to help users determine the purpose of a group"},
		cli.StringFlag{Name: "name, n", Value: "", Usage: "The group's name"},
	},
}

func doGroupCreate(c *cli.Context) error {
	srv, err := NewService()
	if err != nil {
		return nil
	}

	email := c.String("email")
	description := c.String("description")
	name := c.String("name")

	log.Printf("Email:%v, Description:%v, Name:%v", email, description, name)

	group := &admin.Group{
		Email:       email,
		Description: description,
		Name:        name,
	}

	group2, err := srv.directory.Groups.Insert(group).Do()
	if err != nil {
		log.Fatalf("Cannot create group in domain. %v", err)
	} else {
		log.Printf("Succeed to create group: %v", group2)
	}

	return nil
}

// group member list ----------------------------------------------

var commandGroupMemberList = cli.Command{
	Name:        "groupmemberlist",
	Usage:       "Shows a list of all members in a group",
	Description: "Shows a list of all members in a group on Google Apps for Work",
	Action:      doGroupMemberList,
	Flags: []cli.Flag{
		cli.StringFlag{Name: "key, k", Value: "", Usage: "The group key"},
	},
}

func doGroupMemberList(c *cli.Context) error {
	srv, err := NewService()
	if err != nil {
		return nil
	}

	groupKey := c.String("key")

	r, err := srv.directory.Members.List(groupKey).Do()
	if err != nil {
		log.Fatalf("Unable to retrieve group members in domain. %v", err)
		return nil
	}

	count := len(r.Members)
	if count == 0 {
		fmt.Print("No group members found.\n")
	} else {
		for _, m := range r.Members {
			fmt.Printf("%v, %v\n", m.Email, m.Role)
		}
	}

	return nil
}

// group create ----------------------------------------------

var commandGroupMemberCreate = cli.Command{
	Name:        "groupmembercreate",
	Usage:       "Add a member to the specified group",
	Description: "Add a member to the specified group on Google Apps for Work",
	Action:      doGroupMemberCreate,
	Flags: []cli.Flag{
		cli.StringFlag{Name: "key, k", Value: "", Usage: "The group key"},
		cli.StringFlag{Name: "email, e", Value: "", Usage: "The member's email address"},
		cli.StringFlag{Name: "role, r", Value: "", Usage: "A group member's role can be: OWNER / MANAGER / MEMBER. The default is MEMBER, see: https://goo.gl/VIo3zH"},
	},
}

// Role is a group member role
type Role int

const (
	// DEFAULT equals MEMBER
	DEFAULT Role = iota
	// OWNER role can change send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group.
	OWNER
	// MANAGER role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple OWNER and MANAGER members.
	MANAGER
	// MEMBER role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see https://goo.gl/10gxHA.
	MEMBER
)

func (r Role) String() string {
	switch r {
	case OWNER:
		return "OWNER"
	case MANAGER:
		return "MANAGER"
	default:
		return "MEMBER"
	}
}

func roleFromString(role string) Role {
	switch {
	case role == "OWNER":
		return OWNER
	case role == "MANAGER":
		return MANAGER
	default:
		return MEMBER
	}
}

func doGroupMemberCreate(c *cli.Context) error {
	srv, err := NewService()
	if err != nil {
		return nil
	}

	groupKey := c.String("key")
	email := c.String("email")
	role := c.String("role")
	roleStr := roleFromString(role)

	member := &admin.Member{
		Email: email,
		Role:  roleStr.String(),
	}

	log.Printf("Key:%v, Email:%v, Role:%v[%v], Member:%v", groupKey, email, role, roleStr, member)

	member2, err := srv.directory.Members.Insert(groupKey, member).Do()
	if err != nil {
		log.Fatalf("Cannot add a member to the specified group in domain. %v", err)
		return nil
	}

	log.Printf("Succeed to add a member to the specified group: %v, member: %v", groupKey, member2.Email)

	return nil
}


text:
helloworld-client-ssl: Wildfly mutual SSL(two-way) configuration example
=======================================================================
Author: Giriraj Sharma

Level: Intermediate

Technologies: Mutual SSL, Undertow, Wildfly

Summary: Basic example that demonstrates client mutual SSL authentication in wildlfy.

What is it?
-----------

This example demonstrates the configuration of *client mutual SSL authentication* in *JBoss Enterprise Application Platform 6* or *WildFly*.

Mutual SSL provides the same security as SSL, with the addition of authentication and non-repudiation of the client authentication, using digital signatures. When mutual authentication is used the server would request the client to provide a certificate in addition to the server certificate issued to the client. Mutual authentication requires an extra round trip time for client certificate exchange. In addition the client must buy and maintain a digital certificate.

This quickstart shows how to configure wildfly to enable TLS/SSL configuration for the new wildfly web-subsystem Undertow and enable mutual (two-way) SSL authentication for clients.
Before we run this example, we must create certificates and configure the server to use SSL, https listener and require client verification.

System requirements
-------------------

All you need to build this project is Java 6.0 (Java SDK 1.6) or better, Maven 3.0 or better.

The application this project produces is designed to be run on JBoss Enterprise Application Platform 6 or WildFly.

Configure Maven
---------------

If you have not yet done so, you must [Configure Maven](http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/#configure_maven) before testing the quickstarts.

## Setup CA, server and client keys using openSSL

Certificate Authority, server and client keys can be generated either viua traditional openSSL tool or via cross-paltform java keytool.

### Setup CA

First of all we need to set up the Certificate Authority (CA) to issue certificate.

    1. First download OpenSSL and install it.
    2. Set up the directory structure and files required by OpenSSL.
    3. Create a directory ~\OpenSSL\workspace and place the openssl.conf file in the workplace.

    ➜ mkdir -p OpenSSL/workspace
    ➜ workspace cd  OpenSSL/workspace
    ➜ workspace mkdir Keys CSR Certificates
    ➜ workspace touch serial.txt database.txt

4. Generate a key for your Root CA. Execute the below OpenSSL command at workspace where you have openssl configuration file.

        openssl genrsa -des3 -out  Keys/RootCA.key 2048

5. This will ask for passphrase for the key, please provide the passphrase and remember it. This will be used later.

6. The next step is to create a self-signed certificate for our CA, this certificate will be used to sign and issue other certificates.

        openssl req -config openssl.conf -new -x509 -days 360 -key Keys/RootCA.key -out Certificates/RootCA.crt

7. You will be asked to provide the following information:-

        Country Name (2 letter code)  :US
        State or Province Name (full name) :Carolina
        Locality Name (eg, city) :Raleigh
        Organization Name (eg, company) :Sample Inc
        Organizational Unit Name (eg, section) :Web
        Common Name (eg, your websites domain name) :sample.com
        Email Address :sample@sample.com

8. Export root CA certificate into a keystore

        keytool -export -alias server -keystore RootCA.keystore -rfc -file Certificates/RootCA.crt -keypass keypassword -storepass keypassword

9. Export root CA certificate into a truststore

        keytool -import -file Certificates/RootCA.crt -keystore RootCA.truststore -keypass keypassword -storepass keypassword

Now we can see our CA's certificate in the Certificates folder and is ready to sign the certificates.
The server/client certificate pair can be used when an application is trying to access a web service which is configured to authenticate the client application using the client ssl certificates. We can follow steps below to create server and client certificate using OpenSSL

### Create the server and client certificate

1. Create private key for the server.

        openssl genrsa -des3 -out Keys/server.key 2048

2. Create CSR for the server.

        openssl req -config openssl.cnf -new -key Keys/server.key -out CSR/server.csr

3. Create server certificate.

        openssl ca -config openssl.cnf -days 360 -in CSR/server.csr -out Certificates/server.crt -keyfile Keys/RootCA.key -cert Certificates/RootCA.crt -policy policy_anything

4. Export server certificate into a keystore

        keytool -export -alias server -keystore server.keystore -rfc -file Certificates/server.crt -keypass keypassword -storepass keypassword

5. Create private key for the client.

        openssl genrsa -des3 -out Keys/client.key 2048

6. Create CSR for the client.

        openssl req -config openssl.cnf -new -key Keys/client.key -out CSR/client.csr

7. Create client certificate.

        openssl ca -config openssl.cnf -days 360 -in CSR/client.csr -out Certificates/client.crt -keyfile Keys/RootCA.key -cert Certificates/RootCA.crt

8. Finally export the client certificate to pkcs format.

        openssl pkcs12 -export -in Certificates/client.crt -inkey Keys/client.key -certfile Certificates/RootCA.crt -out Certificates/clientCert.p12

## Setup CA, server and client keys using Java Keytool

### Create the server and client certificate

1.  Open a command line and navigate to the JBoss server `configuration` directory:

        For Linux:   JBOSS_HOME/standalone/configuration
        For Windows: JBOSS_HOME\standalone\configuration
2. Create a certificate for your server using the following command:

        keytool -genkey -keyalg RSA -keystore server.keystore -storepass keypassword -validity 365

   You'll be prompted for some additional information, such as your name, organizational unit, and location. Enter any values you prefer.
3. Create the client certificate, which is used to authenticate against the server when accessing a resource through SSL.

         keytool -genkey -keystore client.keystore -storepass keypassword -validity 365 -keyalg RSA -keysize 2048 -storetype pkcs12
4. Export the client certificate and create a truststore by importing this certificate:

        keytool -exportcert -keystore client.keystore  -storetype pkcs12 -storepass keypassword -keypass keypassword -file client.crt
        keytool -import -file client.crt -keystore client.truststore
5. Export client certificate to pkcs12 format

        keytool -importkeystore -srckeystore client.keystore -destkeystore clientCert.p12 -srcstoretype PKCS12 -deststoretype PKCS12 -deststorepass keypassword

6. The certificates and keystores are now properly configured.

Configure Wildlfy for mutual client SSL authentication
------------------------------------------------------

1.  Open a command line and navigate to the JBoss server `configuration` directory:

        For Linux:   JBOSS_HOME/standalone/configuration
        For Windows: JBOSS_HOME\standalone\configuration

2.  Copy `RootCA.trustsore` and `server.keystore` (or `server.keystore` and `client.truststore`) into the JBoss server `configuration` directory.

### Configure The Additional WildFly Security Realm

The next step is to configure the new keystore as a server identity for ssl in the WildFly security-realms section of the standalone.xml (if you're using -ha or other versions, edit those). Make sure to backup the file: `JBOSS_HOME/standalone/configuration/standalone.xml`

 In case keys and certificates have been generated using openSSL

 `keystore path` can be configured either via `RootCA.keystore` or `server.keystore`.

        <management>
            <security-realms>
                <security-realm name="UndertowRealm">
                <server-identities>
                    <ssl>
                        <keystore path="RootCA.keystore" relative-to="jboss.server.config.dir" keystore-password="keypassword" key-password="keypassword"/>
                    </ssl>
                </server-identities>
            </security-realm>
            <authentication>
                    <truststore path="RootCA.truststore" relative-to="jboss.server.config.dir" keystore-password="keypassword"/>
                    <local default-user="$local" skip-group-loading="true"/>
                    <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
            </authentication>
            ...
        </management>

else In case keys and certificates have been generated using java keytool

        <management>
            <security-realms>
                <security-realm name="UndertowRealm">
                <server-identities>
                    <ssl>
                        <keystore path="server.keystore" relative-to="jboss.server.config.dir" keystore-password="keypassword" key-password="keypassword"/>
                    </ssl>
                </server-identities>
            </security-realm>
            <authentication>
                    <truststore path="client.truststore" relative-to="jboss.server.config.dir" keystore-password="keypassword"/>
                    <local default-user="$local" skip-group-loading="true"/>
                    <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
            </authentication>
            ...
        </management>

###Configure Undertow Subsystem for SSL

If you're running with the default-server, add the https-listener to the undertow subsystem:

        <subsystem xmlns="urn:jboss:domain:undertow:2.0">
            <server name="default-server">
                <https-listener name="https" socket-binding="https" security-realm="UndertowRealm" verify-client="REQUIRED"/>
                ...
                ...
            </server>
            ...
            ...
        </subsystem>

That's it, now we are ready to connect to the ssl port of our instance `https://localhost:8443/`. Note, that we get the privacy error as the server certificate is self signed. If we need to use a fully signed certificate, we mostly get a PEM file from the Certificate Authority. In such a case, we need to import the PEM into the keystore and truststore.

Test the Server SSL Configuration
---------------------------------

To test the SSL configuration, access: `<https://localhost:8443>`

If it is configured correctly, you should be asked to trust the server certificate.

Import the Certificate into Your Browser
---------------------------------------

Before you access the application, you must import the *clientCert.p12*, which holds the client certificate, into your browser.

#### Import the Certificate into Google Chrome

1. Click the Chrome menu icon (3 horizontal bars) in the upper right on the browser toolbar and choose 'Settings'. This takes you to <chrome://settings/>.
2. At the bottom of the page, click on the 'Show advanced settings...' link.
3. Find the section 'HTTPS/SSL' and click on the 'Manage certificates...' button.
4. In the 'Certificate manager' dialog box, choose the 'Your Certificates' tab and click the 'Import' button.
5. Select the `clientCert.p12` file. You will be prompted to enter the  password: `keypassword`.
6. The certificate is now installed in the Google Chrome browser.

#### Import the Certificate into Mozilla Firefox

1. Click the 'Edit' menu item on the browser menu and choose 'Preferences'.
2. A new window will open. Select the 'Advanced' icon and after that the 'Certificates' tab.
3. On the 'Certificates' tab, mark the option 'Ask me every time' and click the 'View Certificates' button.
4. A new window will open. Select the 'Your Certificates' tab and click the 'Import' button.
5. Select the `clientCert.p12` file. You will be prompted to enter the  password: `keypassword`.
6. The certificate is now installed in the Mozilla Firefox browser.

Start JBoss Enterprise Application Platform 6 or WildFly with the Web Profile
------------------------------------------------------------------------------

1. Open a command line and navigate to the root of the JBoss server directory.
2. The following shows the command line to start the server with the web profile:

        For Linux:   JBOSS_HOME/bin/standalone.sh
        For Windows: JBOSS_HOME\bin\standalone.bat

Build and Deploy the Quickstart
-------------------------

_NOTE: The following build command assumes you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line. See [Build and Deploy the Quickstarts](../README.md#build-and-deploy-the-quickstarts) for complete instructions and additional options._

1. Make sure you have started the Wildfly Server as described above.
2. Open a command line and navigate to the root directory of one of the quickstart.
3. Type this command to build and deploy the archive:

        For EAP 6:     mvn clean package jboss-as:deploy
        For WildFly:   mvn -Pwildfly clean package wildfly:deploy

4. This will deploy `target/wildfly-helloworld-client-ssl.war` to the running instance of the server.

Access the application
---------------------

The application will be running at the following URL: `<https://localhost:8443/wildfly-helloworld-client-ssl>`.

Undeploy the Archive
--------------------

1. Make sure you have started the JBoss Server as described above.
2. Open a command line and navigate to the root directory of this quickstart.
3. When you are finished testing, type this command to undeploy the archive:

        For EAP 6:     mvn jboss-as:undeploy
        For WildFly:   mvn -Pwildfly wildfly:undeploy

Remove the SSL Configuration
----------------------------

1. If the server is running, stop the JBoss Enterprise Application Platform 6 or WildFly Server.
2. Replace the `WILDFLY_HOME/standalone/configuration/standalone.xml` file with the back-up copy of the file.

Run the Quickstart in JBoss Developer Studio or Eclipse
-------------------------------------
You can also start the server and deploy the quickstarts from Eclipse using JBoss tools.

Debug the Application
------------------------------------

If you want to debug the source code or look at the Javadocs of any library in the project, run either of the following commands to pull them into your local repository. The IDE should then detect them.

        mvn dependency:sources
        mvn dependency:resolve -Dclassifier=javadoc


text:
'use strict';
console.log('hello index page')


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sap.data.db.pojo;

import java.io.Serializable;

/**
 *
 * @author C5178395
 */
public class BapiDD04TPojo implements Serializable {

	private static final long serialVersionUID = 1L;
    private BapiDD04TId id;
    private String DDTEXT;
    private String REPTEXT;
    private String SCRTEXT_S;
    private String SCRTEXT_M;
    private String SCRTEXT_L;

    public BapiDD04TPojo() {

    }

    public BapiDD04TPojo(BapiDD04TId id) {
        this.id = id;
    }

    public BapiDD04TPojo(BapiDD04TId id, String DDTEXT, String REPTEXT, String SCRTEXT_S, String SCRTEXT_M, String SCRTEXT_L) {
        this.id = id;
        this.DDTEXT = DDTEXT;
        this.REPTEXT = REPTEXT;
        this.SCRTEXT_S = SCRTEXT_S;
        this.SCRTEXT_M = SCRTEXT_M;
        this.SCRTEXT_L = SCRTEXT_L;
    }

    public BapiDD04TId getId() {
        return id;
    }

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

    public String getDDTEXT() {
        return DDTEXT;
    }

    public void setDDTEXT(String DDTEXT) {
        this.DDTEXT = DDTEXT;
    }

    public String getREPTEXT() {
        return REPTEXT;
    }

    public void setREPTEXT(String REPTEXT) {
        this.REPTEXT = REPTEXT;
    }

    public String getSCRTEXT_S() {
        return SCRTEXT_S;
    }

    public void setSCRTEXT_S(String SCRTEXT_S) {
        this.SCRTEXT_S = SCRTEXT_S;
    }

    public String getSCRTEXT_M() {
        return SCRTEXT_M;
    }

    public void setSCRTEXT_M(String SCRTEXT_M) {
        this.SCRTEXT_M = SCRTEXT_M;
    }

    public String getSCRTEXT_L() {
        return SCRTEXT_L;
    }

    public void setSCRTEXT_L(String SCRTEXT_L) {
        this.SCRTEXT_L = SCRTEXT_L;
    }

}


text:
Baka Reader
===========

[![Greenkeeper badge](https://badges.greenkeeper.io/alacroix/baka-reader.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/alacroix/baka-reader.svg?branch=master)](https://travis-ci.org/alacroix/baka-reader)
[![Coverage Status](https://coveralls.io/repos/github/alacroix/baka-reader/badge.svg?branch=master)](https://coveralls.io/github/alacroix/baka-reader?branch=master)


text: package armcostmanagement


text:
# -------------------------------------------------------------------------
# Copyright (c) Microsoft.  All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# --------------------------------------------------------------------------
import sys
from threading import Lock
from time import sleep

from cryptography.hazmat.primitives.padding import PKCS7
from .._common_conversion import _encode_base64
from .._serialization import (
    url_quote,
    _get_data_bytes_only,
    _len_plus
)
from ._encryption import(
    _get_blob_encryptor_and_padder,
)
from azure.common import (
    AzureHttpError,
)
from io import (BytesIO, IOBase, SEEK_CUR, SEEK_END, SEEK_SET, UnsupportedOperation)
from .models import BlobBlock
from math import ceil
from .._error import _ERROR_VALUE_SHOULD_BE_SEEKABLE_STREAM

def _upload_blob_chunks(blob_service, container_name, blob_name,
                        blob_size, block_size, stream, max_connections,
                        progress_callback, validate_content, lease_id, uploader_class,
                        maxsize_condition=None, if_match=None, timeout=None,
                        content_encryption_key=None, initialization_vector=None, resource_properties=None):

    encryptor, padder = _get_blob_encryptor_and_padder(content_encryption_key, initialization_vector,
                                                       uploader_class is not _PageBlobChunkUploader)

    uploader = uploader_class(
        blob_service,
        container_name,
        blob_name,
        blob_size,
        block_size,
        stream,
        max_connections > 1,
        progress_callback,
        validate_content,
        lease_id,
        timeout,
        encryptor,
        padder
    )

    uploader.maxsize_condition = maxsize_condition

    # ETag matching does not work with parallelism as a ranged upload may start
    # before the previous finishes and provides an etag
    uploader.if_match = if_match if not max_connections > 1 else None

    if progress_callback is not None:
        progress_callback(0, blob_size)

    if max_connections > 1:
        import concurrent.futures
        from threading import BoundedSemaphore

        '''
        Ensures we bound the chunking so we only buffer and submit 'max_connections' amount of work items to the executor.
        This is necessary as the executor queue will keep accepting submitted work items, which results in buffering all the blocks if
        the max_connections + 1 ensures the next chunk is already buffered and ready for when the worker thread is available.
        '''
        chunk_throttler = BoundedSemaphore(max_connections + 1)

        executor = concurrent.futures.ThreadPoolExecutor(max_connections)
        futures = []
        running_futures = []

        # Check for exceptions and fail fast.
        for chunk in uploader.get_chunk_streams():
            for f in running_futures:
                if f.done():
                    if f.exception():
                        raise f.exception()
                    else:
                        running_futures.remove(f)

            chunk_throttler.acquire()
            future = executor.submit(uploader.process_chunk, chunk)

            # Calls callback upon completion (even if the callback was added after the Future task is done).
            future.add_done_callback(lambda x: chunk_throttler.release())
            futures.append(future)
            running_futures.append(future)

        # result() will wait until completion and also raise any exceptions that may have been set.
        range_ids = [f.result() for f in futures]
    else:
        range_ids = [uploader.process_chunk(result) for result in uploader.get_chunk_streams()]

    if resource_properties:
        resource_properties.last_modified = uploader.last_modified
        resource_properties.etag = uploader.etag

    return range_ids

def _upload_blob_substream_blocks(blob_service, container_name, blob_name,
                                  blob_size, block_size, stream, max_connections,
                                  progress_callback, validate_content, lease_id, uploader_class,
                                  maxsize_condition=None, if_match=None, timeout=None):

    uploader = uploader_class(
        blob_service,
        container_name,
        blob_name,
        blob_size,
        block_size,
        stream,
        max_connections > 1,
        progress_callback,
        validate_content,
        lease_id,
        timeout,
        None,
        None
    )

    uploader.maxsize_condition = maxsize_condition

    # ETag matching does not work with parallelism as a ranged upload may start
    # before the previous finishes and provides an etag
    uploader.if_match = if_match if not max_connections > 1 else None

    if progress_callback is not None:
        progress_callback(0, blob_size)

    if max_connections > 1:
        import concurrent.futures
        executor = concurrent.futures.ThreadPoolExecutor(max_connections)
        range_ids = list(executor.map(uploader.process_substream_block, uploader.get_substream_blocks()))
    else:
        range_ids = [uploader.process_substream_block(result) for result in uploader.get_substream_blocks()]

    return range_ids

class _BlobChunkUploader(object):
    def __init__(self, blob_service, container_name, blob_name, blob_size,
                 chunk_size, stream, parallel, progress_callback,
                 validate_content, lease_id, timeout, encryptor, padder):
        self.blob_service = blob_service
        self.container_name = container_name
        self.blob_name = blob_name
        self.blob_size = blob_size
        self.chunk_size = chunk_size
        self.stream = stream
        self.parallel = parallel
        self.stream_start = stream.tell() if parallel else None
        self.stream_lock = Lock() if parallel else None
        self.progress_callback = progress_callback
        self.progress_total = 0
        self.progress_lock = Lock() if parallel else None
        self.validate_content = validate_content
        self.lease_id = lease_id
        self.timeout = timeout
        self.encryptor = encryptor
        self.padder = padder
        self.last_modified = None
        self.etag = None

    def get_chunk_streams(self):
        index = 0
        while True:
            data = b''
            read_size = self.chunk_size

            # Buffer until we either reach the end of the stream or get a whole chunk.
            while True:
                if self.blob_size:
                    read_size = min(self.chunk_size-len(data), self.blob_size - (index + len(data)))
                temp = self.stream.read(read_size)
                temp = _get_data_bytes_only('temp', temp)
                data += temp

                # We have read an empty string and so are at the end
                # of the buffer or we have read a full chunk.
                if temp == b'' or len(data) == self.chunk_size:
                    break

            if len(data) == self.chunk_size:
                if self.padder:
                    data = self.padder.update(data)
                if self.encryptor:
                    data = self.encryptor.update(data)
                yield index, BytesIO(data)
            else:
                if self.padder:
                    data = self.padder.update(data) + self.padder.finalize()
                if self.encryptor:
                    data = self.encryptor.update(data) + self.encryptor.finalize()
                if len(data) > 0:
                    yield index, BytesIO(data)
                break
            index += len(data)

    def process_chunk(self, chunk_data):
        chunk_bytes = chunk_data[1].read()
        chunk_offset = chunk_data[0]
        return self._upload_chunk_with_progress(chunk_offset, chunk_bytes)

    def _update_progress(self, length):
        if self.progress_callback is not None:
            if self.progress_lock is not None:
                with self.progress_lock:
                    self.progress_total += length
                    total = self.progress_total
            else:
                self.progress_total += length
                total = self.progress_total
            self.progress_callback(total, self.blob_size)

    def _upload_chunk_with_progress(self, chunk_offset, chunk_data):
        range_id = self._upload_chunk(chunk_offset, chunk_data)
        self._update_progress(len(chunk_data))
        return range_id

    def get_substream_blocks(self):
        assert self.chunk_size is not None
        lock = self.stream_lock
        blob_length = self.blob_size

        if blob_length is None:
            blob_length = _len_plus(self.stream)
            if blob_length is None:
                raise ValueError(_ERROR_VALUE_SHOULD_BE_SEEKABLE_STREAM.format('stream'))

        blocks = int(ceil(blob_length / (self.chunk_size * 1.0)))
        last_block_size = self.chunk_size if blob_length % self.chunk_size == 0 else blob_length % self.chunk_size

        for i in range(blocks):
            yield ('BlockId{}'.format("%05d" % i),
                   _SubStream(self.stream, i * self.chunk_size, last_block_size if i == blocks - 1 else self.chunk_size,
                              lock))

    def process_substream_block(self, block_data):
        return self._upload_substream_block_with_progress(block_data[0], block_data[1])

    def _upload_substream_block_with_progress(self, block_id, block_stream):
        range_id = self._upload_substream_block(block_id, block_stream)
        self._update_progress(len(block_stream))
        return range_id

    def set_response_properties(self, resp):
        self.etag = resp.etag
        self.last_modified = resp.last_modified

class _BlockBlobChunkUploader(_BlobChunkUploader):
    def _upload_chunk(self, chunk_offset, chunk_data):
        block_id = url_quote(_encode_base64('{0:032d}'.format(chunk_offset)))
        self.blob_service._put_block(
            self.container_name,
            self.blob_name,
            chunk_data,
            block_id,
            validate_content=self.validate_content,
            lease_id=self.lease_id,
            timeout=self.timeout,
        )
        return BlobBlock(block_id)

    def _upload_substream_block(self, block_id, block_stream):
        try:
            self.blob_service._put_block(
                self.container_name,
                self.blob_name,
                block_stream,
                block_id,
                validate_content=self.validate_content,
                lease_id=self.lease_id,
                timeout=self.timeout,
            )
        finally:
            block_stream.close()
        return BlobBlock(block_id)

class _PageBlobChunkUploader(_BlobChunkUploader):
    def _upload_chunk(self, chunk_start, chunk_data):
        chunk_end = chunk_start + len(chunk_data) - 1
        resp = self.blob_service._update_page(
            self.container_name,
            self.blob_name,
            chunk_data,
            chunk_start,
            chunk_end,
            validate_content=self.validate_content,
            lease_id=self.lease_id,
            if_match=self.if_match,
            timeout=self.timeout,
        )

        if not self.parallel:
            self.if_match = resp.etag

        self.set_response_properties(resp)

class _AppendBlobChunkUploader(_BlobChunkUploader):
    def _upload_chunk(self, chunk_offset, chunk_data):
        if not hasattr(self, 'current_length'):
            resp = self.blob_service.append_block(
                self.container_name,
                self.blob_name,
                chunk_data,
                validate_content=self.validate_content,
                lease_id=self.lease_id,
                maxsize_condition=self.maxsize_condition,
                timeout=self.timeout,
            )

            self.current_length = resp.append_offset
        else:
            resp = self.blob_service.append_block(
                self.container_name,
                self.blob_name,
                chunk_data,
                validate_content=self.validate_content,
                lease_id=self.lease_id,
                maxsize_condition=self.maxsize_condition,
                appendpos_condition=self.current_length + chunk_offset,
                timeout=self.timeout,
            )

        self.set_response_properties(resp)

class _SubStream(IOBase):
    def __init__(self, wrapped_stream, stream_begin_index, length, lockObj):
        # Python 2.7: file-like objects created with open() typically support seek(), but are not
        # derivations of io.IOBase and thus do not implement seekable().
        # Python > 3.0: file-like objects created with open() are derived from io.IOBase.
        try:
            wrapped_stream.seek(0, SEEK_CUR)
        except:
            raise ValueError("Wrapped stream must support seek().")

        self._lock = lockObj
        self._wrapped_stream = wrapped_stream
        self._position = 0
        self._stream_begin_index = stream_begin_index
        self._length = length
        self._count = 0
        self._buffer = BytesIO()
        self._read_buffer_size = 4 * 1024 * 1024

    def __len__(self):
        return self._length

    def close(self):
        if self._buffer:
            self._buffer.close()
        self._wrapped_stream = None
        IOBase.close(self)

    def fileno(self):
        return self._wrapped_stream.fileno()

    def flush(self):
        pass

    def read(self, n):
        if self.closed:
            raise ValueError("Stream is closed.")

        # adjust if out of bounds
        if n + self._position >= self._length:
            n = self._length - self._position

        # return fast
        if n is 0 or self._buffer.closed:
            return b''

        # attempt first read from the read buffer
        read_buffer = self._buffer.read(n)
        bytes_read = len(read_buffer)
        bytes_remaining = n - bytes_read

        # repopulate the read buffer from the underlying stream to fulfill the request
        # ensure the seek and read operations are done atomically (only if a lock is provided)
        if bytes_remaining > 0:
            with self._buffer:
                # lock is only defined if max_connections > 1 (parallel uploads)
                if self._lock:
                    with self._lock:
                        # reposition the underlying stream to match the start of the substream
                        absolute_position = self._stream_begin_index + self._position
                        self._wrapped_stream.seek(absolute_position, SEEK_SET)
                        # If we can't seek to the right location, our read will be corrupted so fail fast.
                        if self._wrapped_stream.tell() != absolute_position:
                            raise IOError("Stream failed to seek to the desired location.")
                        buffer_from_stream = self._wrapped_stream.read(self._read_buffer_size)
                else:
                    buffer_from_stream = self._wrapped_stream.read(self._read_buffer_size)

            if buffer_from_stream:
                self._buffer = BytesIO(buffer_from_stream)
                second_read_buffer = self._buffer.read(bytes_remaining)
                bytes_read += len(second_read_buffer)
                read_buffer += second_read_buffer

        self._position += bytes_read
        return read_buffer

    def readable(self):
        return True

    def readinto(self, b):
        raise UnsupportedOperation

    def seek(self, offset, whence=0):
        if whence is SEEK_SET:
            startIndex = 0
        elif whence is SEEK_CUR:
            startIndex = self._position
        elif whence is SEEK_END:
            startIndex = self._length
            offset = - offset
        else:
            raise ValueError("Invalid argument for the 'whence' parameter.")

        pos = startIndex + offset

        if pos > self._length:
            pos = self._length
        elif pos < 0:
            pos = 0

        self._position = pos
        return pos

    def seekable(self):
        return True

    def tell(self):
        return self._position

    def write(self):
        raise UnsupportedOperation

    def writelines(self):
        raise UnsupportedOperation

    def writeable(self):
        return False


text:
package com.alibaba.rocketmq.tools.command.message;

import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;

import com.alibaba.rocketmq.remoting.RPCHook;
import com.alibaba.rocketmq.tools.command.SubCommand;

/**
 * @auther lansheng.zj
 */
public class CheckMsgSubCommand implements SubCommand {
    @Override
    public String commandName() {
        return "checkMsg";
    }

    @Override
    public String commandDesc() {
        return "Check Message Store";
    }

    @Override
    public Options buildCommandlineOptions(Options options) {
        Option opt = new Option("p", "cStorePath", true, "cStorePath");
        opt.setRequired(true);
        options.addOption(opt);

        opt = new Option("s", "cSize ", true, "cSize");
        opt.setRequired(true);
        options.addOption(opt);

        opt = new Option("l", "lStorePath ", true, "lStorePath");
        opt.setRequired(true);
        options.addOption(opt);

        opt = new Option("z", "lSize ", true, "lSize");
        opt.setRequired(true);
        options.addOption(opt);

        return options;
    }

    @Override
    public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) {
        Store store = new Store(commandLine.getOptionValue("cStorePath").trim(), //
            Integer.parseInt(commandLine.getOptionValue("cSize").trim()), //
            commandLine.getOptionValue("lStorePath").trim(), //
            Integer.parseInt(commandLine.getOptionValue("lSize").trim()));
        store.load();
        store.traval(false);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
  <entity name="OpererExpedition" table="operer_expedition">
    <indexes>
      <index name="FK_OPERER_EXPEDITION" columns="EXEPT"/>
      <index name="FK_OPERER_EXPEDITION2" columns="PERSONNEL"/>
    </indexes>
    <id name="id" type="bigint" column="ID">
      <generator strategy="IDENTITY"/>
    </id>
    <field name="dateOperation" type="datetime" column="DATE_OPERATION" nullable="true"/>
    <field name="typeOperation" type="string" column="TYPE_OPERATION" length="30" nullable="true"/>
    <many-to-one field="personnel" target-entity="Personnel">
      <join-columns>
        <join-column name="PERSONNEL" referenced-column-name="ID"/>
      </join-columns>
    </many-to-one>
    <many-to-one field="exept" target-entity="Expedition">
      <join-columns>
        <join-column name="EXEPT" referenced-column-name="ID"/>
      </join-columns>
    </many-to-one>
  </entity>
</doctrine-mapping>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="DataSourceManagerImpl" format="xml" hash="3151468518">
    <data-source source="LOCAL" name="MySQL - iTicket@localhost" uuid="56782bcb-140d-4f3e-8f5a-4f4ed3e89dba">
      <driver-ref>mysql</driver-ref>
      <synchronize>true</synchronize>
      <jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
      <jdbc-url>jdbc:mysql://localhost:3306/iTicket</jdbc-url>
      <user-name>root</user-name>
      <user-password>dfc1dfcbdfd0dfdfdfc1dfc3df9cdf93</user-password>
      <schema-pattern>iTicket.*</schema-pattern>
      <default-schemas>iTicket.*</default-schemas>
      <driver-properties>
        <property name="zeroDateTimeBehavior" value="convertToNull" />
        <property name="tinyInt1isBit" value="false" />
      </driver-properties>
      <libraries />
    </data-source>
  </component>
</project>


text:
class AddLatLngToUsers < ActiveRecord::Migration[4.2]
  # Adds geolocation lat/lng to users based on their public GH location
  def change
    add_column :users, :lat, :decimal, precision: 8, scale: 6
    add_column :users, :lng, :decimal, precision: 9, scale: 6
  end
end