text:
<?php
class Profile {

    /**
    * Handler for client side form sumbit
    * @param Array $formPacket Collection of form items along with direct data
    * @return Array response packet
    */
    function updateBasicInfo($formPacket){
        $response = array();
        $email = $formPacket['email'];
        if ($email == 'aaron@extjs.com') {
            $success = false;
            $response['errors'] = array(
                'email'=>'already taken'
            );
        } else {
            $success = true;
        }
        $response['success'] = $success;
        // return form packet for demonstration/testing purposes
        $response['debug_formPacket'] = $formPacket;
        return $response;
    }

    /**
    * put your comment there...
    * This method configured with len=2, so 2 arguments will be sent
    * in the order according to the client side specified paramOrder
    * @param Number $userId
    * @param String $foo
    * @return Array response packet
    */
    function getBasicInfo($userId, $foo){
        return array(
            'success'=>true,
            'data'=>array(
                'foo'=>$foo,
                'name'=>'Aaron Conran',
                'company'=>'Ext JS, LLC',
                'email'=>'aaron@extjs.com'
             )
        );
    }

    function getPhoneInfo($userId) {
        return array(
            'success'=>true,
            'data'=>array(
                'cell'=>'443-555-1234',
                'office'=>'1-800-CALLEXT',
                'home'=>''
            )
        );
    }

    function getLocationInfo($userId) {
        return array(
            'success'=>true,
            'data'=>array(
                'street'=>'1234 Red Dog Rd.',
                'city'=>'Seminole',
                'state'=>'FL',
                'zip'=>33776
            )
        );
    }
}


text:
Thank you for considering making a contribution to Gradle Kotlin DSL Samples! This guide explains how to setup your environment for development and where to get help if you encounter trouble.

## Where is the code?

This repository (`gradle/kotlin-dsl`) contains extra samples for the Gradle Kotlin DSL only. If you intend to contribute an extra sample keep reading.

The Gradle Kotlin DSL code can be found in the [gradle/gradle](https://github.com/gradle/gradle) git repository in the `:kotlinDsl*` sub-projects.
Please direct your contributions to that repository and see [how to contribute to Gradle](https://github.com/gradle/gradle/blob/master/CONTRIBUTING.md).

## Accept Developer Certificate of Origin

In order for your contributions to be accepted, you must [sign off](https://git-scm.com/docs/git-commit#git-commit---signoff) your Git commits to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).

## Follow the Code of Conduct

In order to foster a more inclusive community, Gradle has adopted the [Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct/).

Contributors must follow the Code of Conduct outlined at [https://gradle.org/conduct/](https://gradle.org/conduct/).

## Making Changes

### Development Setup

In order to make changes to the Gradle Kotlin DSL Samples, you'll need:

* A text editor or IDE. We use and recommend the very latest [IntelliJ IDEA CE](http://www.jetbrains.com/idea/).
* A [Java Development Kit](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (JDK) version 1.8 or higher
* [git](https://git-scm.com/) and a [GitHub account](https://github.com/join)

Gradle Kotlin DSL uses a pull request model for contributions. Fork [gradle/kotlin-dsl](https://github.com/gradle/kotlin-dsl) and clone your fork.

Configure your Git username and email with
```
git config user.name 'First Last'
git config user.email user@example.com
```

Before importing the project into IntelliJ IDEA make sure to run `./gradlew check` at least once so all required files are generated.

### Development Workflow

Samples are located in the `samples/` directory of this repository.

To add a new sample, simply create a new directory under `samples/`. That directory must include a [Gradle Wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html), please copy it from another sample directory.

A test runs `tasks` on each sample, so your new sample will automatically be smoke-tested. Please consider adding a more precise test.

Samples are tested using [gradle/exemplar](https://github.com/gradle/exemplar). If your test can be expressed using [exemplar external samples](https://github.com/gradle/exemplar#configuring-external-samples), add the configuration files to `subprojects/samples-tests/src/exemplar/samples/$yourSampleDir`. Otherwise please add a JUnit based test in `subprojects/samples-tests/src/test/kotlin` extending from `AbstractSampleTest`.

After making changes, you can test them by running `./gradlew check`.

You can debug Gradle by adding `-Dorg.gradle.debug=true` when executing. Gradle will wait for you to attach a debugger at `localhost:5005` by default.

### Creating Commits And Writing Commit Messages

The commit messages that accompany your code changes are an important piece of documentation, and help make your contribution easier to review.
Please consider reading [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/). Minimally, follow these guidelines when writing commit messages.

* Keep commits discrete: avoid including multiple unrelated changes in a single commit
* Keep commits self-contained: avoid spreading a single change across multiple commits. A single commit should make sense in isolation
* If your commit pertains to a GitHub issue, include (`See #123`) in the commit message on a separate line
* [Sign off](https://git-scm.com/docs/git-commit#git-commit---signoff) your Git commits to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).

## Submitting Your Change

All code contributions should be submitted via a [pull request](https://help.github.com/articles/using-pull-requests) from a [forked GitHub repository](https://help.github.com/articles/fork-a-repo).

Once received, the pull request will be reviewed by a Gradle Kotlin DSL developer.

## Getting Help

If you run into any trouble, please reach out to us in the #kotlin-dsl channel of the [Gradle Community Slack](https://join.slack.com/t/gradle-community/shared_invite/enQtNDE3MzAwNjkxMzY0LTYwMTk0MWUwN2FiMzIzOWM3MzBjYjMxNWYzMDE1NGIwOTJkMTQ2NDEzOGM2OWIzNmU1ZTk5MjVhYjFhMTI3MmE).

## Resources

* The [Gradle Kotlin DSL Primer](https://docs.gradle.org/current/userguide/kotlin_dsl.html) is a must read.
* The Gradle [user manual](https://docs.gradle.org/current/userguide/userguide.html) and [guides](https://gradle.org/guides/) contain Kotlin DSL build script samples that demonstrate how to use all Gradle features.
* Some [diagrams](../doc/c4) provide a good overview of how the Kotlin DSL is structured and interacts with Gradle, Gradle plugins, IDEs.

## Our Thanks
We deeply appreciate your effort toward improving Gradle. If you enjoyed this process, perhaps you should consider getting [paid to develop Gradle](https://gradle.com/careers)?

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">

  <title>translate.convert.accesskey</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />

         Home

         Trees

         Indices

         Help

Translate Toolkit

        Package translate ::
        Package convert ::
        Module accesskey

[hide private]

[frames] | no frames]

Module accesskey

source code

functions used to manipulate access keys in strings

        Functions
        [hide private]

          extract(string,
        accesskey_marker=u'&')

      Extract the label and accesskey from a label+accesskey string

            source code

      unicode or None

          combine(label,
        accesskey,
        accesskey_marker=u'&')

      Combine a label and and accesskey to form a label+accesskey string

            source code

        Variables
        [hide private]

        DEFAULT_ACCESSKEY_MARKER = u'&'

Imports:
  XMLEntityPlaceable

        Function Details
        [hide private]

extract(string,
        accesskey_marker=u'&')

  	source code

Extract the label and accesskey from a label+accesskey string

The function will also try to ignore &entities; which would
  obviously not contain accesskeys.

Parameters:

string (Unicode) - A string that might contain a label with accesskey marker

accesskey_marker (Char) - The character that is used to prefix an access key

combine(label,
        accesskey,
        accesskey_marker=u'&')

  	source code

Combine a label and and accesskey to form a label+accesskey string

We place an accesskey marker before the accesskey in the label and
  this creates a string with the two combined e.g. "File" +
  "F" = "&File"

Parameters:

label (unicode) - a label

accesskey (unicode char) - The accesskey

Returns: unicode or None

label+accesskey string or None if uncombineable

         Home

         Trees

         Indices

         Help

Translate Toolkit

    Generated by Epydoc 3.0.1 on Wed Mar  3 16:35:53 2010

      http://epydoc.sourceforge.net


text:
<?php

namespace Phpactor\WorseReflection\Core\Virtual;

use Phpactor\WorseReflection\Core\Reflection\ReflectionMember;
use Phpactor\WorseReflection\Core\Reflection\ReflectionProperty;

class VirtualReflectionProperty extends VirtualReflectionMember implements ReflectionProperty
{
    public function isVirtual(): bool
    {
        return true;
    }

    public function isStatic(): bool
    {
        return false;
    }

    public function memberType()
    {
        return ReflectionMember::TYPE_PROPERTY;
    }

    public function isPromoted(): bool
    {
        return false;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/white"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="me.iamsnaveen.moviescentral.app.MainActivity"
    tools:showIn="@layout/activity_main">

    <GridView
        android:id="@+id/Movies_Poster_Grid_View"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:horizontalSpacing="10dp"
        android:paddingTop="10dp"
        android:paddingLeft="5dp"
        android:paddingRight="5dp"
        android:verticalSpacing="10dp"
        android:numColumns="3">

    </GridView>
</RelativeLayout>


text:
<link rel="import" href="../polymer/polymer.html">
<script src="lib/stl-serializer.js"></script>

<polymer-element name="stl-serializer" extends="usco-serializer-base">
  <script>
    Polymer("stl-serializer",{
      created:function()
      {
        this.super();
        STLSerializer = require( "stl-serializer" );
        this.serializer = new STLSerializer();
      },
      //public api
      serialize:function(rootElement, binary)
      {
        return this.serializer.serialize( rootElement, binary );
      }
    });
  </script>
</polymer>


text:
require 'active_support/core_ext/array/extract_options'
require 'active_support/core_ext/class/attribute_accessors'
require 'active_support/core_ext/object/blank'
require 'active_support/inflector'

# Allows us to do `true.is_a?(Boolean)`
module Boolean; end
class TrueClass; include Boolean; end
class FalseClass; include Boolean; end

require 'nokogiri'
require 'oauth'

require 'ruxero/application'
require 'ruxero/application/partner'
require 'ruxero/application/private'
require 'ruxero/application/public'
require 'ruxero/base_model/attributable'
require 'ruxero/base_model/finders'
require 'ruxero/base_model/parsers'
require 'ruxero/base_model/persistable'
require 'ruxero/configuration'
require 'ruxero/exceptions'
require 'ruxero/models/account'
require 'ruxero/models/contact'
require 'ruxero/models/invoice'
require 'ruxero/models/organisation'
require 'ruxero/models/payment'
require 'ruxero/models/user'
require 'ruxero/version'

module Ruxero
end


text:
package gov.hhs.onc.dcdt.crypto;

import gov.hhs.onc.dcdt.ToolException;

public class CryptographyException extends ToolException {
    private final static long serialVersionUID = 0L;

    public CryptographyException() {
        super();
    }

    public CryptographyException(Throwable cause) {
        super(cause);
    }

    public CryptographyException(String message) {
        super(message);
    }

    public CryptographyException(String message, Throwable cause) {
        super(message, cause);
    }
}


text:
package joshie.harvest.knowledge.gui.letter;

import joshie.harvest.api.core.Letter;
import joshie.harvest.core.network.PacketHandler;
import joshie.harvest.knowledge.packet.PacketButtonReject;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager;

public class GuiButtonReject extends GuiButton {
    private final Letter letter;

    public GuiButtonReject(Letter letter, int x, int y) {
        super(1, x, y, "");
        this.letter = letter;
        this.width = 14;
        this.height = 16;
    }

    @Override
    public void drawButton(Minecraft mc, int mouseX, int mouseY) {
        if (visible) {
            //mc.getTextureManager().bindTexture(LEFT_GUI);
            GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
            hovered = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height;
            GlStateManager.enableBlend();
            GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
            GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
            mc.getTextureManager().bindTexture(GuiLetter.LETTER_TEXTURE);
            drawTexturedModalRect(xPosition, yPosition, 20, 224 + (!hovered ? 16: 0), 14, 16);
            mouseDragged(mc, mouseX, mouseY);
        }
    }

    @Override
    public void mouseReleased(int mouseX, int mouseY) {
        PacketHandler.sendToServer(new PacketButtonReject(letter));
    }
}


text:
function [aData,aChannel] = GetVolume(this, aChannel)
aDataSet = this.aDataSet;
if nargin<2
    aChannel = this.askuserChannel;
end
vSizeX = aDataSet.GetSizeX;
vSizeY = aDataSet.GetSizeY;
vSizeZ = aDataSet.GetSizeZ;
vLayersSize = [vSizeX * vSizeY, vSizeZ];
vSize = [vSizeX, vSizeY, vSizeZ];
h = waitbar(0,'Please wait...');
if strcmp(aDataSet.GetType, 'eTypeUInt8')
  aData = zeros(vLayersSize, 'uint8');
  for vIndexZ = 1:vSizeZ
    aData(:, vIndexZ) = typecast(aDataSet.GetDataSubVolumeAs1DArrayBytes(...
      0, 0, vIndexZ - 1, aChannel, 0, vSizeX, vSizeY, 1), 'uint8');
  prog_bar = double(vIndexZ/vSizeZ);
      waitbar(prog_bar,h,sprintf('Slice %d of %d',vIndexZ, vSizeZ));
  end
elseif strcmp(aDataSet.GetType, 'eTypeUInt16')
  aData = zeros(vLayersSize, 'uint16');
  for vIndexZ = 1:vSizeZ
      aData(:, vIndexZ) = typecast(aDataSet.GetDataSubVolumeAs1DArrayShorts(...
          0, 0, vIndexZ - 1, aChannel, 0, vSizeX, vSizeY, 1), 'uint16');
      prog_bar = double(vIndexZ/vSizeZ);
      waitbar(prog_bar,h,sprintf('Slice %d of %d',vIndexZ, vSizeZ));
  end
elseif strcmp(aDataSet.GetType, 'eTypeFloat')
  aData = zeros(vLayersSize, 'single');
  for vIndexZ = 1:vSizeZ
    aData(:, vIndexZ) = typecast(aDataSet.GetDataSubVolumeAs1DArrayFloats(...
      0, 0, vIndexZ - 1, aChannel, 0, vSizeX, vSizeY, 1), 'single');
  prog_bar = double(vIndexZ/vSizeZ);
      waitbar(prog_bar,h,sprintf('Slice %d of %d',vIndexZ, vSizeZ));
  end
end
close(h);
aData = reshape(aData, vSize);


text:
PARENT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd -P)
cd "${PARENT_PATH}"

../blueutil -p 1

if [[ $(../blueutil -p) -eq 1 ]]
then
    ./notify.sh -m "Bluetooth turned on" -i success
else
    ./notify.sh -m "Failed to turn Bluetooth on. Click to retry." -i failure -c "blt-on.sh"
fi


text:
import locale
from natural.constant import FILESIZE_SUFFIX
from natural.number import _format

FILESIZE_BASE = dict(
    decimal=1000,
    binary=1024,
    gnu=1024,
)

def filesize(value, format='binary', digits=2):
    '''
    Convert a file size into natural readable format. Multiple formats are
    supported.

    :param value: size
    :param format: default ``decimal``, choices ``binary``, ``decimal`` or
                   ``gnu``
    :param digits: default ``2``

    >>> print(filesize(123))
    123.00 B
    >>> print(filesize(123456))
    120.56 KiB
    >>> print(filesize(1234567890))
    1.15 GiB
    '''

    if format not in FILESIZE_SUFFIX:
        raise TypeError

    base = FILESIZE_BASE[format]
    size = int(value)
    sign = size < 0 and u'-' or ''
    size = abs(size)

    for i, suffix in enumerate(FILESIZE_SUFFIX[format]):
        unit = base ** (i + 1)
        if size < unit:
            result = u''.join([
                sign,
                _format(base * size / float(unit), digits),
                u' ',
                suffix,
            ])
            if format == 'gnu':
                result = result.replace(' ', '')
            return result

    raise OverflowError

def decimalsize(value):
    '''
    Wrapper for :py:func:`filesize`.

    >>> print(decimalsize(123))
    123.00 B
    >>> print(decimalsize(123456))
    123.46 kB
    >>> print(decimalsize(1234567890))
    1.23 GB
    '''
    return filesize(value, format='decimal')

def binarysize(value):
    '''
    Wrapper for :py:func:`filesize`.

    >>> print(binarysize(123))
    123.00 B
    >>> print(binarysize(123456))
    120.56 KiB
    >>> print(binarysize(1234567890))
    1.15 GiB
    '''
    return filesize(value, format='binary')

def gnusize(value, digits=1):
    '''
    Wrapper for :py:func:`filesize`.

    >>> print(gnusize(123))
    123.0B
    >>> print(gnusize(123456))
    120.6K
    >>> print(gnusize(1234567890))
    1.1G
    '''
    return filesize(value, format='gnu', digits=digits)


text:
CUDArray is a CUDA-accelerated subset of the [NumPy](http://www.numpy.org/) library.
The goal of CUDArray is to combine the easy of development from the NumPy with the computational power of Nvidia GPUs in a lightweight and extensible framework.

CUDArray currently imposes many limitations in order to span a manageable subset of the NumPy library.
Nonetheless, it supports a neural network pipeline as demonstrated in the project [deeppy](http://github.com/andersbll/deeppy/).

### Features
- Drop-in replacement for NumPy (limitations apply).
- Fast array operations based on cuBLAS, cuRAND and cuDNN.
- (somewhat) Simple C++/CUDA wrapper based on Cython.
- Extends NumPy with specialized functions for neural networks.
- CPU fall-back when CUDA is not available.

### Installation
##### With CUDA back-end
First, you should consider specifying the following environment variables.
 - `INSTALL_PREFIX` (default: `/usr/local`). Path where to install libcudarray. For the Anaconda Python distribution this should be `/path/to/anaconda`.
 - `CUDA_PREFIX` (default: `/usr/local/cuda`). Path to the CUDA SDK organized in `bin/`, `lib/`, `include/` folders.
 - `CUDNN_ENABLED`. Set `CUDNN_ENABLED` to `1` to include cuDNN operations in `libcudarray`.

Then build and install libcudarray with

    make
    make install

Finally, install the cudarray Python package:

    python setup.py install

##### Without CUDA back-end
Install the cudarray Python package:

    python setup.py --without-cuda install

### Documentation
Please consult the [technical report][techreport] for now.
Proper documentation is on the TODO list.

### Contact
Feel free to report an [issue](http://github.com/andersbll/cudarray/issues) for feature requests and bug reports.

For a more informal chat, visit #cudarray on the [freenode](http://freenode.net/) IRC network.

### Citation
If you use CUDArray for research, please cite the [technical report][techreport]:

    @techreport{larsen2014cudarray,
      author = "Larsen, Anders Boesen Lindbo",
      title = "{CUDArray}: {CUDA}-based {NumPy}",
      institution = "Department of Applied Mathematics and Computer Science, Technical University of Denmark",
      year = "2014",
      number = "DTU Compute 2014-21",
    }

### TODO
- Proper transpose support,
- Add functionality for copying from NumPy array to existing CUDArray array.
- FFT module based on cuFFT.
- Unit tests!
- Add documentation to wiki.
- Windows/OS X support.

### Influences
Thanks to the following projects for inspiration.
 - [cudamat](http://github.com/cudamat/cudamat)
 - [PyCUDA](http://mathema.tician.de/software/pycuda/)
 - [mshadow](http://github.com/tqchen/mshadow/)
 - [Caffe](http://caffe.berkeleyvision.org/)
 - [CUDPP](http://cudpp.github.io/)

[techreport]: http://www2.compute.dtu.dk/~abll/pubs/larsen2014cudarray.pdf


text:
import rosbag
import sys
import os

bag_filename = sys.argv[1]
bag_path, bag_name = os.path.split(bag_filename)
gps_outpath = bag_path
gps_outname = bag_name[:-4] + 'cov.out'
gps_filename = gps_outpath + '/' + gps_outname

bag = rosbag.Bag(bag_filename)

f = open(gps_filename, 'w')
writeNextLine = False

for topic, msg, t in bag.read_messages(topics=['/novatel_port_out']):
    if writeNextLine:
        f.write(msg.data)
        writeNextLine = False
    if "INSCOV" in msg.data:
        f.write(msg.data)
        writeNextLine = True

f.close()


text:
@interface HomeRecipeModelCell : BaseCollectionViewCell
@property (strong, nonatomic) IBOutlet UIImageView *imageidView;
@property (strong, nonatomic) IBOutlet UILabel *titleLabel;
@property (strong, nonatomic) IBOutlet UILabel *Description;
@property (strong, nonatomic) IBOutlet UILabel *collectionCountLabel;
@property (strong, nonatomic) IBOutlet UILabel *likeCountLabel;

@end


text:
using flaming_octo_meme.Entities;
using flaming_octo_meme.Map;
using Microsoft.Xna.Framework;

namespace flaming_octo_meme.Spells
{
	/// <summary>
	/// A generic spell interface.
	/// </summary>
	public interface ISpell
	{
        int Cooldown { get; }
		void Cast(Game game, Player player, Vector2 position, Direction direction);
	}
}


text:
<?php
$this->breadcrumbs=array(
	'Register',
);?>

<?php echo Yii::t('app','Registrasi Mahasiswa') ?>

	<?php if(Yii::app()->user->hasFlash('message')):?>

			<?php echo Yii::app()->user->getFlash('message'); ?>

	<?php endif;?>

	<?php $form = $this->beginWidget('CActiveForm', array(
		'id' => 'mahasiswa-form',
		'enableAjaxValidation' => true,
	)); ?>
		<?php  if($mahasiswa->isNewRecord):?>

				<?php echo $form->labelEx($mahasiswa,'nim'); ?>
				<?php echo $form->textField($mahasiswa,'nim',array('size'=>60,'maxlength'=>255)); ?>
				<?php echo $form->error($mahasiswa,'nim'); ?>

		<?php else:?>

<?php echo Yii::t('app','Inputan dengan tanda * wajib di isi')?>

			<fieldset>
				<legend><?php echo Yii::t('app','Informasi Mahasiswa')?></legend>

					<?php echo $form->labelEx($mahasiswa,'nim'); ?>
					<?php echo $form->textField($mahasiswa,'nim',array('size'=>60,'maxlength'=>255,'readonly' => 'readonly')); ?>
					<?php echo $form->error($mahasiswa,'nim'); ?>

					<?php echo $form->labelEx($mahasiswa,'namaLengkap'); ?>
					<?php echo $form->textField($mahasiswa,'namaLengkap',array('size'=>60,'maxlength'=>255,'readonly' => 'readonly')); ?>
					<?php echo $form->error($mahasiswa,'namaLengkap'); ?>

					<?php echo $form->labelEx($mahasiswa,'tempatLahir'); ?>
					<?php echo $form->textField($mahasiswa,'tempatLahir',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($mahasiswa,'tempatLahir'); ?>

					<?php echo $form->labelEx($mahasiswa,'tanggalLahir'); ?>
					<?php //echo $form->textField($mahasiswa,'tanggalLahir',array('size'=>60,'maxlength'=>255)); ?>
					<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
						'name'=>'Mahasiswa[tanggalLahir]',
						'value' => $mahasiswa->tanggalLahir,
						// additional javascript options for the date picker plugin
						'options'=>array(
							'changeYear' => true,
							'dateFormat' => 'yy-mm-dd',
							'yearRange' => 'c-30:c',
						)));?>
					<?php echo $form->error($mahasiswa,'tanggalLahir'); ?>

					<?php echo $form->labelEx($mahasiswa,'alamatAsal'); ?>
					<?php echo $form->textField($mahasiswa,'alamatAsal',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($mahasiswa,'alamatAsal'); ?>

					<?php echo $form->labelEx($mahasiswa,'alamatTinggal'); ?>
					<?php echo $form->textField($mahasiswa,'alamatTinggal',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($mahasiswa,'alamatTinggal'); ?>

					<?php echo $form->labelEx($mahasiswa,'jenjangId'); ?>
					<?php echo $form->dropDownList($mahasiswa, 'jenjangId',Jenjang::model()->listData)?>
					<?php echo $form->error($mahasiswa,'jenjangId'); ?>

					<?php echo $form->labelEx($mahasiswa,'fakultasId'); ?>
					<?php echo $form->dropDownList($mahasiswa,'fakultasId',Fakultas::model()->listData,array(
						'empty' => Yii::t('app','Select Fakultas'),
						'ajax' => array(
							'url' => array('dependentSelectJurusan'),
							'data' => array('fakultasId' => 'js:jQuery(this).val()'),
							'replace' => '#Mahasiswa_jurusanId'
						)
					)); ?>
					<?php echo $form->error($mahasiswa,'fakultasId'); ?>

					<?php echo $form->labelEx($mahasiswa,'jurusanId'); ?>
					<?php echo $form->dropDownList($mahasiswa,'jurusanId', Jurusan::model()->listData, array(
						'empty' => Yii::t('app','Pilih Jurusan')))?>
					<?php echo $form->error($mahasiswa,'jurusanId'); ?>

					<?php echo $form->labelEx($mahasiswa,'jenisKelamin'); ?>
					<?php echo $form->dropDownList($mahasiswa,'jenisKelamin',array(
						Mahasiswa::LAKI_LAKI => Yii::t('app','Laki-laki'),
						Mahasiswa::PEREMPUAN => Yii::t('app','Perempuan'),
					)); ?>
					<?php echo $form->error($mahasiswa,'jenisKelamin'); ?>

					<?php echo $form->labelEx($mahasiswa,'phone1'); ?>
					<?php echo $form->textField($mahasiswa,'phone1',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($mahasiswa,'phone1'); ?>

					<?php echo $form->labelEx($mahasiswa,'phone2'); ?>
					<?php echo $form->textField($mahasiswa,'phone2',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($mahasiswa,'phone2'); ?>

			</fieldset>

			<fieldset>
				<legend><?php echo Yii::t('app','Informasi User')?></legend>

					<?php echo $form->labelEx($mahasiswa,'email'); ?>
					<?php echo $form->textField($mahasiswa,'email',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($mahasiswa,'email'); ?>

					<?php echo $form->labelEx($mahasiswa,'password'); ?>
					<?php echo $form->passwordField($mahasiswa,'password',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($mahasiswa,'password'); ?>

					<?php echo $form->labelEx($mahasiswa,'confirmPassword'); ?>
					<?php echo $form->passwordField($mahasiswa,'confirmPassword',array('size'=>60,'maxlength'=>255)); ?>
					<?php echo $form->error($mahasiswa,'confirmPassword'); ?>

				<?php if(extension_loaded('gd')): ?>

					<?php $this->widget('CCaptcha'); ?>

					<?php echo $form->labelEx($mahasiswa,'verifyCode'); ?>
					<?php echo $form->textField($mahasiswa,'verifyCode'); ?>
					<?php echo $form->error($mahasiswa,'verifyCode',array('class'=>'error')); ?>

				<?php endif; ?>
			</fieldset>

		<?php endif?>

			<?php echo CHtml::submitButton(Yii::t('app','DAFTAR')); ?>

	<?php $this->endWidget(); ?>


text:
var easyParser = require('./../libs/easyParser');
var extend = require('./../libs/extend');
var DEFAULT_CONFIG = require('./whois.default');

var CONFIG = extend(DEFAULT_CONFIG, {
    HOST: 'whois.nawang.cn',
    FIELDS: {
        DomainName: { prefix: 'Domain Name:'},
        CreationDate: { prefix: 'Creation Date:'},
        ExpirationDate: { prefix: 'Registrar Registration Expiration Date:'},
        RawData: { prefix: ''},

        NameServer: { prefix: 'Name Server:'},
        DomainStatus: { prefix: 'Domain Status:'},

        Registrar: { prefix: 'Registrar:'},
        RegistrarIanaId: { prefix: 'Registrar IANA ID:'},
        RegistrarAbuseContactEmail: { prefix: 'Registrar Abuse Contact Email:'},
        RegistrarAbuseContactPhone: { prefix: 'Registrar Abuse Contact Phone:'},

        RegistrantId: { prefix: 'Registrant ID:'},
        Registrant: { prefix: 'Registrant:'},
        SponsoringRegistrar: { prefix: 'Sponsoring Registrar:'},
        RegistrantContactEmail: { prefix: 'Registrant Contact Email:'},

        RegistryFinanceID: { prefix: 'Registry Registrant ID:'},
        FinanceName: { prefix: 'Registrant Name:'},
        FinanceOrganization: { prefix: 'Registrant Organization:'},
        FinanceStreet: { prefix: 'Registrant Street:'},
        FinanceCity: { prefix: 'Registrant City:'},
        FinanceProvince: { prefix: 'Registrant State/Province:'},
        FinancePostalCode: { prefix: 'Registrant Postal Code:'},
        FinanceCountry: { prefix: 'Registrant Country:'},
        FinancePhone: { prefix: 'Registrant Phone:'},
        FinancePhoneExt: { prefix: 'Registrant Phone Ext:'},
        FinanceFax: { prefix: 'Registrant Fax:'},
        FinanceFaxExt: { prefix: 'Registrant Fax Ext:'},
        FinanceEmail: { prefix: 'Registrant Email:'},

        RegistryAdminID: { prefix: 'Registry Admin ID:'},
        AdminName: { prefix: 'Admin Name:'},
        AdminOrganization: { prefix: 'Admin Organization:'},
        AdminStreet: { prefix: 'Admin Street:'},
        AdminCity: { prefix: 'Admin City:'},
        AdminProvince: { prefix: 'Admin State/Province:'},
        AdminPostalCode: { prefix: 'Admin Postal Code:'},
        AdminCountry: { prefix: 'Admin Country:'},
        AdminPhone: { prefix: 'Admin Phone:'},
        AdminPhoneExt: { prefix: 'Admin Phone Ext:'},
        AdminFax: { prefix: 'Admin Fax:'},
        AdminFaxExt: { prefix: 'Admin Fax Ext:'},
        AdminEmail: { prefix: 'Admin Email:'},

        RegistryTechID: { prefix: 'Registry Tech ID:'},
        TechName: { prefix: 'Tech Name:'},
        TechOrganization: { prefix: 'Tech Organization:'},
        TechStreet: { prefix: 'Tech Street:'},
        TechCity: { prefix: 'Tech City:'},
        TechProvince: { prefix: 'Tech State/Province:'},
        TechPostalCode: { prefix: 'Tech Postal Code:'},
        TechCountry: { prefix: 'Tech Country:'},
        TechPhone: { prefix: 'Tech Phone:'},
        TechPhoneExt: { prefix: 'Tech Phone Ext:'},
        TechFax: { prefix: 'Tech Fax:'},
        TechFaxExt: { prefix: 'Tech Fax Ext:'},
        TechEmail: { prefix: 'Tech Email:'}
    },
    parseJson: function(whoisData){
        var separator = '\n';
        var list = whoisData.split(separator);
        for(var index in list){
            var str = list[index];
            str = str.replace(/(^\s*)|(\s*$)/g, "");
            if(str.indexOf('Domain Status:') === 0) {
                var failedStr = str;
                var needReplacePrefix = [
                    'Domain Status:',
                    'Registrant ID:',
                    'Registrant:',
                    'Registrant Contact Email:',
                    'Sponsoring Registrar:',
                    'Name Server:',
                    'Registration Time:'
                ];
                //开始截取
                for(var i in needReplacePrefix){
                    failedStr = failedStr.split(needReplacePrefix[i]).join(separator + needReplacePrefix[i]);
                }
                break;
            }
        }
        whoisData = whoisData.replace(str, failedStr);

        return easyParser(this, whoisData, separator);
    },
});

module.exports = CONFIG;


text:
import re

from oslo_config import cfg
from oslo_log import log

from vitrage.common.constants import DatasourceOpts as DSOpts
from vitrage.utils import file as file_utils

CONF = cfg.CONF
LOG = log.getLogger(__name__)
KAPACITOR_HOST = 'kapacitor_host'
KAPACITOR = 'kapacitor'
HOST = 'host'
TYPE = 'type'
NAME = 'name'
ALERT = 'alert'
VITRAGE_RESOURCE = 'vitrage_resource'

class KapacitorConfig(object):
    def __init__(self):
        try:
            kapacitor_config_file = CONF.kapacitor[DSOpts.CONFIG_FILE]
            kapacitor_config = file_utils.load_yaml_file(kapacitor_config_file)
            kapacitor = kapacitor_config[KAPACITOR]

            self.mappings = [self._create_mapping(config)
                             for config in kapacitor]
        except Exception:
            LOG.exception('Failed in init.')
            self.mappings = []

    @staticmethod
    def _create_mapping(config):
        return KapacitorHostMapping(config[ALERT][HOST],
                                    config[VITRAGE_RESOURCE][TYPE],
                                    config[VITRAGE_RESOURCE][NAME])

    def get_vitrage_resource(self, kapacitor_host):
        """Get Resource type and name for the given kapacitor host name

        Go over the configuration mappings one by one, and return the resource
        by the first mapping that applies to kapacitor host name.

        :param kapacitor_host: kapacitor host name
        :return: Vitrage (resource type, resource name)
        """
        for mapping in self.mappings:
            mapped_resource = mapping.map(kapacitor_host)
            if mapped_resource:
                return mapped_resource

        return None

class KapacitorHostMapping(object):
    KAPACITOR_HOST_NAME = '${' + KAPACITOR_HOST + '}'

    def __init__(self, kapacitor_host_regexp, resource_type, resource_name):
        self.kapacitor_host_regexp = re.compile(kapacitor_host_regexp)
        self.resource_type = resource_type
        self.resource_name = resource_name

    def map(self, kapacitor_host):
        """Check if the mapping applies to this service

        :param kapacitor_host: kapacitor host name
        :return: a tuple of (resource type, resource name)
        In case kapacitor_host_regexp is ${kapacitor_host},
        return kapacitor host name as the resource name
        """

        if kapacitor_host and self.kapacitor_host_regexp.match(kapacitor_host):
            resource_name = kapacitor_host\
                if self.resource_name == self.KAPACITOR_HOST_NAME \
                else self.resource_name
            return self.resource_type, resource_name
        else:
            return None


text:
<!DOCTYPE html>

    <title>Classes  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset='utf-8'>

JSQCoreDataKit 9.0.3 Docs (100% documented)

View on GitHub

          <form role="search" action="search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>

        JSQCoreDataKit Reference

        Classes  Reference

            Guides

                Getting Started

            Classes

                CoreDataStack

            Enumerations

                MigrationError

                ModelFileExtension

                StoreType

            Extensions

                NSManagedObjectContext

            Protocols

                CoreDataEntityProtocol

            Structures

                CoreDataModel

                CoreDataStackProvider

Classes

The following classes are available globally.

                    CoreDataStack

An instance of CoreDataStack encapsulates the entire Core Data stack.
It manages the managed object model, the persistent store coordinator, and managed object contexts.

It is composed of a main context and a background context.
These two contexts operate on the main queue and a private background queue, respectively.
Both are connected to the persistent store coordinator and data between them is perpetually kept in sync.

Changes to a child context are propagated to its parent context and eventually the persistent store when saving.

Warning

    You cannot create a CoreDataStack instance directly. Instead, use a CoreDataStackProvider for initialization.

                        See more

Declaration

Swift

public final class CoreDataStack

extension CoreDataStack: Equatable

extension CoreDataStack: CustomStringConvertible

© 2020 Jesse Squires. All rights reserved. (Last updated: 2020-09-25)

Generated by jazzy ♪♫ v0.13.5, a Realm project.


text:
<?php defined('BX_DOL') or die('hack attempt');

class BxLinkedinStudioPage extends BxTemplStudioModule
{
    function __construct($sModule = "", $sPage = "")
    {
        parent::__construct($sModule, $sPage);

        $this->aMenuItems = array(
            array('name' => 'settings', 'icon' => 'cogs', 'title' => '_adm_lmi_cpt_settings'),
            array('name' => 'help', 'icon' => 'question', 'title' => '_sys_connect_information'),
        );
    }

    function getHelp ()
    {
        $oModule = BxDolModule::getInstance('bx_linkedin');
        return _t('_bx_linkedin_information_block', BX_DOL_URL_ROOT . $oModule -> _oConfig -> getBaseUri() . 'handle');
    }
}

/** @} */


text:
'use strict'

const db = require('APP/db')
const User = db.model('users')
const Student = db.model('students')
const Teacher = db.model('teachers')

const {mustBeLoggedIn, forbidden, selfOnly} = require('./auth.filters')

module.exports = require('express').Router()
	.get('/', forbidden('only admins can list users'), (req, res, next) =>
		User.findAll()
		.then(users => res.json(users))
		.catch(next))
	.post('/', (req, res, next) =>
		User.create(req.body)
		.then(user => res.status(201).json(user))
		.catch(next))
	.get('/:id', mustBeLoggedIn, (req, res, next) =>
		User.findById(req.params.id)
		.then(user => res.json(user))
		.catch(next))
	.put('/:id', mustBeLoggedIn, selfOnly('update'),  (req, res, next) =>
		User.findById(req.params.id)
		.then(user => user.update(req.body))
		.then(user => res.json(user))
		.catch(next))
	.post('/student', (req, res, next) =>
		Student.create({teacher_id: req.body.teacher, user: req.body}, {include: [User]})
			.then(student => res.send(student))
			.catch(next))
	.post('/teacher', (req, res, next) =>
		Teacher.create({user: req.body}, {include: [User]})
			.then(teacher => res.send(teacher))
	 		.catch(next))


text:
package org.sat4j.minisat.constraints;

import java.io.Serializable;

import org.sat4j.core.Vec;
import org.sat4j.minisat.core.Constr;
import org.sat4j.minisat.core.DataStructureFactory;
import org.sat4j.minisat.core.ILits;
import org.sat4j.minisat.core.Learner;
import org.sat4j.minisat.core.Propagatable;
import org.sat4j.minisat.core.UnitPropagationListener;
import org.sat4j.specs.ContradictionException;
import org.sat4j.specs.IVec;
import org.sat4j.specs.IVecInt;

/**
 * @author leberre To change the template for this generated type comment go to
 *         Window>Preferences>Java>Code Generation>Code and Comments
 */
public abstract class AbstractDataStructureFactory implements
        DataStructureFactory, Serializable {

    /**
	 *
	 */
	private static final long serialVersionUID = 1L;

	/*
     * (non-Javadoc)
     *
     * @see org.sat4j.minisat.core.DataStructureFactory#conflictDetectedInWatchesFor(int)
     */
    public void conflictDetectedInWatchesFor(int p, int i) {
        for (int j = i + 1; j < tmp.size(); j++) {
            lits.watch(p, tmp.get(j));
        }
    }

    /*
     * (non-Javadoc)
     *
     * @see org.sat4j.minisat.core.DataStructureFactory#getWatchesFor(int)
     */
    public IVec<Propagatable> getWatchesFor(int p) {
        tmp.clear();
        lits.watches(p).moveTo(tmp);
        return tmp;
    }

    protected ILits lits;

    protected AbstractDataStructureFactory() {
        lits = createLits();
    }

    protected abstract ILits createLits();

    private final IVec<Propagatable> tmp = new Vec<Propagatable>();

    /*
     * (non-Javadoc)
     *
     * @see org.sat4j.minisat.DataStructureFactory#createVocabulary()
     */
    public ILits getVocabulary() {
        return lits;
    }

    protected UnitPropagationListener solver;

    protected Learner learner;

    public void setUnitPropagationListener(UnitPropagationListener s) {
        solver = s;
    }

    public void setLearner(Learner learner) {
        this.learner = learner;
    }

    public void reset() {
    }

    public void learnConstraint(Constr constr) {
        learner.learn(constr);
    }

    /*
     * (non-Javadoc)
     *
     * @see org.sat4j.minisat.core.DataStructureFactory#createCardinalityConstraint(org.sat4j.specs.VecInt,
     *      int)
     */
    public Constr createCardinalityConstraint(IVecInt literals, int degree)
            throws ContradictionException {
        throw new UnsupportedOperationException();
    }
}


text:
<application>
  <component name="Registry">
    <entry key="ide.balloon.shadow.size" value="0" />
    <entry key="ide.tree.ui.experimental" value="false" />
  </component>
</application>


text:
package at.willhaben.willtest.proxy;

import at.willhaben.willtest.junit5.OptionModifier;
import net.lightbody.bmp.BrowserMobProxy;
import org.openqa.selenium.MutableCapabilities;
import org.openqa.selenium.remote.CapabilityType;

public class ProxyOptionModifier implements OptionModifier {

    private BrowserMobProxy proxy;

    public ProxyOptionModifier(BrowserMobProxy proxy) {
        this.proxy = proxy;
    }

    @Override
    public <T extends MutableCapabilities> T modifyAllBrowsers(T options) {
        options.setCapability(CapabilityType.PROXY, BrowserProxyBuilder.createSeleniumProxy(proxy));
        options.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);
        return options;
    }
}


text:
import $ from 'jquery';
import Component from '@ember/component';
import { computed } from '@ember/object';
import { htmlSafe } from '@ember/string';
import { or } from '@ember/object/computed';
import { inject as service } from '@ember/service';

export default Component.extend({
  store: service(),
  collapsible: service(),
  attributeBindings: ['question.id:data-question-id'],

  isPreviewing: false,
  isPreviewable: or('question.isTaxonType', 'question.answerType.hasAnswerChoices'),

  isSelected: computed('selectedQuestions.[]', 'question.id', function() {
    let selectedQuestions = this.get('selectedQuestions');
    let questionId = this.get('question.id');
    return selectedQuestions.some((question) => question.get('id') === questionId);
  }),

  typeInitial: computed('question.{ancestry,hidden,required,visibilityRule.isNew}', function() {
    let question = this.get('question');
    let intial = '';
    if (question.get('hidden')) {
      intial += 'Hidden';
    }
    if (question.get('required')) {
      intial += 'Required';
    }
    if (question.get('visibilityRule') && !question.get('visibilityRule.isNew')) {
      intial += `<span class="label label-info">Rules</span>`;
    }
    if (question.get('calculationRule')) {
      intial += `<span class="label label-success">Calculated</span>`;
    }
    console.log(intial);
    return htmlSafe(intial);
  }),

  totalChildren: computed('otherQuetions.@each.ancestry', 'question.id', function() {
    let questionId = this.get('question.id');
    return this.get('otherQuetions').filter((question) => question.get('ancestry') === questionId).length;
  }),

  actions: {
    highlightConditional(questionId) {
      let question = this.get('store').peekRecord('question', questionId);
      question.set('highlighted', true);
    },

    unHighlightConditional(questionId) {
      let question = this.get('store').peekRecord('question', questionId);
      question.set('highlighted', false);
    },

    confirm() {
      let el = this.get('element');
      let $confirm = $('.delete-confirm', el);
      $confirm.fadeIn();
    },
    cancel() {
      let el = this.get('element');
      let $confirm = $('.delete-confirm', el);
      $confirm.fadeOut();
    },
    delete() {
      let question = this.get('question');
      let el = this.get('element');
      this.sendAction('deleteQuestion', question, el);
    },

    toggleCollapsed() {
      this.get('collapsible').toggleCollapsed(this.get('question'));
    },

    toggleQuestion(e) {
      let checked = e.target.checked;
      let question = this.get('question');
      let questionId = this.get('question.id');
      let otherQuetions = this.get('otherQuetions');
      this.get('toggleQuestion')(question, checked);
      // Toggle children questions
      otherQuetions.forEach((otherQuetion) => {
        if (otherQuetion.get('ancestry')) {
          let ancestrires = otherQuetion.get('ancestry').split('/');
          if (ancestrires.includes(questionId)) {
            otherQuetion.set('ancestrySelected', checked);
            this.get('toggleQuestion')(otherQuetion, checked);
          }
        }
      });
    }
  }
});


text:
package org.elasticsearch.index.mapper.geo;

import org.elasticsearch.index.mapper.FieldTypeTestCase;
import org.elasticsearch.index.mapper.MappedFieldType;
import org.elasticsearch.index.mapper.core.DoubleFieldMapper;
import org.elasticsearch.index.mapper.core.StringFieldMapper;
import org.junit.Before;

public class GeoPointFieldTypeTests extends FieldTypeTestCase {
    @Override
    protected MappedFieldType createDefaultFieldType() {
        return new GeoPointFieldMapper.GeoPointFieldType();
    }

    @Before
    public void setupProperties() {
        addModifier(new Modifier("geohash", false, true) {
            @Override
            public void modify(MappedFieldType ft) {
                ((GeoPointFieldMapper.GeoPointFieldType)ft).setGeohashEnabled(new StringFieldMapper.StringFieldType(), 1, true);
            }
        });
        addModifier(new Modifier("lat_lon", false, true) {
            @Override
            public void modify(MappedFieldType ft) {
                ((GeoPointFieldMapper.GeoPointFieldType)ft).setLatLonEnabled(new DoubleFieldMapper.DoubleFieldType(), new DoubleFieldMapper.DoubleFieldType());
            }
        });
        addModifier(new Modifier("ignore_malformed", false, true) {
            @Override
            public void modify(MappedFieldType ft) {
                GeoPointFieldMapper.GeoPointFieldType gft = (GeoPointFieldMapper.GeoPointFieldType)ft;
                gft.setIgnoreMalformed(!gft.ignoreMalformed());
            }
        });
        addModifier(new Modifier("coerce", false, true) {
            @Override
            public void modify(MappedFieldType ft) {
                GeoPointFieldMapper.GeoPointFieldType gft = (GeoPointFieldMapper.GeoPointFieldType)ft;
                gft.setCoerce(!gft.coerce());
            }
        });
    }
}


text:
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kthread.h>

/*
	Taylor Okel
	Op Sys - Fall 2015
*/

struct task_struct *ts;
int id = 101;
//Set to notify for thread kill order
int flag=0;

int kthread_timer(void *data);

int init_module(void){
	//Landing
	printk("'Kthread Timer' module is installing\n");
	printk("Kthread_Timer version 2.0\n");

	//Start thread
	ts = kthread_run(kthread_timer, (void*)&id, "spawn");

	return 0;
}

int kthread_timer(void *data){
	//Pickup thread. Initialize count; 10 "Dings"
	int count = 0;
	printk(KERN_EMERG "Starting...\n");

	while(count<1000000000){
		count++;
		printk("Timer Count: %i\n", count);
		flag = kthread_should_stop();
		if(flag) kthread_stop(ts);
	}

	//Execution finished, cleanup.

	flag = 1;
	printk("(kthread_timer) Finished main.");
	return 0;
}

//rmmod kthread_timer called
//To check kill order, set infinite loop in kthread_timer()
void cleanup_module( void ) {
	//Check if the thread is executing -> kill it
	printk("(kthread_timer) In cleanup:\n");
	if(!flag) kthread_stop(ts);

	//If you get here, it worked!
	printk("KThread module uninstalling\n");

	return;
}


text:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Sep 3, 2008 1:58:22 PM by Hibernate Tools 3.2.1.GA -->
<hibernate-mapping>
    <class name="org.gmod.gbol.simpleObject.generated.AbstractContact" table="contact">
        <meta attribute="chadoModule" inherit="false">contact</meta>

        <meta attribute="scope-class" inherit="false">public abstract</meta>

        <comment>Model persons, institutes, groups, organizations, etc.</comment>

        <id name="contactId" type="java.lang.Integer">
            <column name="contact_id" />

            <generator class="sequence">
                <param name="sequence">contact_contact_id_seq</param>
            </generator>
        </id>

        <discriminator column="contact_id" insert="false" />

        <many-to-one name="type" class="org.gmod.gbol.simpleObject.CVTerm" fetch="select">
            <column name="type_id">
                <comment>What type of contact is this? E.g. "person", "lab".</comment>
            </column>
        </many-to-one>

        <property name="name" type="string">
            <meta attribute="use-in-equals" inherit="false">true</meta>

            <column name="name" not-null="true" unique="true" />
        </property>

        <property name="description" type="string">
            <column name="description" />
        </property>

        <set name="parentContactRelationships" inverse="true">
            <key>
                <column name="subject_id" not-null="true">
                    <comment>The subject of the subj-predicate-obj sentence. In a DAG, this corresponds to the child node.</comment>
                </column>
            </key>

            <one-to-many class="org.gmod.gbol.simpleObject.ContactRelationship" />
        </set>

        <set name="childContactRelationships" inverse="true">
            <key>
                <column name="object_id" not-null="true">
                    <comment>The object of the subj-predicate-obj sentence. In a DAG, this corresponds to the parent node.</comment>
                </column>
            </key>

            <one-to-many class="org.gmod.gbol.simpleObject.ContactRelationship" />
        </set>
    </class>
</hibernate-mapping>


text:
package uk.co.flax.harahachibu.services.data;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * POJO representing node information extracted from an Elasticsearch
 * /_cluster/stats request.
 *
 * Created by mlp on 14/04/16.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class ElasticsearchClusterNodes {

	private final ElasticsearchClusterFilesystem fileSystem;

	public ElasticsearchClusterNodes(@JsonProperty("fs") ElasticsearchClusterFilesystem fileSystem) {
		this.fileSystem = fileSystem;
	}

	public ElasticsearchClusterFilesystem getFileSystem() {
		return fileSystem;
	}

}


text:
function Assert-False
{
    <#
    .SYNOPSIS
    Asserts an object is false.

    .DESCRIPTION
    Uses PowerShell's rules for determinig truthiness.  The following objects evaluate to `$false`:

     * `0`
     * `$false`
     * '' (i.e. `[String]::Empty`)
     * `$null`
     * `@()` (i.e. empty arrays)

    All other values are true.

    .EXAMPLE
    Assert-False $true

    Demonstrates how to fail a test.

    .EXAMPLE
    Assert-False (Invoke-SomethingThatShouldFail)

    Demonstrates how to check that a function returns a true object/value.

    .EXAMPLE
    Assert-False $true 'The fladoozle didn't dooflaple.'

    Demonstrates how to use the `Message` parameter to describe why the assertion might have failed.
    #>
    [CmdletBinding()]
    param(
        [Parameter(Position=0)]
        [object]
        # The value to check.
        $InputObject,

        [Parameter(Position=1)]
        [string]
        # A description about why the assertion might fail.
        $Message
    )

    Set-StrictMode -Version 'Latest'

    if( $InputObject )
    {
        Fail "Expected false, but was true. $Message"
    }
}


text:
package org.brixen.pageobject;

import org.brixen.bean.PolleableBean;

/**
 * Serves as a basic implementation for a <b>Selenium</b> page object which models a dynamic component which needs to
 * be polled on intervals for an expected condition via a {@link org.openqa.selenium.support.ui.FluentWait}.
 */
public class PolleableImpl extends AbstractPolleable<PolleableImpl> {

    /**
     * Constructs an {@code PolleableImpl} with the state specified by the {@code PolleableBean}.
     *
     * @param bean  a data transfer object for constructing an {@code PolleableImpl}
     */
    public PolleableImpl(PolleableBean bean) {
        super(bean);
    }

    /**
     * There are no {@code WebElement} controls, so there is nothing to check for whether this {@code PolleableImpl}
     * is loaded. The containing {@code Class} will have its own logic for determining whether it is loaded or not.
     */
    @Override
    protected void isLoaded() throws Error {
        //Do nothing;
    }
}


text:
.Confirmation, .Error {
  margin: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.Confirmation p, .Error p {
  margin: 10px 0;
}

.Confirmation .content, .Error .content {
  max-width: 500px;
  margin: 10px auto;
}

.Confirmation .buttons, .Error .buttons {
  margin-top: 20px;
  text-align: right;
}


text:
\hypertarget{classtesting_1_1internal_1_1_ge2_matcher}{}\section{testing\+:\+:internal\+:\+:Ge2\+Matcher Class Reference}
\label{classtesting_1_1internal_1_1_ge2_matcher}\index{testing\+::internal\+::\+Ge2\+Matcher@{testing\+::internal\+::\+Ge2\+Matcher}}

{\ttfamily \#include $<$gmock-\/matchers.\+h$>$}

Inheritance diagram for testing\+:\+:internal\+:\+:Ge2\+Matcher\+:
% FIG 0

Collaboration diagram for testing\+:\+:internal\+:\+:Ge2\+Matcher\+:
% FIG 1
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item
static const char $\ast$ \hyperlink{classtesting_1_1internal_1_1_ge2_matcher_a29fa53bdfa6778b709eaef017aeea855}{Desc} ()
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}

\subsection{Detailed Description}

Definition at line 1434 of file gmock-\/matchers.\+h.

\subsection{Member Function Documentation}
\index{testing\+::internal\+::\+Ge2\+Matcher@{testing\+::internal\+::\+Ge2\+Matcher}!Desc@{Desc}}
\index{Desc@{Desc}!testing\+::internal\+::\+Ge2\+Matcher@{testing\+::internal\+::\+Ge2\+Matcher}}
\subsubsection[{\texorpdfstring{Desc()}{Desc()}}]{\setlength{\rightskip}{0pt plus 5cm}static const char$\ast$ testing\+::internal\+::\+Ge2\+Matcher\+::\+Desc (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}\hypertarget{classtesting_1_1internal_1_1_ge2_matcher_a29fa53bdfa6778b709eaef017aeea855}{}\label{classtesting_1_1internal_1_1_ge2_matcher_a29fa53bdfa6778b709eaef017aeea855}

Definition at line 1436 of file gmock-\/matchers.\+h.

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item
/home/bhargavi/\+Documents/\+S\+D\+R/\+Copy\+\_\+\+Exam\+\_\+808\+X/vendor/googletest/googlemock/include/gmock/\hyperlink{gmock-matchers_8h}{gmock-\/matchers.\+h}\end{DoxyCompactItemize}


text:
- [![Gitter chat](https://badges.gitter.im/terraform-provider-libvirt/Lobby.png)](https://gitter.im/terraform-provider-libvirt/Lobby) ([IRC gateway](https://irc.gitter.im/))
- Planning board: [Github Projects](https://github.com/dmacvicar/terraform-provider-libvirt/projects/1)

![alpha](https://img.shields.io/badge/stability%3F-beta-yellow.svg) [![Tests](https://github.com/dmacvicar/terraform-provider-libvirt/actions/workflows/test.yml/badge.svg)](https://github.com/dmacvicar/terraform-provider-libvirt/actions/workflows/test.yml) [![Registry](https://img.shields.io/badge/libvirt-Terraform%20Registry-blue)](https://registry.terraform.io/providers/dmacvicar/libvirt/latest/docs)

___
This is a terraform provider that lets you provision
servers on a [libvirt](https://libvirt.org/) host via [Terraform](https://terraform.io/).

## Introduction & Goals

This project exists:

* To allow teams to get the benefits [Software Defined Infrastructure](https://en.wikipedia.org/wiki/Software-defined_infrastructure) Terraform provides, on top of classical and cheap virtualization infrastructure provided by Linux and [KVM](https://www.linux-kvm.org)
  This helps in very dynamic [DevOps](https://en.wikipedia.org/wiki/DevOps), Development and Testing activities.
* To allow for mixing KVM resources with other infrastructure Terraform is able to manage

What is *NOT* in scope:

* To support every advanced feature [libvirt](https://libvirt.org/) supports

  This would make the mapping from terraform complicated and not maintanable. See the [How to contribute](CONTRIBUTING.md) section to understand how to approach new features.

## Getting started

The provider is available for auto-installation from the [Terraform Registry](https://registry.terraform.io/providers/dmacvicar/libvirt/latest).

In your `main.tf` file, specify the version you want to use:

```hcl
terraform {
  required_providers {
    libvirt = {
      source = "dmacvicar/libvirt"
    }
  }
}

provider "libvirt" {
  # Configuration options
}
```

And now run terraform init:

```
$ terraform init
```

### Creating your first virtual machine

Here is an example that will setup the following:

+ A virtual server resource

(create this as main.tf and run terraform commands from this directory):
```hcl
provider "libvirt" {
    uri = "qemu:///system"
}
```

You can also set the URI in the LIBVIRT_DEFAULT_URI environment variable.

Now, define a libvirt domain:

```hcl
resource "libvirt_domain" "terraform_test" {
  name = "terraform_test"
}
```

Now you can see the plan, apply it, and then destroy the infrastructure:

```console
$ terraform init
$ terraform plan
$ terraform apply
$ terraform destroy
```

Look at more advanced examples [here](examples/) and check the [documentation](https://registry.terraform.io/providers/dmacvicar/libvirt/latest/docs).

## Manual installation

You can also manually download the provider from the [releases section](https://github.com/dmacvicar/terraform-provider-libvirt/releases) on Github. To install it, refer to the [Terraform documentation](https://www.terraform.io/docs/cli/config/config-file.html#provider-installation).

## Building from source

-	[Go](https://golang.org/doc/install) is required for building.

```
git clone https://github.com/dmacvicar/terraform-provider-libvirt.git
cd terraform-provider-libvirt
make
```

The binary will be called `terraform-provider-libvirt`.

### Using multiple hypervisors / provider instances

You can target different libvirt hosts instantiating the [provider multiple times](https://www.terraform.io/docs/configuration/providers.html#multiple-provider-instances). [Example](examples/v0.12/multiple).

### Using qemu-agent

From its documentation, [qemu-agent](https://wiki.libvirt.org/page/Qemu_guest_agent):

>It is a daemon program running inside the domain which is supposed to help management applications with executing functions which need assistance of the guest OS.

Until terraform-provider-libvirt 0.4.2, qemu-agent was used by default to get network configuration. However, if qemu-agent is not running, this creates a delay until connecting to it times-out.

In current versions, we default to not to attempt connecting to it, and attempting to retrieve network interface information from the agent needs to be enabled explicitly with `qemu_agent = true`, further details [here](https://github.com/dmacvicar/terraform-provider-libvirt/blob/master/website/docs/r/domain.html.markdown). Note that you still need to make sure the agent is running in the OS, and that is unrelated to this option.

Note: when using bridge network configurations you need to enable the `qemu_agent = true`. otherwise you will not retrieve the ip adresses of domains.

Be aware that this variables may be subject to change again in future versions.

## Upstream projects using terraform-libvirt:

* [sumaform](https://github.com/moio/sumaform)
   sumaform is a way to quickly configure, deploy, test [Uyuni](https://www.uyuni-project.org/) and [SUSE Manager](https://www.suse.com/products/suse-manager/) setups with clients and servers.

* [ha-cluster-sap](https://github.com/SUSE/ha-sap-terraform-deployments)
  Automated HA and SAP Deployments in Public/Private Clouds (including Libvirt/KVM)

* [ceph-open-terrarium](https://github.com/MalloZup/ceph-open-terrarium)
   ceph-open-terrarium is a way to quickly configure, deploy, tests CEPH cluster without or with [Deepsea](https://github.com/SUSE/DeepSea)

* [kubic](https://github.com/kubic-project)
    *   [kubic-terraform-kvm](https://github.com/kubic-project/kubic-terraform-kvm) Kubic Terraform script using KVM/libvirt

* [Community Driven Docker Examples](contrib/)
   Docker examples showing how to use the Libvirt Provider

* [Openshift 4 Installer](https://github.com/openshift/installer)
  The Openshift 4 Installer uses Terraform for cluster orchestration and relies on terraform-provider-libvirt for
  libvirt platform.

* [Kubitect](https://github.com/MusicDin/kubitect) - a CLI tool for deploying and managing Kubernetes clusters on libvirt platform.

## Authors

* Duncan Mac-Vicar P. <duncan@mac-vicar.eu>

See also the list of [contributors](https://github.com/dmacvicar/terraform-provider-libvirt/graphs/contributors) who participated in this project.

The structure and boilerplate is inspired from the [Softlayer](https://github.com/finn-no/terraform-provider-softlayer) and [Google](https://github.com/terraform-providers/terraform-provider-google) Terraform provider sources.

## License

* Apache 2.0, See LICENSE file


text:
namespace DentalSoft.Data.Repository.Base
{
    using DentalSoft.Common.Extensions;
    using DentalSoft.Data.Repository.Interfaces;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;
    using System.Linq;

    public class BaseRepository<T> : IBaseRepository<T> where T : class
    {
        protected IApplicationDbContext Context
        {
            get
            {
                if (context == null)
                {
                    context = GetCurrentUnitOfWork<EFUnitOfWork>().Context;
                }

                return context;
            }
        }

        protected IDbSet<T> DbSet
        {
            get
            {
                if (dbSet == null)
                {
                    dbSet = this.Context.Set<T>();
                }

                return dbSet;
            }
        }

        public virtual IQueryable<T> GetQuery()
        {
            return this.DbSet.AsQueryable();
        }

        public virtual IQueryable<T> All()
        {
            return this.GetQuery();
        }

        public virtual IQueryable<T> All<TFilter>(TFilter filter)
        {
            return this.GetQuery().Filter<T, TFilter>(filter);
        }

        public virtual T GetById(object id)
        {
            return this.DbSet.Find(id);
        }

        public virtual void Add(T entity)
        {
            DbEntityEntry entry = this.Context.Entry(entity);
            if (entry.State != EntityState.Detached)
            {
                entry.State = EntityState.Added;
            }
            else
            {
                this.DbSet.Add(entity);
            }
        }

        public virtual void Update(T entity)
        {
            DbEntityEntry entry = this.Context.Entry(entity);
            if (entry.State == EntityState.Detached)
            {
                this.DbSet.Attach(entity);
            }

            entry.State = EntityState.Modified;
        }

        public virtual void Delete(T entity)
        {
            DbEntityEntry entry = this.Context.Entry(entity);
            if (entry.State != EntityState.Deleted)
            {
                entry.State = EntityState.Deleted;
            }
            else
            {
                this.DbSet.Attach(entity);
                this.DbSet.Remove(entity);
            }
        }

        public virtual void Delete(object id)
        {
            var entity = this.GetById(id);

            if (entity != null)
            {
                this.Delete(entity);
                this.SaveChanges();
            }
        }

        public virtual void Detach(T entity)
        {
            DbEntityEntry entry = this.Context.Entry(entity);

            entry.State = EntityState.Detached;
        }

        public int SaveChanges()
        {
            return this.Context.SaveChanges();
        }

        public void Dispose()
        {
            this.Context.Dispose();
        }

        public TUnitOfWork GetCurrentUnitOfWork<TUnitOfWork>() where TUnitOfWork : IUnitOfWork
        {
            return (TUnitOfWork)UnitOfWork.Current;
        }

        #region Private Members

        private IDbSet<T> dbSet;
        private IApplicationDbContext context;

        #endregion
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<menu
  xmlns:android="http://schemas.android.com/apk/res/android">

<item android:id="@+id/videocall_menu_toggle_camera" android:title="@string/menu_videocall_toggle_camera_title"></item>
<item android:id="@+id/videocall_menu_terminate_call" android:title="@string/menu_videocall_terminate_call_title"></item>
<item android:id="@+id/videocall_menu_change_resolution" android:title="@string/menu_videocall_change_resolution_title"></item>
<item android:id="@+id/videocall_menu_back_to_dialer" android:title="@string/menu_videocall_back_to_dialer_title"></item>
<item android:title="@string/menu_videocall_switch_camera_title" android:id="@+id/videocall_menu_switch_camera"></item>
</menu>


text:
<!--
   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

     https://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.
-->
<ivysettings>
	<settings defaultCache="${ivy.basedir}/build/cache" defaultResolver="default" />
	<resolvers>
        <chain name="default">
            <filesystem name="m2" m2compatible="true" namespace="test">
                <ivy pattern="${ivy.settings.dir}/[organisation]/[module]/[revision]/[module]-[revision].pom"/>
                <artifact pattern="${ivy.settings.dir}/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
            </filesystem>
        </chain>
	</resolvers>
    <namespaces>
       <namespace name="test">
            <rule>
                <fromsystem>
                    <src org="(org\.apache).systemDm" module=".*" />
                    <dest org="$o1.dm" module="$m0" />
                </fromsystem>
                <tosystem>
                    <src org="(org\.apache)\.dm" module=".*" />
                    <dest org="$o1.systemDm" module="$m0" />
                </tosystem>
            </rule>t
        </namespace>
    </namespaces>
</ivysettings>


text:
executable           	= /bin/echo
arguments		= job_dagman_splice-cat.cmd $(cluster) OK
universe             	= local
log			= job_dagman_splice-cat.log
notification         	= NEVER
getenv               	= true
output			= job_dagman_splice-cat.$(cluster).out
error			= job_dagman_splice-cat.err
queue


text:
#include "mainbottomfirstwidget.h"
#include "../../commom/staticbutton.h"
#include "../common/backgroundbutton.h"
#include "../common/buttonlabel.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QLabel>

MainBottomFirstWidget::MainBottomFirstWidget(QWidget *parent) :
    BaseStyleWidget(parent)
{
    this->setStyleSheet("QWidget#firstWidget{background:white;}");
    this->setObjectName("firstWidget");
    this->initUI();
    this->initConnect();
}

void MainBottomFirstWidget::initUI()
{
    m_safeButton = new StaticButton(":/main/safe_check");
    QLabel *safeLabel = new QLabel(tr("查杀修复"));
    safeLabel->setObjectName("mainBottomLabel");
    QVBoxLayout *safeLayout = new QVBoxLayout;
    safeLayout->addWidget(m_safeButton, 0, Qt::AlignCenter);
    safeLayout->addWidget(safeLabel, 0, Qt::AlignCenter);

    m_cleanButton = new StaticButton(":/main/clean");
    QLabel *cleanLabel = new QLabel(tr("电脑清理"));
    cleanLabel->setObjectName("mainBottomLabel");
    QVBoxLayout *cleanLayout = new QVBoxLayout;
    cleanLayout->addWidget(m_cleanButton, 0, Qt::AlignCenter);
    cleanLayout->addWidget(cleanLabel, 0, Qt::AlignCenter);

    m_youhuaButton = new StaticButton(":/main/youhua");
    QLabel *youhuaLabel = new QLabel(tr("优化加速"));
    youhuaLabel->setObjectName("mainBottomLabel");
    QVBoxLayout *youhuaLayout = new QVBoxLayout;
    youhuaLayout->addWidget(m_youhuaButton, 0, Qt::AlignCenter);
    youhuaLayout->addWidget(youhuaLabel, 0, Qt::AlignCenter);

    QHBoxLayout *staticLayout = new QHBoxLayout;
    staticLayout->addLayout(safeLayout);
    staticLayout->addLayout(cleanLayout);
    staticLayout->addLayout(youhuaLayout);
    staticLayout->setContentsMargins(10, 20, 10, 10);

    QLabel *routerTitle = new QLabel(tr("路由器卫士"));
    QFont font = routerTitle->font();
    font.setBold(true);
    font.setPixelSize(15);
    routerTitle->setFont(font);

    QLabel *routerDes = new QLabel(tr("帮您免费升级为智能路由器"));
    QVBoxLayout *routerTextLayout = new QVBoxLayout;
    routerTextLayout->addWidget(routerTitle, 0, Qt::AlignRight);
    routerTextLayout->addWidget(routerDes, 0, Qt::AlignRight);
    routerTextLayout->setContentsMargins(10, 10, 5, 15);

    StaticButton *routerButton = new StaticButton(":/main/routerdefender");
    QHBoxLayout *routerLayout = new QHBoxLayout;
    routerLayout->addLayout(routerTextLayout);
    routerLayout->addWidget(routerButton);

    QStringList advIconList, advNameList;
    advIconList << "360SoftManger" << "360JiShi" << "360MobileMgr" << "NetSpeed";
    advNameList << "软件管家" << "人工服务" << "手机助手" << "宽带测速器" ;

    QHBoxLayout *advLayout = new QHBoxLayout;
    for(int i=0; i<advIconList.size(); i++)
    {
        BackgroundButton *backButton = new BackgroundButton;
        backButton->setIconsInfo(":/main/" + advIconList.at(i), ":/main/all_tool_bk", 1);
        backButton->setText(advNameList.at(i));
        advLayout->addWidget(backButton);
    }

    m_advtoolMore = new StaticButton(":/main/advtool_more");
    ButtonLabel *advLabel = new ButtonLabel;
    advLabel->setStyleSheet("QLabel{color:blue;}");
    advLabel->setText("更多");

    QVBoxLayout *moreLayout = new QVBoxLayout;
    moreLayout->addStretch();
    moreLayout->addWidget(m_advtoolMore, 0, Qt::AlignCenter);
    moreLayout->addSpacing(5);
    moreLayout->addWidget(advLabel, 0, Qt::AlignCenter);
    moreLayout->addStretch();

    advLayout->addLayout(moreLayout);

    QVBoxLayout *rightLayout = new QVBoxLayout;
    rightLayout->addLayout(routerLayout);
    rightLayout->addLayout(advLayout);

    QHBoxLayout *mainLayout = new QHBoxLayout;
    mainLayout->addLayout(staticLayout);
    mainLayout->addStretch();
    mainLayout->addLayout(rightLayout);

    this->setLayout(mainLayout);
}

void MainBottomFirstWidget::initConnect()
{
    connect(m_safeButton, SIGNAL(buttonClicked()), this, SIGNAL(safeClicked()));
    connect(m_cleanButton, SIGNAL(buttonClicked()), this, SIGNAL(cleanClicked()));
    connect(m_youhuaButton, SIGNAL(buttonClicked()), this, SIGNAL(youhuaClicked()));
    connect(m_advtoolMore, SIGNAL(buttonClicked()), this, SIGNAL(advtoolMoreClicked()));
}


text:
<template name="storiesAllEve">

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

	{{> nav_bar}}

Stories

				<input type="text" class="input-control pull-right-nopad"  placeholder="Search Stories">

Hot Stories

By Topic

Followed

My Story

All Stories

Most Popular Stories

  Jill's Story
 I'm transgender, meaning the gender that was assigned
  to me at birth doesn't match the gender I identify with. For most of my life, I couldn't articulate this feeling in a
  coherent way.
    50 hugs

    			<button type="button" class="btn btn-default hugbtn" onClick="jill_hugs()">

			</button>

 2 Comments

 Read More...

   Eve's Story
 I've just got off the phone with one of my childhood bullies. He used to call me names and hit me on the way home from school, but we're friends now. He's slightly in awe of my life today and, to be honest, so am I. This year has been intense.

 hugs

			<button type="button" class="btn btn-default" onClick="hugs_eve()">

			</button>

 2 Comments

 Read More...

Topics

				Public Acceptance

				Transition Process

Followed Stories

  Jill's Story
 I'm transgender, meaning the gender that was assigned to me at birth doesn't match the gender I identify with. For most of my life, I couldn't articulate this feeling in a coherent way.
    50 hugs

    			<button type="button" class="btn btn-default">

			</button>

 2 Comments

 Read More...

   Eve's Story
 I've just got off the phone with one of my childhood bullies. He used to call me names and hit me on the way home from school, but we're friends now. He's slightly in awe of my life today and, to be honest, so am I. This year has been intense.

 hugs

    			<button type="button" class="btn btn-default" onClick="eve_hugs()">

			</button>

 2 Comments

 Read More...

Your Story

  My Story

 Edit the text below and click to save for next time

	I always knew I was a girl, but for years that life seemed an impossible dream. It was a difficult journey involving sex work, depression and a spell in a mental institution.

  50 hugs

  			<button type="button" class="btn btn-default">

			</button>

 0 Comments

<button class="btn btn-primary btn-lg" type="edit my story" id="edit">edit my story</button>

All Stories: Eve's Story

  Eve's Story
 I've just got off the phone with one of my childhood bullies. He used to call me names and hit me on the way home from school, but we're friends now. He's slightly in awe of my life today and, to be honest, so am I. This year has been intense. I have served as assistant editor of Gay Times, debuted as both Channel 4 and Radio 1's first transgender presenter, fronted a successful awareness-raising campaign, All About Trans, topped the Independent on Sunday's Pink List, partied with celebs, brightened up Question Time, travelled the country, spoken everywhere from Oxford University to Amnesty International, and written for the Telegraph, NME and the Guardian. Life wasn't always this good.

"He's only four, he doesn't know what he's saying!" That's how my friend Emma, only eight herself, defended me from the older boys in the park. I'm a girl, I'd told them, though I didn't say it out loud again. They hadn't believed me; they'd just laughed. Adults weren't keen on me saying it, either, and I soon got the message that I wasn't (and never could be) a girl – I had a penis and that was that. I'd understand when I was older, apparently. When kids asked me why I "speak like a girl", I'd tell them: "Maybe this is just how I talk." I was beaten up a lot. A few years later I wore borrowed tights to school and used the girls' toilets. No one knew what to do with me.

In my hometown of Hucknall, near Nottingham, there was one gay guy, who everyone was friendly with because he made them laugh, and one Asian family, who everyone knew because they owned a corner shop. This ex-mining community was unofficially headed up by the local hard man, a bouncer and former boxer who also happened to be my dad. My mother was 17 when she had me and found it hard to cope. My parents had a fiery breakup when I was a baby, so her sister, my lovely Aunty Rachael, and her mother, my caring grandmother – or Mama, pronounced "Mammar" in Hucknall – helped bring me up. I like to think I have my mama's kindness, my mum's charisma and my auntie's morals. What none of them passed on to me, unfortunately, was a womb.

 hugs

      			<button type="button" class="btn btn-default" onClick="hugs_eve()">

			</button>

 2 Comments

	{{ > messages }}
    What a great story! by anonymous

 Stay Strong! by genderfluid45

  <button class="btn btn-primary btn-lg" type="back" id="back">back to all stories</button>

{{ > input }}

 </template>


text:
        <meta charset="utf-8">
        <title>lab.cuonic.com</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/base-min.css">
		<link href='http://fonts.googleapis.com/css?family=Raleway:400,700' rel='stylesheet' type='text/css'>
		<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
		<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/pure-min.css">
        <link rel="stylesheet" href="css/style.css">

Error 500

An error has been encountered on the server

            Error : <?php echo $message; ?>

            File : <?php echo $file; ?>:<?php echo $line; ?>


text:
package com.packt.sfjd.ch10.features;

import java.util.Arrays;
import java.util.List;

import org.apache.spark.ml.feature.ChiSqSelector;
import org.apache.spark.ml.linalg.VectorUDT;
import org.apache.spark.ml.linalg.Vectors;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.RowFactory;
import org.apache.spark.sql.SparkSession;
import org.apache.spark.sql.types.DataTypes;
import org.apache.spark.sql.types.Metadata;
import org.apache.spark.sql.types.StructField;
import org.apache.spark.sql.types.StructType;

public class ChiSqSelectors {
	public static void main(String[] args) {
		 System.setProperty("hadoop.home.dir", "D:\\hadoop");
		SparkSession spark = SparkSession
			      .builder().master("local")
			      .appName("JavaChiSqSelectorExample")
			      .getOrCreate();

			    List<Row> data = Arrays.asList(
			      RowFactory.create(1, Vectors.dense(0.1, 0.0, 1.0, 20.0), 0.0),
			      RowFactory.create(2, Vectors.dense(0.2, 1.0, 13.0, 40.0), 1.0),
			      RowFactory.create(3, Vectors.dense(0.3, 2.0, 21.0, 1.1), 0.0)
			    );
			    StructType schema = new StructType(new StructField[]{
			      new StructField("id", DataTypes.IntegerType, false, Metadata.empty()),
			      new StructField("rawfeatures", new VectorUDT(), false, Metadata.empty()),
			      new StructField("label", DataTypes.DoubleType, false, Metadata.empty())
			    });

			    Dataset<Row> df = spark.createDataFrame(data, schema);

			    ChiSqSelector selector = new ChiSqSelector()
			      .setNumTopFeatures(1)
			      .setFeaturesCol("rawfeatures")
			      .setLabelCol("label")
			      .setOutputCol("features");

			    Dataset<Row> result = selector.fit(df).transform(df);
			    result.show();

			    spark.stop();
	}
}


text:
package org.gradle.integtests.fixtures.logging;

import org.gradle.api.specs.Spec;

import java.util.ArrayList;
import java.util.List;

import static org.gradle.util.CollectionUtils.filter;
import static org.gradle.util.CollectionUtils.join;

public class GroupedTaskFixture {

    private final String taskName;

    private String taskOutcome;

    private final List<String> outputs = new ArrayList<String>(1);

    public GroupedTaskFixture(String taskName) {
        this.taskName = taskName;
    }

    protected void addOutput(String output) {
        outputs.add(output);
    }

    public void setOutcome(String taskOutcome) {
        if (this.taskOutcome != null) {
            throw new AssertionError(taskName + " task's outcome is set twice!");
        }
        this.taskOutcome = taskOutcome;
    }

    public String getOutcome(){
        return taskOutcome;
    }

    public String getName() {
        return taskName;
    }

    public String getOutput() {
        List<String> nonEmptyOutputs = filter(outputs, new Spec<String>() {
            @Override
            public boolean isSatisfiedBy(String string) {
                return !string.equals("");
            }
        });
        return join("\n", nonEmptyOutputs);
    }
}


text:
<?php

class Ess_M2ePro_Model_Cron_Task_Amazon_Repricing_Synchronize
    extends Ess_M2ePro_Model_Cron_Task_Abstract
{
    const NICK = 'amazon/repricing/synchronize';
    const MAX_MEMORY_LIMIT = 512;

    const REGISTRY_GENERAL_START_DATE = '/amazon/repricing/synchronize/general/start_date/';

    const REGISTRY_GENERAL_LAST_LISTING_PRODUCT_ID = '/amazon/repricing/synchronize/general/last_listing_product_id/';
    const REGISTRY_GENERAL_LAST_LISTING_OTHER_ID = '/amazon/repricing/synchronize/general/last_other_product_id/';

    const REGISTRY_ACTUAL_PRICE_START_DATE = '/amazon/repricing/synchronize/actual_price/start_date/';

    const REGISTRY_ACTUAL_PRICE_LAST_LISTING_PRODUCT_ID =
        '/amazon/repricing/synchronize/actual_price/last_listing_product_id/';
    const REGISTRY_ACTUAL_PRICE_LAST_LISTING_OTHER_ID =
        '/amazon/repricing/synchronize/actual_price/last_other_product_id/';

    const SYNCHRONIZE_GENERAL_INTERVAL = 60;//86400; // 1 day
    const SYNCHRONIZE_ACTUAL_PRICE_INTERVAL = 60;//3600; // 1 hour

    const PRODUCTS_COUNT_BY_ACCOUNT_AND_PRODUCT_TYPE = 5000;

    //####################################

    protected function getNick()
    {
        return self::NICK;
    }

    protected function getMaxMemoryLimit()
    {
        return self::MAX_MEMORY_LIMIT;
    }

    //####################################

    public function performActions()
    {
        $accounts = $this->getPermittedAccounts();
        if (empty($accounts)) {
            return;
        }

        foreach ($accounts as $account) {
            if ($this->isPossibleToSynchronizeGeneral($account)) {
                $this->synchronizeGeneral($account);
            }

            if ($this->isPossibleToSynchronizeActualPrice($account)) {
                $this->synchronizeActualPrice($account);
            }
        }
    }

    //####################################

    /**
     * @param Ess_M2ePro_Model_Account $account
     */
    protected function synchronizeGeneral($account)
    {
        // Listing Products
        /** @var Ess_M2ePro_Model_Resource_Listing_Product_Collection $listingProductCollection */
        $listingProductCollection = Mage::helper('M2ePro/Component_Amazon')->getCollection('Listing_Product');
        $listingProductCollection->getSelect()->joinLeft(
            array('l' => Mage::getResourceModel('M2ePro/Listing')->getMainTable()),
            'l.id = main_table.listing_id'
        );
        $listingProductCollection->addFieldToFilter('is_variation_parent', 0);
        $listingProductCollection->addFieldToFilter('l.account_id', $account->getId());
        $listingProductCollection->addFieldToFilter('second_table.sku', array('notnull' => true));
        $listingProductCollection->addFieldToFilter('second_table.online_regular_price', array('notnull' => true));

        $listingProductCollection->getSelect()->reset(Zend_Db_Select::COLUMNS);
        $listingProductCollection->getSelect()->columns(
            array(
            'id'   => 'main_table.id',
            'sku'  => 'second_table.sku'
            )
        );

        $lastListingProductId = $this->getAccountData($account, self::REGISTRY_GENERAL_LAST_LISTING_PRODUCT_ID);
        $listingProductCollection->getSelect()->where('main_table.id > ?', $lastListingProductId);
        $listingProductCollection->getSelect()->limit(self::PRODUCTS_COUNT_BY_ACCOUNT_AND_PRODUCT_TYPE);
        $listingProductCollection->getSelect()->order('id ASC');

        // Listing Others
        /** @var Ess_M2ePro_Model_Resource_Amazon_Listing_Other_Collection $listingOtherCollection */
        $listingOtherCollection = Mage::helper('M2ePro/Component_Amazon')->getCollection('Listing_Other');
        $listingOtherCollection->addFieldToFilter('account_id', $account->getId());

        $listingOtherCollection->getSelect()->reset(Zend_Db_Select::COLUMNS);
        $listingOtherCollection->getSelect()->columns(
            array(
            'id'   => 'main_table.id',
            'sku'  => 'second_table.sku'
            )
        );

        $lastListingOtherId = $this->getAccountData($account, self::REGISTRY_GENERAL_LAST_LISTING_OTHER_ID);
        $listingOtherCollection->getSelect()->where('main_table.id > ?', $lastListingOtherId);
        $listingOtherCollection->getSelect()->limit(self::PRODUCTS_COUNT_BY_ACCOUNT_AND_PRODUCT_TYPE);
        $listingOtherCollection->getSelect()->order('id ASC');

        $listingProducts = $listingProductCollection->getData();
        $listingOthers = $listingOtherCollection->getData();

        if (empty($listingProducts) && empty($listingOthers)) {
            $this->deleteAccountData($account, self::REGISTRY_GENERAL_LAST_LISTING_PRODUCT_ID);
            $this->deleteAccountData($account, self::REGISTRY_GENERAL_LAST_LISTING_OTHER_ID);

            return;
        }

        $skus = array();
        foreach ($listingProducts as $listingProduct) {
            $skus[] = $listingProduct['sku'];
        }

        foreach ($listingOthers as $listingOther) {
            $skus[] = $listingOther['sku'];
        }

        /** @var $repricingSynchronization Ess_M2ePro_Model_Amazon_Repricing_Synchronization_General */
        $repricingSynchronization = Mage::getModel(
            'M2ePro/Amazon_Repricing_Synchronization_General', $account
        );
        $result = $repricingSynchronization->run($skus);
        if ($result) {
            if (!empty($listingProducts)) {
                $this->setAccountData(
                    $account,
                    self::REGISTRY_GENERAL_LAST_LISTING_PRODUCT_ID,
                    $listingProducts[count($listingProducts) - 1]['id']
                );
            }

            if (!empty($listingOthers)) {
                $this->setAccountData(
                    $account,
                    self::REGISTRY_GENERAL_LAST_LISTING_OTHER_ID,
                    $listingOthers[count($listingOthers) - 1]['id']
                );
            }
        }
    }

    /**
     * @param Ess_M2ePro_Model_Account $account
     */
    protected function synchronizeActualPrice($account)
    {
        // Listing Products
        /** @var Ess_M2ePro_Model_Resource_Listing_Product_Collection $listingProductCollection */
        $listingProductCollection = Mage::helper('M2ePro/Component_Amazon')->getCollection('Listing_Product');
        $listingProductCollection->getSelect()->joinLeft(
            array('l' => Mage::getResourceModel('M2ePro/Listing')->getMainTable()),
            'l.id = main_table.listing_id'
        );
        $listingProductCollection->addFieldToFilter('is_variation_parent', 0);
        $listingProductCollection->addFieldToFilter('is_repricing', 1);
        $listingProductCollection->addFieldToFilter('l.account_id', $account->getId());
        $listingProductCollection->addFieldToFilter('second_table.sku', array('notnull' => true));
        $listingProductCollection->addFieldToFilter('second_table.online_regular_price', array('notnull' => true));

        $listingProductCollection->getSelect()->joinLeft(
            array('alpr' => Mage::getResourceModel('M2ePro/Amazon_Listing_Product_Repricing')->getMainTable()),
            'alpr.listing_product_id = main_table.id'
        );
        $listingProductCollection->addFieldToFilter('alpr.is_online_disabled', 0);

        $listingProductCollection->getSelect()->reset(Zend_Db_Select::COLUMNS);
        $listingProductCollection->getSelect()->columns(
            array(
            'id'   => 'main_table.id',
            'sku'  => 'second_table.sku'
            )
        );

        $lastListingProductId = $this->getAccountData($account, self::REGISTRY_ACTUAL_PRICE_LAST_LISTING_PRODUCT_ID);
        $listingProductCollection->getSelect()->where('main_table.id > ?', $lastListingProductId);
        $listingProductCollection->getSelect()->limit(self::PRODUCTS_COUNT_BY_ACCOUNT_AND_PRODUCT_TYPE);
        $listingProductCollection->getSelect()->order('id ASC');

        // Listing Others
        /** @var Ess_M2ePro_Model_Resource_Amazon_Listing_Other_Collection $listingOtherCollection */
        $listingOtherCollection = Mage::helper('M2ePro/Component_Amazon')->getCollection('Listing_Other');
        $listingOtherCollection->addFieldToFilter('account_id', $account->getId());
        $listingOtherCollection->addFieldToFilter('is_repricing', 1);
        $listingOtherCollection->addFieldToFilter('is_repricing_disabled', 0);

        $listingOtherCollection->getSelect()->reset(Zend_Db_Select::COLUMNS);
        $listingOtherCollection->getSelect()->columns(
            array(
            'id'   => 'main_table.id',
            'sku'  => 'second_table.sku'
            )
        );

        $lastListingOtherId = $this->getAccountData($account, self::REGISTRY_ACTUAL_PRICE_LAST_LISTING_OTHER_ID);
        $listingOtherCollection->getSelect()->where('main_table.id > ?', $lastListingOtherId);
        $listingOtherCollection->getSelect()->limit(self::PRODUCTS_COUNT_BY_ACCOUNT_AND_PRODUCT_TYPE);
        $listingOtherCollection->getSelect()->order('id ASC');

        $listingProducts = $listingProductCollection->getData();
        $listingOthers = $listingOtherCollection->getData();

        if (empty($listingProducts) && empty($listingOthers)) {
            $this->deleteAccountData($account, self::REGISTRY_ACTUAL_PRICE_LAST_LISTING_PRODUCT_ID);
            $this->deleteAccountData($account, self::REGISTRY_ACTUAL_PRICE_LAST_LISTING_OTHER_ID);

            return;
        }

        $skus = array();
        foreach ($listingProducts as $listingProduct) {
            $skus[] = $listingProduct['sku'];
        }

        foreach ($listingOthers as $listingOther) {
            $skus[] = $listingOther['sku'];
        }

        /** @var $repricingSynchronization Ess_M2ePro_Model_Amazon_Repricing_Synchronization_ActualPrice */
        $repricingSynchronization = Mage::getModel(
            'M2ePro/Amazon_Repricing_Synchronization_ActualPrice', $account
        );
        $result = $repricingSynchronization->run($skus);
        if ($result) {
            if (!empty($listingProducts)) {
                $this->setAccountData(
                    $account,
                    self::REGISTRY_ACTUAL_PRICE_LAST_LISTING_PRODUCT_ID,
                    $listingProducts[count($listingProducts) - 1]['id']
                );
            }

            if (!empty($listingOthers)) {
                $this->setAccountData(
                    $account,
                    self::REGISTRY_ACTUAL_PRICE_LAST_LISTING_OTHER_ID,
                    $listingOthers[count($listingOthers) - 1]['id']
                );
            }
        }
    }

    //####################################

    /**
     * @return bool
     */
    protected function isPossibleToSynchronizeGeneral($account)
    {
        $currentTimeStamp = Mage::helper('M2ePro')->getCurrentGmtDate(true);

        $startDate = $this->getAccountData($account, self::REGISTRY_GENERAL_START_DATE);
        $startDate = !empty($startDate) ? strtotime($startDate) : 0;

        $lastListingProductId = $this->getAccountData($account, self::REGISTRY_GENERAL_LAST_LISTING_PRODUCT_ID);
        $lastListingOtherId = $this->getAccountData($account, self::REGISTRY_GENERAL_LAST_LISTING_OTHER_ID);

        if ($lastListingProductId !== null || $lastListingOtherId !== null) {
            return true;
        }

        if ($currentTimeStamp > $startDate + self::SYNCHRONIZE_GENERAL_INTERVAL) {
            $this->setAccountData(
                $account,
                self::REGISTRY_GENERAL_START_DATE,
                Mage::helper('M2ePro')->getCurrentGmtDate()
            );

            $this->setAccountData($account, self::REGISTRY_GENERAL_LAST_LISTING_PRODUCT_ID, 0);
            $this->setAccountData($account, self::REGISTRY_GENERAL_LAST_LISTING_OTHER_ID, 0);

            return true;
        }

        return false;
    }

    /**
     * @return bool
     */
    protected function isPossibleToSynchronizeActualPrice($account)
    {
        $currentTimeStamp = Mage::helper('M2ePro')->getCurrentGmtDate(true);

        $startDate = $this->getAccountData($account, self::REGISTRY_ACTUAL_PRICE_START_DATE);
        $startDate = !empty($startDate) ? strtotime($startDate) : 0;

        $lastListingProductId = $this->getAccountData($account, self::REGISTRY_ACTUAL_PRICE_LAST_LISTING_PRODUCT_ID);
        $lastListingOtherId = $this->getAccountData($account, self::REGISTRY_ACTUAL_PRICE_LAST_LISTING_OTHER_ID);

        if ($lastListingProductId !== null || $lastListingOtherId !== null) {
            return true;
        }

        if ($currentTimeStamp > $startDate + self::SYNCHRONIZE_ACTUAL_PRICE_INTERVAL) {
            $this->setAccountData(
                $account,
                self::REGISTRY_ACTUAL_PRICE_START_DATE,
                Mage::helper('M2ePro')->getCurrentGmtDate()
            );

            $this->setAccountData($account, self::REGISTRY_ACTUAL_PRICE_LAST_LISTING_PRODUCT_ID, 0);
            $this->setAccountData($account, self::REGISTRY_ACTUAL_PRICE_LAST_LISTING_OTHER_ID, 0);

            return true;
        }

        return false;
    }

    //#####################################

    /**
     * @return Ess_M2ePro_Model_Account[]
     */
    protected function getPermittedAccounts()
    {
        /** @var Ess_M2ePro_Model_Resource_Account_Collection $accountCollection */
        $accountCollection = Mage::helper('M2ePro/Component_Amazon')->getCollection('Account');
        $accountCollection->getSelect()->joinInner(
            array('aar' => Mage::getResourceModel('M2ePro/Amazon_Account_Repricing')->getMainTable()),
            'aar.account_id=main_table.id',
            array()
        );

        return $accountCollection->getItems();
    }

    protected function getAccountData($account, $key)
    {
        return $this->getRegistryValue($key . $account->getId() . '/');
    }

    protected function setAccountData($account, $key, $value)
    {
        $this->setRegistryValue($key . $account->getId() . '/', $value);
    }

    protected function deleteAccountData($account, $key)
    {
        $this->deleteRegistryValue($key . $account->getId() . '/');
    }

    //####################################
}


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 com.facebook.presto.verifier.resolver;

import com.google.common.collect.ImmutableMap;
import org.testng.annotations.Test;

import java.util.Map;

import static com.facebook.airlift.configuration.testing.ConfigAssertions.assertFullMapping;
import static com.facebook.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults;
import static com.facebook.airlift.configuration.testing.ConfigAssertions.recordDefaults;

public class TestFailureResolverConfig
{
    @Test
    public void testDefault()
    {
        assertRecordedDefaults(recordDefaults(FailureResolverConfig.class)
                .setEnabled(true));
    }

    @Test
    public void testExplicitPropertyMappings()
    {
        Map<String, String> properties = new ImmutableMap.Builder<String, String>()
                .put("failure-resolver.enabled", "false")
                .build();
        FailureResolverConfig expected = new FailureResolverConfig()
                .setEnabled(false);

        assertFullMapping(properties, expected);
    }
}