text:
package org.ovirt.engine.ui.genericapi.returnvalues;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

import org.ovirt.engine.core.common.queries.ValueObject;

@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "UIQueryReturnValue")
public class UIQueryReturnValue {

    private Object returnValue;
    private boolean succeeded;

    @XmlElement(name = "ReturnValueWrapper")
    public ValueObject getSerializaedReturnValue() {
        return ValueObject.createValueObject(returnValue);
    }

    public Object getReturnValue() {
        return returnValue;
    }

    public void setReturnValue(Object returnValue) {
        this.returnValue = returnValue;
    }

    @XmlElement(name = "Succeeded")
    public boolean getSucceeded() {
        return succeeded;
    }

    public void setSucceeded(boolean value) {
        succeeded = value;
    }
}


text:
import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';

@Pipe({
    name: 'cancelSanitizer'
})
export class CancelSanitizerPipe implements PipeTransform {
    constructor(private sanitizer: DomSanitizer) { }

    transform(url) {
        return this.sanitizer.bypassSecurityTrustResourceUrl(url);
    }
}

redpajama_set_name: RedPajamaGithub


text:
@interface JGProfilePictureEditViewController : UIViewController<UITextFieldDelegate, UIScrollViewDelegate>
- (id)initWithImage:(UIImage *)aImage;

@end


text:
exa::SocketImpl::SocketImpl()
: mSocket(-1) {}

ssize_t exa::SocketImpl::recv(void *buf, size_t len) {
    SOCKET_STACK_PRINTER;
    ssize_t retVal = 0;
#ifdef _WIN32
    retVal = ::recv(mSocket, static_cast<char*>(buf), len, MSG_WAITALL); //Winsocket returns SOCKET_ERROR = -1 in case of error! So this should be safe.
#else
    retVal = ::recv(mSocket, buf, len, MSG_WAITALL);
#endif
    return retVal;
}

ssize_t exa::SocketImpl::send(const void *buf, size_t len) {
    SOCKET_STACK_PRINTER;
#ifdef _WIN32
    return ::send(mSocket, static_cast<const char*>(buf), len, 0);
#else
    return ::send(mSocket, buf, len, 0);
#endif
}

void exa::SocketImpl::shutdownWr() {
    SOCKET_STACK_PRINTER;
    ::shutdown(mSocket, SHUT_WR);
    mSocket = -1;
}
void exa::SocketImpl::shutdownRdWr() {
    SOCKET_STACK_PRINTER;
    ::shutdown(mSocket, SHUT_RDWR);
    mSocket = -1;
}

void exa::SocketImpl::connect(const char *host, uint16_t port) {
    SOCKET_STACK_PRINTER;
    struct ::sockaddr_in serv_addr;
    struct ::hostent *server;

#ifdef _WIN32
    {
        WSADATA wsa;
        const int wsaResult = WSAStartup(MAKEWORD(2,0), &wsa);
	    if (wsaResult != 0) {
	        std::stringstream stringStream;
	        stringStream << "Could not initialize WSA: return value - " << wsaResult;
    	    throw ConnectionException(stringStream.str());
	    }
    }
#endif

    mSocket = ::socket(AF_INET, SOCK_STREAM, 0);
    if (mSocket < 0) {
        std::stringstream stringStream;
        stringStream << "Could not create socket: return value - " << mSocket << " errno - " << errno;
        throw ConnectionException(stringStream.str());
    }

    ::memset((char *) &serv_addr, 0, sizeof(serv_addr));
    serv_addr.sin_family = AF_INET;
    serv_addr.sin_port = htons(port);
    server = ::gethostbyname(host);
    if (server == nullptr) {
        std::stringstream stringStream;
        stringStream << "No such host: " << host;
        throw ConnectionException(stringStream.str());
    }
    memcpy((char *)&serv_addr.sin_addr.s_addr, (char *) server->h_addr, server->h_length);

    int connection = ::connect(mSocket, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
    if (connection < 0) {
        std::stringstream stringStream;
        stringStream << "Could not connect to " << host << ":" << port
            << " return value:" << connection << " errno:" << errno;

#ifdef _WIN32
        stringStream << " (" << WSAGetLastError() << ")";
#endif
        throw ConnectionException(stringStream.str());
    }
}

exa::SocketImpl::~SocketImpl() {
    if(mSocket >= 0) {
        ::shutdown(mSocket, SHUT_RDWR);
    }
}

tSocket exa::SocketImpl::detach() {
    SOCKET_STACK_PRINTER;
    return std::exchange(mSocket, -1);
}


text:
//
//  GlobalViewController.m
//  TRProject
//
//  Created by Yang Xiong on 12/12/2016.
//  Copyright © 2016 Tedu. All rights reserved.
//

#import "GlobalViewController.h"

@interface GlobalViewController ()

@end

@implementation GlobalViewController

- (void)viewDidLoad {
    [self.view setBackgroundColor:[UIColor whiteColor]];
    self.navigationItem.title  =  @"全球购";
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <parent>
    <groupId>org.arquillian.universe</groupId>
    <artifactId>arquillian-universe-parent</artifactId>
    <version>1.1.13.3-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <modelVersion>4.0.0</modelVersion>

  <artifactId>arquillian-cube-q-simianarmy</artifactId>
  <name>Arquillian Cube Q SimianArmy</name>
  <packaging>pom</packaging>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.arquillian.universe</groupId>
        <artifactId>arquillian-cube-docker</artifactId>
        <version>${project.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.arquillian.cube.q</groupId>
        <artifactId>arquillian-cube-q-simianarmy</artifactId>
        <version>${version.arquillian_cube_q}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.arquillian.universe</groupId>
      <artifactId>arquillian-cube-docker</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.arquillian.cube.q</groupId>
      <artifactId>arquillian-cube-q-simianarmy</artifactId>
    </dependency>
  </dependencies>

</project>


text:
'use strict';

require('dotenv').load(); // Only required for running locally

let express = require('express'),
	routes = require('./app/routes/index.js'),
	mongoose = require('mongoose'),
	app = express();

mongoose.connect(process.env.MONGO_URI);

app.use('/public', express.static('public'));
app.use('/', express.static('app'));

routes(app);

let port = process.env.PORT || 8080;
app.listen(port,  function () {
	console.log('Node.js listening on port ' + port + '...');
});


text:
angular.module('trialsTrackmap')
.filter('showParts', function(){
    return function(array, selectedPart, selectedLevel){
        if(array && selectedPart || array && selectedLevel){
            return array.filter(function(track){
                if('parts' in track) {
                    // show ids out of all levels
                    if(selectedLevel){
                        if(!selectedPart && selectedLevel in track.parts){
                            return true;
                        } else if(selectedLevel in track.parts && track.parts[selectedLevel].indexOf(parseInt(selectedPart)) >= 0){
                            return true;
                        }
                        return false;
                    } else if(selectedPart){
                        var foundPart = false;
                        Object.keys(track.parts).forEach(function(level){
                            if(level in track.parts && typeof track.parts[level] == 'object' && track.parts[level].indexOf(parseInt(selectedPart)) >= 0)
                                foundPart = true;
                        });
                        return foundPart;
                    }
                }
                return false;
            });
        }
        return array;
    }
})


text:
{% verbatim %}{% extends "base.html" %}

{% block content %}

A new django project homepage

 Based off of one of the Django Quickstart project templates by Ted Tieken.

 As you get started a few things to remember to do

In your Base.html

Set Page Title base

Set top bar logo-text

Set google analytics variables, uncomment google analytics section

In your file directory

Add favicons to assets/assets/ico

Add your custom css in assets/assets/css/base.css

If this page is displaying without formatting, remember to run

manage.py collectstatic

Depending on your environment you may need to run it like this:

python manage.py collectstatic
python2.7 manage.py collectstatic
foreman run python manage.py collectstatic
heroku run python manage.py collectstatic

{% endblock %}{% endverbatim %}


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

<title>Class Hierarchy</title>
<meta name="date" content="2014-04-20">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Hierarchy For All Packages

Package Hierarchies:

za.co.neilson.collections.queryable,

za.co.neilson.sqlite.orm,

za.co.neilson.sqlite.orm.annotations

Class Hierarchy

java.lang.Object

java.util.AbstractCollection<E> (implements java.util.Collection<E>)

java.util.AbstractList<E> (implements java.util.List<E>)

java.util.ArrayList<E> (implements java.lang.Cloneable, java.util.List<E>, java.util.RandomAccess, java.io.Serializable)

za.co.neilson.collections.queryable.Queryable<T>

za.co.neilson.sqlite.orm.DatabaseInfo

za.co.neilson.sqlite.orm.DatabaseModel<R,C>

za.co.neilson.sqlite.orm.ObjectModel<T,R,C>

za.co.neilson.sqlite.orm.ObjectModelColumn

za.co.neilson.sqlite.orm.Query

za.co.neilson.collections.queryable.Queryable.Field<T>

za.co.neilson.collections.queryable.Queryable.Matcher<T>

za.co.neilson.sqlite.orm.Relationship

java.lang.Throwable (implements java.io.Serializable)

java.lang.Exception

za.co.neilson.sqlite.orm.UnsupportedTypeException

Interface Hierarchy

za.co.neilson.sqlite.orm.DatabaseDriverInterface<R,C>

Annotation Type Hierarchy

za.co.neilson.sqlite.orm.annotations.ForeignKey (implements java.lang.annotation.Annotation)

za.co.neilson.sqlite.orm.annotations.Unique (implements java.lang.annotation.Annotation)

za.co.neilson.sqlite.orm.annotations.Transient (implements java.lang.annotation.Annotation)

za.co.neilson.sqlite.orm.annotations.Nullable (implements java.lang.annotation.Annotation)

za.co.neilson.sqlite.orm.annotations.PrimaryKey (implements java.lang.annotation.Annotation)

Enum Hierarchy

java.lang.Object

java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)

za.co.neilson.sqlite.orm.Relationship.Type

za.co.neilson.sqlite.orm.ObjectModel.QueryType

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
@interface UICollectionView (PrivateAppleMethods)
- (void)_userSelectItemAtIndexPath:(NSIndexPath *)indexPath;
@end

@implementation UICollectionViewCell (Spec)

- (void)tap {
    UIView *currentView = self.superview;
    while (currentView.superview != nil && ![currentView isKindOfClass:[UICollectionView class]]) {
        currentView = currentView.superview;
    }

    NSAssert(currentView, @"Cell must be a in a collection view in order to be tapped!");
    UICollectionView *collectionView = (UICollectionView *)currentView;

    NSIndexPath *indexPath = [collectionView indexPathForCell:self];
    [collectionView _userSelectItemAtIndexPath:indexPath];
}

+ (instancetype)instantiatePrototypeCellFromStoryboard:(UIStoryboard *)storyboard
                              viewControllerIdentifier:(NSString *)viewControllerIdentifier
                                 collectionViewKeyPath:(NSString *)collectionViewKeyPath
                                        cellIdentifier:(NSString *)cellIdentifier {
    NSAssert(storyboard, @"Must provide a storyboard");
    NSAssert([cellIdentifier length] > 0, @"Must provide a cell identifier");

    UIViewController *viewController = viewControllerIdentifier ? [storyboard instantiateViewControllerWithIdentifier:viewControllerIdentifier] : [storyboard instantiateInitialViewController];
    NSAssert(viewController, @"Could not find the view controller");

    [viewController view];

    UICollectionView *collectionView = collectionViewKeyPath ? [viewController valueForKeyPath:collectionViewKeyPath] : [viewController.view firstSubviewOfClass:[UICollectionView class]];
    NSAssert(collectionView, @"Could not find the collection view");

    PCKPrototypeCellInstantiatingDataSource *dataSource = [[[PCKPrototypeCellInstantiatingDataSource alloc] initWithCollectionView:collectionView] autorelease];
    return [dataSource collectionViewCellWithIdentifier:cellIdentifier];
}

@end


text:
namespace Dropbox.Api.Files
{
    using sys = System;
    using col = System.Collections.Generic;
    using re = System.Text.RegularExpressions;

    using enc = Dropbox.Api.Stone;

    /// <summary>
    /// <para>The upload session finish batch result object</para>
    /// </summary>
    public class UploadSessionFinishBatchResult
    {
        #pragma warning disable 108

        /// <summary>
        /// <para>The encoder instance.</para>
        /// </summary>
        internal static enc.StructEncoder<UploadSessionFinishBatchResult> Encoder = new UploadSessionFinishBatchResultEncoder();

        /// <summary>
        /// <para>The decoder instance.</para>
        /// </summary>
        internal static enc.StructDecoder<UploadSessionFinishBatchResult> Decoder = new UploadSessionFinishBatchResultDecoder();

        /// <summary>
        /// <para>Initializes a new instance of the <see cref="UploadSessionFinishBatchResult"
        /// /> class.</para>
        /// </summary>
        /// <param name="entries">Each entry in <see
        /// cref="Dropbox.Api.Files.UploadSessionFinishBatchArg.Entries" /> will appear at the
        /// same position inside <see
        /// cref="Dropbox.Api.Files.UploadSessionFinishBatchResult.Entries" />.</param>
        public UploadSessionFinishBatchResult(col.IEnumerable<UploadSessionFinishBatchResultEntry> entries)
        {
            var entriesList = enc.Util.ToList(entries);

            if (entries == null)
            {
                throw new sys.ArgumentNullException("entries");
            }

            this.Entries = entriesList;
        }

        /// <summary>
        /// <para>Initializes a new instance of the <see cref="UploadSessionFinishBatchResult"
        /// /> class.</para>
        /// </summary>
        /// <remarks>This is to construct an instance of the object when
        /// deserializing.</remarks>
        [sys.ComponentModel.EditorBrowsable(sys.ComponentModel.EditorBrowsableState.Never)]
        public UploadSessionFinishBatchResult()
        {
        }

        /// <summary>
        /// <para>Each entry in <see
        /// cref="Dropbox.Api.Files.UploadSessionFinishBatchArg.Entries" /> will appear at the
        /// same position inside <see
        /// cref="Dropbox.Api.Files.UploadSessionFinishBatchResult.Entries" />.</para>
        /// </summary>
        public col.IList<UploadSessionFinishBatchResultEntry> Entries { get; protected set; }

        #region Encoder class

        /// <summary>
        /// <para>Encoder for  <see cref="UploadSessionFinishBatchResult" />.</para>
        /// </summary>
        private class UploadSessionFinishBatchResultEncoder : enc.StructEncoder<UploadSessionFinishBatchResult>
        {
            /// <summary>
            /// <para>Encode fields of given value.</para>
            /// </summary>
            /// <param name="value">The value.</param>
            /// <param name="writer">The writer.</param>
            public override void EncodeFields(UploadSessionFinishBatchResult value, enc.IJsonWriter writer)
            {
                WriteListProperty("entries", value.Entries, writer, global::Dropbox.Api.Files.UploadSessionFinishBatchResultEntry.Encoder);
            }
        }

        #endregion

        #region Decoder class

        /// <summary>
        /// <para>Decoder for  <see cref="UploadSessionFinishBatchResult" />.</para>
        /// </summary>
        private class UploadSessionFinishBatchResultDecoder : enc.StructDecoder<UploadSessionFinishBatchResult>
        {
            /// <summary>
            /// <para>Create a new instance of type <see cref="UploadSessionFinishBatchResult"
            /// />.</para>
            /// </summary>
            /// <returns>The struct instance.</returns>
            protected override UploadSessionFinishBatchResult Create()
            {
                return new UploadSessionFinishBatchResult();
            }

            /// <summary>
            /// <para>Set given field.</para>
            /// </summary>
            /// <param name="value">The field value.</param>
            /// <param name="fieldName">The field name.</param>
            /// <param name="reader">The json reader.</param>
            protected override void SetField(UploadSessionFinishBatchResult value, string fieldName, enc.IJsonReader reader)
            {
                switch (fieldName)
                {
                    case "entries":
                        value.Entries = ReadList<UploadSessionFinishBatchResultEntry>(reader, global::Dropbox.Api.Files.UploadSessionFinishBatchResultEntry.Decoder);
                        break;
                    default:
                        reader.Skip();
                        break;
                }
            }
        }

        #endregion
    }
}


text:
namespace Rosalia.FileSystem
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;

    /// <summary>
    /// A set of helpful extension methods for file system objects
    /// </summary>
    public static class FileSystemExtensions
    {
        /// <summary>
        /// Writes a string to a file.
        /// </summary>
        /// <param name="content">string content</param>
        /// <param name="file">destination file</param>
        public static void WriteStringToFile(this IFile file, string content)
        {
            using (var writer = new StreamWriter(file.WriteStream))
            {
                writer.Write(content);
            }
        }

        public static string ReadAllText(this IFile file)
        {
            using (var reader = new StreamReader(file.ReadStream))
            {
                return reader.ReadToEnd();
            }
        }

        [Obsolete("Use SearchFilesRecursively")]
        public static FileList SearchFilesIn(this IDirectory directory)
        {
            return new FileList(GetFilesRecursivelySource(directory), directory);
        }

        /// <summary>
        /// Retrieves all directory files recursively.
        /// </summary>
        /// <param name="directory">target directory</param>
        /// <returns>a list of files</returns>
        public static FileList SearchFilesRecursively(this IDirectory directory)
        {
            return new FileList(GetFilesRecursivelySource(directory), directory);
        }

        /// <summary>
        /// Finds closest directory matching the predicate.
        /// Checks the directory itself and it's parents.
        /// Returns null if none of parent directories match the predicate.
        /// </summary>
        public static IDirectory Closest(this IDirectory directory, Predicate<IDirectory> predicate)
        {
            return directory.GetParentsChain().FirstOrDefault(dir => predicate(dir));
        }

        /// <summary>
        /// Yields directory itself and all it's parents.
        /// </summary>
        public static IEnumerable<IDirectory> GetParentsChain(this IDirectory directory)
        {
            IDirectory currentDirectory = directory;
            while (currentDirectory != null)
            {
                yield return currentDirectory;
                currentDirectory = currentDirectory.Parent;
            }
        }

        private static IEnumerable<IFile> GetFilesRecursivelySource(this IDirectory directory)
        {
            if (directory.Files != null)
            {
                foreach (var file in directory.Files)
                {
                    yield return file;
                }
            }

            if (directory.Directories != null)
            {
                foreach (var childDirectory in directory.Directories)
                {
                    foreach (var childFile in GetFilesRecursivelySource(childDirectory))
                    {
                        yield return childFile;
                    }
                }
            }
        }
    }
}


text:
<?php

// =============================================================================
// FUNCTIONS/GLOBAL/ADMIN/CUSTOMIZER/OUTPUT/RENEW.PHP
// -----------------------------------------------------------------------------
// Renew CSS ouptut.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Site Link Color Accents
//   02. Layout Sizing
//   03. Masthead
//   04. Navbar
//   05. Navbar - Positioning
//   06. Navbar - Dropdowns
//   07. Colophon
//   08. Custom Fonts
//   09. Custom Fonts - Colors
//   10. Responsive Styling
// =============================================================================

$x_renew_entry_icon_color               = x_get_option( 'x_renew_entry_icon_color' );
$x_renew_topbar_text_color              = x_get_option( 'x_renew_topbar_text_color' );
$x_renew_topbar_link_color_hover        = x_get_option( 'x_renew_topbar_link_color_hover' );
$x_renew_topbar_background              = x_get_option( 'x_renew_topbar_background' );
$x_renew_logobar_background             = x_get_option( 'x_renew_logobar_background' );
$x_renew_navbar_button_color            = x_get_option( 'x_renew_navbar_button_color' );
$x_renew_navbar_background              = x_get_option( 'x_renew_navbar_background' );
$x_renew_navbar_button_background_hover = x_get_option( 'x_renew_navbar_button_background_hover' );
$x_renew_navbar_button_background       = x_get_option( 'x_renew_navbar_button_background' );
$x_renew_footer_background              = x_get_option( 'x_renew_footer_background' );
$x_renew_footer_text_color              = x_get_option( 'x_renew_footer_text_color' );
$x_renew_entry_icon_position            = x_get_option( 'x_renew_entry_icon_position' );
$x_renew_entry_icon_position_vertical   = x_get_option( 'x_renew_entry_icon_position_vertical' );
$x_renew_entry_icon_position_horizontal = x_get_option( 'x_renew_entry_icon_position_horizontal' );

?>

/* Site Link Color Accents
// ========================================================================== */

/*
// Color.
*/

a,
h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
h6 a:hover,
.x-comment-time:hover,
#reply-title small a,
.comment-reply-link:hover,
.x-comment-author a:hover {
  color: <?php echo $x_site_link_color; ?>;
}

a:hover,
#reply-title small a:hover,
.x-recent-posts a:hover .h-recent-posts {
  color: <?php echo $x_site_link_color_hover; ?>;
}

.entry-title:before {
  color: <?php echo $x_renew_entry_icon_color; ?>;
}

<?php if ( X_WOOCOMMERCE_IS_ACTIVE ) : ?>

  .woocommerce .price > .amount,
  .woocommerce .price > ins > .amount,
  .woocommerce-page .price > .amount,
  .woocommerce-page .price > ins > .amount,
  .woocommerce li.product .entry-header h3 a:hover,
  .woocommerce-page li.product .entry-header h3 a:hover,
  .woocommerce .star-rating:before,
  .woocommerce-page .star-rating:before,
  .woocommerce .star-rating span:before,
  .woocommerce-page .star-rating span:before {
    color: <?php echo $x_site_link_color; ?>;
  }

<?php endif; ?>

/*
// Border color.
*/

a.x-img-thumbnail:hover,
li.bypostauthor > article.comment {
  border-color: <?php echo $x_site_link_color; ?>;
}

<?php if ( X_WOOCOMMERCE_IS_ACTIVE ) : ?>

  .woocommerce div.product .woocommerce-tabs .x-comments-area li.comment.bypostauthor .x-comment-header .star-rating-container,
  .woocommerce-page div.product .woocommerce-tabs .x-comments-area li.comment.bypostauthor .x-comment-header .star-rating-container {
    border-color: <?php echo $x_site_link_color; ?>;
  }

<?php endif; ?>

/*
// Background color.
*/

.flex-direction-nav a,
.flex-control-nav a:hover,
.flex-control-nav a.flex-active,
.x-dropcap,
.x-skill-bar .bar,
.x-pricing-column.featured h2,
.h-comments-title small,
.pagination a:hover,
.x-entry-share .x-share:hover,
.entry-thumb,
.widget_tag_cloud .tagcloud a:hover,
.widget_product_tag_cloud .tagcloud a:hover,
.x-highlight,
.x-recent-posts .x-recent-posts-img,
.x-recent-posts .x-recent-posts-img:before,
.x-portfolio-filters {
  background-color: <?php echo $x_site_link_color; ?>;
}

.x-recent-posts a:hover .x-recent-posts-img,
.x-portfolio-filters:hover {
  background-color: <?php echo $x_site_link_color_hover; ?>;
}

<?php if ( X_WOOCOMMERCE_IS_ACTIVE ) : ?>

  .woocommerce .onsale,
  .woocommerce-page .onsale,
  .widget_price_filter .ui-slider .ui-slider-range,
  .woocommerce div.product .woocommerce-tabs .x-comments-area li.comment.bypostauthor article.comment:before,
  .woocommerce-page div.product .woocommerce-tabs .x-comments-area li.comment.bypostauthor article.comment:before {
    background-color: <?php echo $x_site_link_color; ?>;
  }

<?php endif; ?>

/* Layout Sizing
// ========================================================================== */

.x-main {
  width: <?php echo $x_layout_content_width - 3.20197 . '%'; ?>;
}

.x-sidebar {
  width: <?php echo 100 - 3.20197 - $x_layout_content_width . '%'; ?>;
}

/* Masthead
// ========================================================================== */

.x-topbar .p-info,
.x-topbar .p-info a,
.x-topbar .x-social-global a {
  color: <?php echo $x_renew_topbar_text_color; ?>;
}

.x-topbar .p-info a:hover {
  color: <?php echo $x_renew_topbar_link_color_hover; ?>;
}

.x-topbar {
  background-color: <?php echo $x_renew_topbar_background; ?>;
}

<?php if ( $x_logo_navigation_layout == 'stacked' ) : ?>

  .x-logobar {
    background-color: <?php echo $x_renew_logobar_background; ?>;
  }

<?php endif; ?>

/* Navbar
// ========================================================================== */

.x-navbar .desktop .x-nav > li:before {
  padding-top: <?php echo $x_navbar_adjust_links_top . 'px'; ?>;
}

/*
// Color.
*/

.x-brand,
.x-brand:hover,
.x-navbar .desktop .x-nav > li > a,
.x-navbar .desktop .sub-menu li > a,
.x-navbar .mobile .x-nav li a {
  color: <?php echo $x_navbar_link_color; ?>;
}

.x-navbar .desktop .x-nav > li > a:hover,
.x-navbar .desktop .x-nav > .x-active > a,
.x-navbar .desktop .x-nav > .current-menu-item > a,
.x-navbar .desktop .sub-menu li > a:hover,
.x-navbar .desktop .sub-menu li.x-active > a,
.x-navbar .desktop .sub-menu li.current-menu-item > a,
.x-navbar .desktop .x-nav .x-megamenu > .sub-menu > li > a,
.x-navbar .mobile .x-nav li > a:hover,
.x-navbar .mobile .x-nav li.x-active > a,
.x-navbar .mobile .x-nav li.current-menu-item > a {
  color: <?php echo $x_navbar_link_color_hover; ?>;
}

.x-btn-navbar,
.x-btn-navbar:hover {
  color: <?php echo $x_renew_navbar_button_color; ?>;
}

/*
// Background color.
*/

.x-navbar .desktop .sub-menu li:before,
.x-navbar .desktop .sub-menu li:after {
  background-color: <?php echo $x_navbar_link_color; ?>;
}

.x-navbar,
.x-navbar .sub-menu {
  background-color: <?php echo $x_renew_navbar_background; ?> !important;
}

.x-btn-navbar,
.x-btn-navbar.collapsed:hover {
  background-color: <?php echo $x_renew_navbar_button_background_hover; ?>;
}

.x-btn-navbar.collapsed {
  background-color: <?php echo $x_renew_navbar_button_background; ?>;
}

/*
// Box shadow.
*/

.x-navbar .desktop .x-nav > li > a:hover > span,
.x-navbar .desktop .x-nav > li.x-active > a > span,
.x-navbar .desktop .x-nav > li.current-menu-item > a > span {
  box-shadow: 0 2px 0 0 <?php echo $x_navbar_link_color_hover; ?>;
}

/* Navbar - Positioning
// ========================================================================== */

<?php if ( $x_navbar_positioning == 'static-top' || $x_navbar_positioning == 'fixed-top' ) : ?>

  .x-navbar .desktop .x-nav > li > a {
    height: <?php echo $x_navbar_height . 'px'; ?>;
    padding-top: <?php echo $x_navbar_adjust_links_top . 'px'; ?>;
  }

<?php endif; ?>

<?php if ( $x_navbar_positioning == 'fixed-left' || $x_navbar_positioning == 'fixed-right' ) : ?>

  .x-navbar .desktop .x-nav > li > a {
    padding-top: <?php echo round( ( $x_navbar_adjust_links_side - $x_navbar_font_size ) / 2 ) . 'px'; ?>;
    padding-bottom: <?php echo round( ( $x_navbar_adjust_links_side - $x_navbar_font_size ) / 2 ) . 'px'; ?>;
    padding-left: 10%;
    padding-right: 10%;
  }

  .desktop .x-megamenu > .sub-menu {
    width: <?php echo 879 - $x_navbar_width . 'px'; ?>
  }

<?php endif; ?>

<?php if ( $x_navbar_positioning == 'fixed-left' ) : ?>

  .x-widgetbar {
    left: <?php echo $x_navbar_width . 'px'; ?>;
  }

<?php endif; ?>

<?php if ( $x_navbar_positioning == 'fixed-right' ) : ?>

  .x-widgetbar {
    right: <?php echo $x_navbar_width . 'px'; ?>;
  }

<?php endif; ?>

/* Navbar - Dropdowns
// ========================================================================== */

.x-navbar .desktop .x-nav > li ul {
  top: <?php echo $x_navbar_height . 'px'; ?>;
}

/* Colophon
// ========================================================================== */

.x-colophon.bottom {
  background-color: <?php echo $x_renew_footer_background; ?>;
}

.x-colophon.bottom,
.x-colophon.bottom a,
.x-colophon.bottom .x-social-global a {
  color: <?php echo $x_renew_footer_text_color; ?>;
}

/* Custom Fonts
// ========================================================================== */

.h-landmark {
  font-weight: <?php echo $x_body_font_weight; ?>;
  <?php if ( x_is_font_italic( $x_body_font_weight_and_style ) ) : ?>
    font-style: italic;
  <?php endif; ?>
}

/* Custom Fonts - Colors
// ========================================================================== */

/*
// Brand.
*/

<?php if ( $x_logo_font_color_enable == '1' ) : ?>

  .x-brand,
  .x-brand:hover {
    color: <?php echo $x_logo_font_color; ?>;
  }

<?php endif; ?>

/*
// Body.
*/

<?php if ( $x_body_font_color_enable == '1' ) : ?>

  .x-comment-author a {
    color: <?php echo $x_body_font_color; ?>;
  }

  <?php if ( X_WOOCOMMERCE_IS_ACTIVE ) : ?>

    .woocommerce .price > .from,
    .woocommerce .price > del,
    .woocommerce p.stars span a:after,
    .woocommerce-page .price > .from,
    .woocommerce-page .price > del,
    .woocommerce-page p.stars span a:after,
    .widget_price_filter .price_slider_amount .button,
    .widget_shopping_cart .buttons .button {
      color: <?php echo $x_body_font_color; ?>;
    }

  <?php endif; ?>

<?php endif; ?>

/*
// Headings.
*/

<?php if ( $x_headings_font_color_enable == '1' ) : ?>

  .x-comment-author a,
  .comment-form-author label,
  .comment-form-email label,
  .comment-form-url label,
  .comment-form-rating label,
  .comment-form-comment label,
  .widget_calendar #wp-calendar caption,
  .widget_calendar #wp-calendar th,
  .x-accordion-heading .x-accordion-toggle,
  .x-nav-tabs > li > a:hover,
  .x-nav-tabs > .active > a,
  .x-nav-tabs > .active > a:hover {
    color: <?php echo $x_headings_font_color; ?>;
  }

  .widget_calendar #wp-calendar th {
    border-bottom-color: <?php echo $x_headings_font_color; ?>;
  }

  .pagination span.current,
  .x-portfolio-filters-menu,
  .widget_tag_cloud .tagcloud a,
  .h-feature-headline span i,
  .widget_price_filter .ui-slider .ui-slider-handle {
    background-color: <?php echo $x_headings_font_color; ?>;
  }

<?php endif; ?>

/* Responsive Styling
// ========================================================================== */

@media (max-width: 979px) {

  <?php if ( $x_navbar_positioning == 'fixed-top' && $x_layout_site == 'boxed' ) : ?>

    .x-navbar.x-navbar-fixed-top.x-container.max.width {
      left: 0;
      right: 0;
      width: 100%;
    }

  <?php endif; ?>

  <?php if ( $x_navbar_positioning == 'fixed-left' || $x_navbar_positioning == 'fixed-right' ) : ?>

    .x-navbar .x-navbar-inner > .x-container.width {
      width: <?php echo $x_layout_site_width . '%'; ?>;
    }

  <?php endif; ?>

  .x-widgetbar {
    left: 0;
    right: 0;
  }
}

<?php if ( is_home() && $x_renew_entry_icon_position == 'creative' && x_get_option( 'x_blog_style' ) == 'standard'  ) : ?>

  @media (min-width: 980px) {
    .x-full-width-active .entry-title:before,
    .x-content-sidebar-active .entry-title:before {
      position: absolute;
      width: 70px;
      height: 70px;
      margin-top: -<?php echo $x_renew_entry_icon_position_vertical . 'px'; ?>;
      margin-left: -<?php echo $x_renew_entry_icon_position_horizontal . '%'; ?>;
      font-size: 32px;
      font-size: 3.2rem;
      line-height: 70px;
      border-radius: 100em;
    }
  }

<?php endif; ?>


text:
namespace v8 {
namespace base {

TEST(ConditionVariable, WaitForAfterNofityOnSameThread) {
  for (int n = 0; n < 10; ++n) {
    Mutex mutex;
    ConditionVariable cv;

    MutexGuard lock_guard(&mutex);

    cv.NotifyOne();
    EXPECT_FALSE(cv.WaitFor(&mutex, TimeDelta::FromMicroseconds(n)));

    cv.NotifyAll();
    EXPECT_FALSE(cv.WaitFor(&mutex, TimeDelta::FromMicroseconds(n)));
  }
}

namespace {

class ThreadWithMutexAndConditionVariable final : public Thread {
 public:
  ThreadWithMutexAndConditionVariable()
      : Thread(Options("ThreadWithMutexAndConditionVariable")),
        running_(false),
        finished_(false) {}

  void Run() override {
    MutexGuard lock_guard(&mutex_);
    running_ = true;
    cv_.NotifyOne();
    while (running_) {
      cv_.Wait(&mutex_);
    }
    finished_ = true;
    cv_.NotifyAll();
  }

  bool running_;
  bool finished_;
  ConditionVariable cv_;
  Mutex mutex_;
};

}  // namespace

TEST(ConditionVariable, MultipleThreadsWithSeparateConditionVariables) {
  static const int kThreadCount = 128;
  ThreadWithMutexAndConditionVariable threads[kThreadCount];

  for (int n = 0; n < kThreadCount; ++n) {
    MutexGuard lock_guard(&threads[n].mutex_);
    EXPECT_FALSE(threads[n].running_);
    EXPECT_FALSE(threads[n].finished_);
    CHECK(threads[n].Start());
    // Wait for nth thread to start.
    while (!threads[n].running_) {
      threads[n].cv_.Wait(&threads[n].mutex_);
    }
  }

  for (int n = kThreadCount - 1; n >= 0; --n) {
    MutexGuard lock_guard(&threads[n].mutex_);
    EXPECT_TRUE(threads[n].running_);
    EXPECT_FALSE(threads[n].finished_);
  }

  for (int n = 0; n < kThreadCount; ++n) {
    MutexGuard lock_guard(&threads[n].mutex_);
    EXPECT_TRUE(threads[n].running_);
    EXPECT_FALSE(threads[n].finished_);
    // Tell the nth thread to quit.
    threads[n].running_ = false;
    threads[n].cv_.NotifyOne();
  }

  for (int n = kThreadCount - 1; n >= 0; --n) {
    // Wait for nth thread to quit.
    MutexGuard lock_guard(&threads[n].mutex_);
    while (!threads[n].finished_) {
      threads[n].cv_.Wait(&threads[n].mutex_);
    }
    EXPECT_FALSE(threads[n].running_);
    EXPECT_TRUE(threads[n].finished_);
  }

  for (int n = 0; n < kThreadCount; ++n) {
    threads[n].Join();
    MutexGuard lock_guard(&threads[n].mutex_);
    EXPECT_FALSE(threads[n].running_);
    EXPECT_TRUE(threads[n].finished_);
  }
}

namespace {

class ThreadWithSharedMutexAndConditionVariable final : public Thread {
 public:
  ThreadWithSharedMutexAndConditionVariable()
      : Thread(Options("ThreadWithSharedMutexAndConditionVariable")),
        running_(false),
        finished_(false),
        cv_(nullptr),
        mutex_(nullptr) {}

  void Run() override {
    MutexGuard lock_guard(mutex_);
    running_ = true;
    cv_->NotifyAll();
    while (running_) {
      cv_->Wait(mutex_);
    }
    finished_ = true;
    cv_->NotifyAll();
  }

  bool running_;
  bool finished_;
  ConditionVariable* cv_;
  Mutex* mutex_;
};

}  // namespace

TEST(ConditionVariable, MultipleThreadsWithSharedSeparateConditionVariables) {
  static const int kThreadCount = 128;
  ThreadWithSharedMutexAndConditionVariable threads[kThreadCount];
  ConditionVariable cv;
  Mutex mutex;

  for (int n = 0; n < kThreadCount; ++n) {
    threads[n].mutex_ = &mutex;
    threads[n].cv_ = &cv;
  }

  // Start all threads.
  {
    MutexGuard lock_guard(&mutex);
    for (int n = 0; n < kThreadCount; ++n) {
      EXPECT_FALSE(threads[n].running_);
      EXPECT_FALSE(threads[n].finished_);
      CHECK(threads[n].Start());
    }
  }

  // Wait for all threads to start.
  {
    MutexGuard lock_guard(&mutex);
    for (int n = kThreadCount - 1; n >= 0; --n) {
      while (!threads[n].running_) {
        cv.Wait(&mutex);
      }
    }
  }

  // Make sure that all threads are running.
  {
    MutexGuard lock_guard(&mutex);
    for (int n = 0; n < kThreadCount; ++n) {
      EXPECT_TRUE(threads[n].running_);
      EXPECT_FALSE(threads[n].finished_);
    }
  }

  // Tell all threads to quit.
  {
    MutexGuard lock_guard(&mutex);
    for (int n = kThreadCount - 1; n >= 0; --n) {
      EXPECT_TRUE(threads[n].running_);
      EXPECT_FALSE(threads[n].finished_);
      // Tell the nth thread to quit.
      threads[n].running_ = false;
    }
    cv.NotifyAll();
  }

  // Wait for all threads to quit.
  {
    MutexGuard lock_guard(&mutex);
    for (int n = 0; n < kThreadCount; ++n) {
      while (!threads[n].finished_) {
        cv.Wait(&mutex);
      }
    }
  }

  // Make sure all threads are finished.
  {
    MutexGuard lock_guard(&mutex);
    for (int n = kThreadCount - 1; n >= 0; --n) {
      EXPECT_FALSE(threads[n].running_);
      EXPECT_TRUE(threads[n].finished_);
    }
  }

  // Join all threads.
  for (int n = 0; n < kThreadCount; ++n) {
    threads[n].Join();
  }
}

namespace {

class LoopIncrementThread final : public Thread {
 public:
  LoopIncrementThread(int rem, int* counter, int limit, int thread_count,
                      ConditionVariable* cv, Mutex* mutex)
      : Thread(Options("LoopIncrementThread")),
        rem_(rem),
        counter_(counter),
        limit_(limit),
        thread_count_(thread_count),
        cv_(cv),
        mutex_(mutex) {
    EXPECT_LT(rem, thread_count);
    EXPECT_EQ(0, limit % thread_count);
  }

  void Run() override {
    int last_count = -1;
    while (true) {
      MutexGuard lock_guard(mutex_);
      int count = *counter_;
      while (count % thread_count_ != rem_ && count < limit_) {
        cv_->Wait(mutex_);
        count = *counter_;
      }
      if (count >= limit_) break;
      EXPECT_EQ(*counter_, count);
      if (last_count != -1) {
        EXPECT_EQ(last_count + (thread_count_ - 1), count);
      }
      count++;
      *counter_ = count;
      last_count = count;
      cv_->NotifyAll();
    }
  }

 private:
  const int rem_;
  int* counter_;
  const int limit_;
  const int thread_count_;
  ConditionVariable* cv_;
  Mutex* mutex_;
};

}  // namespace

TEST(ConditionVariable, LoopIncrement) {
  static const int kMaxThreadCount = 16;
  Mutex mutex;
  ConditionVariable cv;
  for (int thread_count = 1; thread_count < kMaxThreadCount; ++thread_count) {
    int limit = thread_count * 10;
    int counter = 0;

    // Setup the threads.
    Thread** threads = new Thread* [thread_count];
    for (int n = 0; n < thread_count; ++n) {
      threads[n] = new LoopIncrementThread(n, &counter, limit, thread_count,
                                           &cv, &mutex);
    }

    // Start all threads.
    for (int n = thread_count - 1; n >= 0; --n) {
      CHECK(threads[n]->Start());
    }

    // Join and cleanup all threads.
    for (int n = 0; n < thread_count; ++n) {
      threads[n]->Join();
      delete threads[n];
    }
    delete[] threads;

    EXPECT_EQ(limit, counter);
  }
}

}  // namespace base
}  // namespace v8


text:
namespace nn {

    namespace detail {
        namespace mpl {
            template< std::size_t FirstInputs, typename RebindedTuple, typename Tuple >
            struct RebindInputsHelper;

            template< std::size_t FirstInputs, typename RebindedTuple, typename FirstLayer, typename... Layers >
            struct RebindInputsHelper< FirstInputs, RebindedTuple, std::tuple< FirstLayer, Layers... > > {
                typedef
                 typename utils::push_back< typename FirstLayer::template adjust< FirstInputs >, RebindedTuple >::type CurrentRebindedTuple;
                typedef typename std::conditional<
                 sizeof...(Layers) == 0,
                 CurrentRebindedTuple,
                 typename RebindInputsHelper< FirstLayer::size(), CurrentRebindedTuple, std::tuple< Layers... > >::type >::type type;
            };

            template< std::size_t FirstInputs, typename RebindedTuple, typename... Layers >
            struct RebindInputsHelper< FirstInputs, RebindedTuple, std::tuple< Layers... > > {
                typedef RebindedTuple type;
            };

            template< std::size_t FirstInputs, typename Tuple >
            struct rebindInputs {
                static_assert(std::tuple_size< Tuple >::value >= 1, "Invalid");
                typedef
                 typename RebindInputsHelper< FirstInputs, std::tuple<>, Tuple >::type type;
            };
        } // namespace mpl
    } // namespace detail
} // namespace nn


text:
START_ATF_NAMESPACE
    namespace Detail
    {
        extern ::std::array<hook_record, 6> CUnmannedTraderGroupDivisionVersionInfo_functions;
    }; // end namespace Detail
END_ATF_NAMESPACE


text:
extern crate lines;
extern crate lisp;

use std::env;
use std::io::{StdoutLock, Write, self};

use lines::Lines;
use lisp::diagnostics;
use lisp::syntax::ast::Expr;
use lisp::syntax::codemap::Source;
use lisp::syntax::pp;
use lisp::syntax::{Error, parse};
use lisp::util::interner::Interner;

fn read(source: &Source, interner: &mut Interner) -> Result<Expr, Error> {
    parse::expr(source, interner)
}

fn eval(input: Expr) -> Expr {
    input
}

fn print(output: &Expr, source: &Source, stdout: &mut StdoutLock) -> io::Result<()> {
    let mut string = pp::expr(output, source);
    string.push('\n');
    stdout.write_all(string.as_bytes())
}

fn rep(stdout: &mut StdoutLock) -> io::Result<()> {
    const PROMPT: &'static str = "> ";

    let stdin = io::stdin();
    let mut lines = Lines::from(stdin.lock());

    let ref mut interner = Interner::new();

    try!(stdout.write_all(PROMPT.as_bytes()));
    try!(stdout.flush());
    while let Some(line) = lines.next() {
        let source = Source::new(try!(line));

        if !source.as_str().trim().is_empty() {
            match read(source, interner) {
                Err(error) => {
                    try!(stdout.write_all(diagnostics::syntax(error, source).as_bytes()))
                },
                Ok(expr) => try!(print(&eval(expr), source, stdout)),
            }
        }

        try!(stdout.write_all(PROMPT.as_bytes()));
        try!(stdout.flush());
    }

    Ok(())
}

fn main() {
    let stdout = io::stdout();
    let mut stdout = stdout.lock();

    if let Err(e) = rep(&mut stdout) {
        env::set_exit_status(1);
        stdout.write_fmt(format_args!("{}", e)).ok();
    }
}


text:
__author__ = 'brianhoffman'

import logging

class Node(object):

    def __init__(self, value):
        self.value = value
        self._child_node = None

# TODO: do note that this is an ordered linked-list. Perhaps this class should
#     be renamed to better indicate that.
# TODO: use a generator/iterator pattern for looping through the list.
class LinkedList(object):

    insertion_result = {'INSERTED': 'inserted', 'EXISTS': 'exists', 'FAILED': 'failed'}

    def __init__(self, order_by):
        self._child_node = None
        self._order_by = order_by
        self._current_node = None

        self.log = logging.getLogger(
            '%s' % self.__class__.__name__
        )

    def insert(self, obj):
        if not self._child_node:
            self._child_node = Node(obj)
            self._current_node = self._child_node
            return LinkedList.insertion_result.get('INSERTED')

        return self._insert(self, obj)

    def clear(self):
        self._child_node = None
        self._current_node = None

    def resetIndex(self):
        self._current_node = self._child_node

    def seek(self):
        if not self._current_node:
            return False

        if not self._current_node._child_node:
            return False

        self._current_node = self._current_node._child_node
        return True

    def currentValue(self):
        if not self._current_node:
            raise LookupError('There aren\'t any nodes on the list.')

        return self._current_node.value

    def hasValue(self):
        return bool(self._child_node)

    def nextValue(self):
        if not self._current_node:
            raise LookupError('There aren\'t any nodes on the list.')
        elif not self._current_node._child_node:
            raise LookupError('The current node does not have any child nodes')

        return self._current_node._child_node.value

    def hasNext(self):
        return bool(self._current_node._child_node)

    def toArray(self):
        return self._toArray(self, [])

    def toArrayValue(self):
        return self._toArray(self, [], True)

    def _toArray(self, node, accum, value=False):
        if not node._child_node:
            return accum
        if value and node._child_node:
            return self._toArray(node._child_node, accum + [node._child_node.value])
        else:
            return self._toArray(node._child_node, accum + [node._child_node.value])

    def _insert(self, parentNode, obj):
        if not parentNode._child_node:
            parentNode._child_node = Node(obj)
            return LinkedList.insertion_result.get('INSERTED')

        order = self._order_by(obj, parentNode._child_node.value)

        if order <= -1:
            node = Node(obj)
            node._child_node = parentNode._child_node
            parentNode._child_node = node
            return LinkedList.insertion_result.get('INSERTED')
        elif order >= 1:
            return self._insert(parentNode._child_node, obj)
        elif order == 0:
            return LinkedList.insertion_result.get('EXISTS')

        return LinkedList.insertion_result.get('FAILED')


text:
package com.vladmihalcea.hibernate.masterclass.laboratory.util.providers;

import com.vladmihalcea.hibernate.masterclass.laboratory.util.EntityProvider;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * BatchEntityProvider - Batch Entity Provider
 *
 * @author Vlad Mihalcea
 */
public class BlogEntityProvider implements EntityProvider {

    @Override
    public Class<?>[] entities() {
        return new Class<?>[]{
                Post.class,
                PostDetails.class,
                PostComment.class
        };
    }

    @Entity(name = "Post")
    @Table(name = "post")
    public static class Post {

        @Id
        private Long id;

        private String title;

        @Version
        private int version;

        public Post() {
        }

        public Post(Long id) {
            this.id = id;
        }

        public Post(String title) {
            this.title = title;
        }

        @OneToMany(cascade = CascadeType.ALL, mappedBy = "post",
                orphanRemoval = true)
        private List<PostComment> comments = new ArrayList<>();

        @OneToOne(cascade = CascadeType.ALL, mappedBy = "post",
                orphanRemoval = true, fetch = FetchType.LAZY)
        private PostDetails details;

        public Long getId() {
            return id;
        }

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

        public String getTitle() {
            return title;
        }

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

        public int getVersion() {
            return version;
        }

        public void setVersion(int version) {
            this.version = version;
        }

        public List<PostComment> getComments() {
            return comments;
        }

        public PostDetails getDetails() {
            return details;
        }

        public void addComment(PostComment comment) {
            comments.add(comment);
            comment.setPost(this);
        }

        public void addDetails(PostDetails details) {
            this.details = details;
            details.setPost(this);
        }

        public void removeDetails() {
            this.details.setPost(null);
            this.details = null;
        }
    }

    @Entity(name = "PostDetails")
    @Table(name = "post_details")
    public static class PostDetails {

        @Id
        private Long id;

        @Column(name = "created_on")
        private Date createdOn;

        @Column(name = "created_by")
        private String createdBy;

        @Version
        private int version;

        public PostDetails() {
            createdOn = new Date();
        }

        @OneToOne(fetch = FetchType.LAZY)
        @JoinColumn(name = "id")
        @MapsId
        private Post post;

        public Long getId() {
            return id;
        }

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

        public Post getPost() {
            return post;
        }

        public void setPost(Post post) {
            this.post = post;
        }

        public Date getCreatedOn() {
            return createdOn;
        }

        public void setCreatedOn(Date createdOn) {
            this.createdOn = createdOn;
        }

        public String getCreatedBy() {
            return createdBy;
        }

        public void setCreatedBy(String createdBy) {
            this.createdBy = createdBy;
        }

        public int getVersion() {
            return version;
        }

        public void setVersion(int version) {
            this.version = version;
        }
    }

    @Entity(name = "PostComment")
    @Table(name = "post_comment")
    public static class PostComment {

        @Id
        private Long id;

        @ManyToOne
        private Post post;

        @Version
        private int version;

        private String review;

        public PostComment() {
        }

        public PostComment(String review) {
            this.review = review;
        }

        public Long getId() {
            return id;
        }

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

        public Post getPost() {
            return post;
        }

        public void setPost(Post post) {
            this.post = post;
        }

        public String getReview() {
            return review;
        }

        public void setReview(String review) {
            this.review = review;
        }

        public int getVersion() {
            return version;
        }

        public void setVersion(int version) {
            this.version = version;
        }
    }
}


text:
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.translate;

import org.chromium.base.test.util.DisabledTest;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.infobar.InfoBar;
import org.chromium.chrome.browser.infobar.InfoBarContainer;
import org.chromium.chrome.test.ChromeActivityTestCaseBase;
import org.chromium.chrome.test.util.InfoBarTestAnimationListener;
import org.chromium.chrome.test.util.InfoBarUtil;
import org.chromium.chrome.test.util.TestHttpServerClient;
import org.chromium.chrome.test.util.TranslateUtil;

/**
 * Tests for the translate infobar, assumes it runs on a system with language
 * preferences set to English.
 *
 * Note: these tests all currently fail because they depend on a newer version of Google Play
 * Services than is installed on the test devices. See http://crbug.com/514449
 */
public class TranslateInfoBarTest extends ChromeActivityTestCaseBase<ChromeActivity> {

    private static final String TRANSLATE_PAGE = "chrome/test/data/translate/fr_test.html";
    private static final String NEVER_TRANSLATE_MESSAGE =
            "Would you like Google Chrome to offer to translate French pages from this"
                    + " site next time?";

    private InfoBarContainer mInfoBarContainer;
    private InfoBarTestAnimationListener mListener;

    public TranslateInfoBarTest() {
        super(ChromeActivity.class);
    }

    @Override
    public void startMainActivity() throws InterruptedException {
        startMainActivityOnBlankPage();
    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        mInfoBarContainer = getActivity().getActivityTab().getInfoBarContainer();
        mListener =  new InfoBarTestAnimationListener();
        mInfoBarContainer.setAnimationListener(mListener);
    }

    /**
     * Test the translate language panel.
     *
     * Bug http://crbug.com/514449
     * @MediumTest
     * @Feature({"Browser", "Main"})
     */
    @DisabledTest
    public void testTranslateLanguagePanel() throws InterruptedException {
        loadUrl(TestHttpServerClient.getUrl(TRANSLATE_PAGE));
        assertTrue("InfoBar not opened.", mListener.addInfoBarAnimationFinished());
        InfoBar infoBar = mInfoBarContainer.getInfoBarsForTesting().get(0);
        assertTrue(InfoBarUtil.hasPrimaryButton(infoBar));
        assertTrue(InfoBarUtil.hasSecondaryButton(infoBar));
        TranslateUtil.openLanguagePanel(this, infoBar);
    }

    /**
     * Test the "never translate" panel.
     *
     * Bug http://crbug.com/514449
     * @MediumTest
     * @Feature({"Browser", "Main"})
     */
    @DisabledTest
    public void testTranslateNeverPanel() throws InterruptedException {
        loadUrl(TestHttpServerClient.getUrl(TRANSLATE_PAGE));
        assertTrue("InfoBar not opened.", mListener.addInfoBarAnimationFinished());
        InfoBar infoBar = mInfoBarContainer.getInfoBarsForTesting().get(0);

        assertTrue(InfoBarUtil.clickCloseButton(infoBar));
        assertTrue(mListener.removeInfoBarAnimationFinished());

        // Reload the page so the infobar shows again
        loadUrl(TestHttpServerClient.getUrl(TRANSLATE_PAGE));
        assertTrue("InfoBar not opened", mListener.addInfoBarAnimationFinished());
        infoBar = mInfoBarContainer.getInfoBarsForTesting().get(0);
        assertTrue(InfoBarUtil.clickCloseButton(infoBar));
        assertTrue("InfoBar not swapped", mListener.swapInfoBarAnimationFinished());

        TranslateUtil.assertInfoBarText(infoBar, NEVER_TRANSLATE_MESSAGE);
    }

    /**
     * Test infobar transitions.
     *
     * Bug http://crbug.com/514449
     * @MediumTest
     * @Feature({"Browser", "Main"})
     */
    @DisabledTest
    public void testTranslateTransitions() throws InterruptedException {
        loadUrl(TestHttpServerClient.getUrl(TRANSLATE_PAGE));
        assertTrue("InfoBar not Added", mListener.addInfoBarAnimationFinished());
        InfoBar infoBar = getInfoBars().get(0);
        assertTrue(InfoBarUtil.hasPrimaryButton(infoBar));
        assertTrue(InfoBarUtil.hasSecondaryButton(infoBar));
        assertTrue(InfoBarUtil.clickPrimaryButton(infoBar));
        assertTrue("BEFORE -> TRANSLATING transition not Swapped.",
                mListener.swapInfoBarAnimationFinished());
        assertTrue("TRANSLATING -> ERROR transition not Swapped.",
                mListener.swapInfoBarAnimationFinished());
    }
}


text:
using UnityEngine;
using System;
using Entities;

namespace Network
{
    public static partial class Protocol
    {
        public static event Action<ErrorCode> OnError = (error) => { };

        /// <summary>
        /// 受信時の共通処理
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="res"></param>
        /// <param name="str"></param>
        /// <param name="cb"></param>
        static void OnReceive<T>(ErrorCode res, string str, Action<T> cb, Func<ErrorCode, bool> error = null)
        {
            if (res == ErrorCode.None)
            {
                cb(JsonUtility.FromJson<T>(str));
            }
            else
            {
                if (error == null || !error(res))
                {
                    OnError(res);
                }
            }
        }
    }
}


text:
require  'spec_helper'

describe Admin::Config::CountriesController, type: :controller do
  # fixtures :all
  render_views

  before(:each) do
    activate_authlogic
    @user = create_super_admin_user
    login_as(@user)
  end

  it "index action should render index template" do
    get :index
    expect(response).to render_template(:index)
  end

  it "update action should redirect and update shipping zone" do
    country = Country.first()
    country.update_attribute(:shipping_zone_id, nil)
    Country.any_instance.stubs(:valid?).returns(true)
    put :update, params: { id: country.id, country: {:shipping_zone_id => 1} }
    country.reload
    expect(country.shipping_zone_id).to eq 1
    expect(response).to redirect_to(admin_config_countries_url)
  end

  it "activate action should redirect and make the country active" do
    country = Country.first()
    country.update_attribute(:active,  false)
    Country.any_instance.stubs(:valid?).returns(true)
    put :activate, params: { id: country.id, country: country.attributes }
    country.reload
    expect(country.active).to be true
    expect(response).to redirect_to(admin_config_countries_url)
  end

  it "destroy action should make the country inactive and redirect to index action" do
    country = Country.first()
    country.update_attribute(:active,  true)
    delete :destroy, params: { id: country.id }
    expect(response).to redirect_to(admin_config_countries_url)
    country.reload
    expect(country.active).to eq false
  end
end


text:
using System.Drawing;
using System.Threading;
using FlaUI.Core.Input;
using FlaUI.Core.UITests.TestFramework;
using FlaUI.UIA3;
using NUnit.Framework;

namespace FlaUI.Core.UITests
{
    [TestFixture]
    public class MouseTests
    {
        [Test]
        public void MoveTest()
        {
            Mouse.Position = new Point(0, 0);
            Mouse.MoveBy(800, 0);
            Mouse.MoveBy(0, 400);
            Mouse.MoveBy(-400, -200);
        }

        [Test]
        public void ClickTest()
        {
            var app = Application.Launch("mspaint");
            using (var automation = new UIA3Automation())
            {
                var mainWindow = app.GetMainWindow(automation);
                var mouseX = mainWindow.Properties.BoundingRectangle.Value.Left + 50;
                var mouseY = mainWindow.Properties.BoundingRectangle.Value.Top + 200;
                Mouse.Position = new Point(mouseX, mouseY);
                Mouse.Down(MouseButton.Left);
                Mouse.MoveBy(100, 10);
                Mouse.MoveBy(10, 50);
                Mouse.Up(MouseButton.Left);
                Thread.Sleep(500);
                TestUtilities.CloseWindowWithDontSave(mainWindow);
            }
            app.Dispose();
        }
    }
}


text:
RPC changes
-----------
`createwallet` now returns a warning if an empty string is used as an encryption password, and does not encrypt the wallet, instead of raising an error.
This makes it easier to disable encryption but also specify other options when using the `bitcoin-cli` tool.


text:
/**
 *
 * app.js
 *
 * This is the entry file for the application, mostly just setup and boilerplate
 * code. Routes are configured at the end of this file!
 *
 */

// Load the ServiceWorker, the Cache polyfill, the manifest.json file and the .htaccess file
// import 'file?name=[name].[ext]!../serviceworker.js';
import 'file?name=[name].[ext]!../manifest.json';
import 'file?name=[name].[ext]!../.htaccess';
import '../favicon.ico';
import '../favicon.png';

// Check for ServiceWorker support before trying to install it
// if ('serviceWorker' in navigator) {
//   navigator.serviceWorker.register('/serviceworker.js').then(() => {
//     // Registration was successful
//   }).catch(() => {
//     // Registration failed
//   });
// } else {
//   // No ServiceWorker Support
// }

// Import all the third party stuff
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Router, Route } from 'react-router';
import { createStore, applyMiddleware, compose } from 'redux';
import persistState from 'redux-localstorage'
import thunk from 'redux-thunk';
import FontFaceObserver from 'fontfaceobserver';
import createHistory from 'history/lib/createBrowserHistory';

// Observer loading of Open Sans (to remove open sans, remove the <link> tag in the index.html file and this observer)
const openSansObserver = new FontFaceObserver('Open Sans', {});

// When Open Sans is loaded, add the js-open-sans-loaded class to the body
openSansObserver.check().then(() => {
  document.body.classList.add('js-open-sans-loaded');
}, () => {
  document.body.classList.remove('js-open-sans-loaded');
});

// Import the pages
import HomePage from './components/pages/HomePage.react';
import ReadmePage from './components/pages/ReadmePage.react';
import NotFoundPage from './components/pages/NotFound.react';
import App from './components/App.react';

// Import the CSS file, which HtmlWebpackPlugin transfers to the build folder
require("bootstrap-webpack");
import '../css/main.css';

// Create the store with the redux-thunk middleware, which allows us
// to do asynchronous things in the actions
import rootReducer from './reducers/rootReducer';
const createPersistentStore = compose(
  persistState()
)(createStore)
const createStoreWithMiddleware = applyMiddleware(thunk)(createPersistentStore);
const store = createStoreWithMiddleware(rootReducer);

// Make reducers hot reloadable, see http://stackoverflow.com/questions/34243684/make-redux-reducers-and-other-non-components-hot-loadable
if (module.hot) {
  module.hot.accept('./reducers/rootReducer', () => {
    const nextRootReducer = require('./reducers/rootReducer').default;
    store.replaceReducer(nextRootReducer);
  });
}

// Mostly boilerplate, except for the Routes. These are the pages you can go to,
// which are all wrapped in the App component, which contains the navigation etc
ReactDOM.render(
  <Provider store={store}>
    <Router history={createHistory()}>
      <Route component={App}>
        <Route path="/" component={HomePage} />
        <Route path="/CampusWhy" component={HomePage} />
        <Route path="*" component={NotFoundPage} />
      </Route>
    </Router>
  </Provider>,
  document.getElementById('app')
);


text: /usr/bin/python /app/console_gator.py


text:
/**
 * @fileoverview Definitions for all iPhone extensions. Created from:
 * http://developer.apple.com/webapps/docs/documentation/AppleApplications/Reference/SafariJSRef/
 *
 * @externs
 * @author agrieve@google.com (Andrew Grieve)
 */

/**
 * The Touch class represents a single touch on the surface. A touch is the
 * presence or movement of a finger that is part of a unique multi-touch
 * sequence.
 * @see http://developer.apple.com/webapps/docs/documentation/AppleApplications/Reference/SafariJSRef/Touch/Touch.html
 * @constructor
 */
function Touch() {}

/**
 * The x-coordinate of the touch's location relative to the window's viewport.
 * @type {number}
 */
Touch.prototype.clientX;

/**
 * The y-coordinate of the touch's location relative to the window's viewport.
 * @type {number}
 */
Touch.prototype.clientY;

/**
 * The unique identifier for this touch object.
 * @type {number}
 */
Touch.prototype.identifier;

/**
 * The x-coordinate of the touch's location in page coordinates.
 * @type {number}
 */
Touch.prototype.pageX;

/**
 * The y-coordinate of the touch's location in page coordinates.
 * @type {number}
 */
Touch.prototype.pageY;

/**
 * The x-coordinate of the touch's location in screen coordinates.
 * @type {number}
 */
Touch.prototype.screenX;

/**
 * The y-coordinate of the touch's location in screen coordinates.
 * @type {number}
 */
Touch.prototype.screenY;

/**
 * The target of this touch.
 * @type {EventTarget}
 */
Touch.prototype.target;

/**
 * The TouchList class is used to represent a collection of Touch objects.
 * @constructor
 */
function TouchList() {}

/**
 * The number of Touch objects in this TouchList object.
 * @type {number}
 */
TouchList.prototype.length;

/**
 * Returns the Touch object at the given index.
 * @param {number} index
 * @return {!Touch}
 */
TouchList.prototype.item = function(index) {};

/**
 * The TouchEvent class encapsulates information about a touch event.
 *
 *
The system continually sends TouchEvent objects to an application as
 * fingers touch and move across a surface. A touch event provides a snapshot of
 * all touches during a multi-touch sequence, most importantly the touches that
 * are new or have changed for a particular target. A multi-touch sequence
 * begins when a finger first touches the surface. Other fingers may
 * subsequently touch the surface, and all fingers may move across the surface.
 * The sequence ends when the last of these fingers is lifted from the surface.
 * An application receives touch event objects during each phase of any touch.
 *

 *
 *
The different types of TouchEvent objects that can occur are:
 *

 *
touchstart - Sent when a finger for a given event touches the surface.
 *
touchmove - Sent when a given event moves on the surface.
 *
touchend - Sent when a given event lifts from the surface.
 *
touchcancel - Sent when the system cancels tracking for the touch.
 *

 * TouchEvent objects are combined together to form high-level GestureEvent
 * objects that are also sent during a multi-touch sequence.

 *
 * @see http://developer.apple.com/webapps/docs/documentation/AppleApplications/Reference/SafariJSRef/TouchEvent/TouchEvent.html
 * @extends {UIEvent}
 * @constructor
 */
function TouchEvent() {}

/**
 * A collection of Touch objects representing all touches associated with this
 * target.
 * @type {TouchList}
 */
TouchEvent.prototype.touches;

/**
 * A collection of Touch objects representing all touches associated with this
 * target.
 * @type {TouchList}
 */
TouchEvent.prototype.targetTouches;

/**
 * A collection of Touch objects representing all touches that changed in this event.
 * @type {TouchList}
 */
TouchEvent.prototype.changedTouches;

/**
 * The distance between two fingers since the start of an event as a multiplier
 * of the initial distance. The initial value is 1.0. If less than 1.0, the
 * gesture is pinch close (to zoom out). If greater than 1.0, the gesture is
 * pinch open (to zoom in).
 * @type {number}
 */
TouchEvent.prototype.scale;

/**
 * The delta rotation since the start of an event, in degrees, where clockwise
 * is positive and counter-clockwise is negative. The initial value is 0.0.
 * @type {number}
 */
TouchEvent.prototype.rotation;

/**
 * Specifies the JavaScript method to invoke when the system cancels tracking
 * for the touch.
 * @param {Event} e
 */
Element.prototype.ontouchcancel = function(e) {};

/**
 * Specifies the JavaScript method to invoke when a given event lifts from the
 * surface.
 * @param {Event} e
 */
Element.prototype.ontouchend = function(e) {};

/**
 * Specifies the JavaScript method to invoke when a finger for a given event
 * moves on the surface.
 * @param {Event} e
 */
Element.prototype.ontouchmove = function(e) {};

/**
 * Specifies the JavaScript method to invoke when a finger for a given event
 * touches the surface.
 * @param {Event} e
 */
Element.prototype.ontouchstart = function(e) {};

/**
 * Specifies the JavaScript method to invoke when the browser device's
 * orientation changes, i.e.the device is rotated.
 * @param {Event} e
 * @see http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW16
 */
Window.prototype.onorientationchange = function(e) {};

/**
 * Returns the orientation of the browser's device, one of [-90, 0, 90, 180].
 * @type {number}
 * @see http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW16
 */
Window.prototype.orientation;

/**
 * @implicitCast
 * @type {boolean}
 */
HTMLInputElement.prototype.autocorrect;

/**
 * @implicitCast
 * @type {boolean}
 */
HTMLInputElement.prototype.autocapitalize;

/**
 * @implicitCast
 * @type {boolean}
 */
HTMLTextAreaElement.prototype.autocorrect;

/**
 * @implicitCast
 * @type {boolean}
 */
HTMLTextAreaElement.prototype.autocapitalize;


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Olympic Sports List</title>
<meta name="Description" content="Complete list and details of all the Olympic Games sports and events which are part of the modern summer Games" />
<link href="../../../style.css"  rel="stylesheet" media="all" />
<link rel="author" href="https://plus.google.com/+RobWood1"/>
<link rel="publisher" href="https://plus.google.com/+topendsports"/>

<gcse:searchbox-only></gcse:searchbox-only>

Home > Events > Olympics > Summer > Sports

Sports of the  Olympic Games

At the first Olympic Games in 1896, there were nine sports  contested. Since that time many sports have been added (and  removed too) from the program. Only five sports have been contested at every summer Olympic Games since 1896: Athletics, Cycling, Fencing, Gymnastics and Swimming.

In 2012 there were 26 sports contested, and in 2016 there was 28, and 33 are scheduled for 2020 (see list). In addition to the official sports on the program, there are other recognized sports that are set for possible inclusion in the future. See also the  pages about the number of sports at each Olympiad, and also the changes over time.

Recent Changes

After the 2008 Olympics the sports of Baseball and Softball were dropped from the program.  In August 2009 the International Olympic Committee (IOC)  voted on the two sports to be added to the program for Rio 2016.
        There was  a list of seven sports that they chose from: golf, rugby union, roller sports, karate, softball, baseball and squash.
  They selected golf and rugby union.

There are many other possible new sports for future Games. In February 2013, wrestling was dropped from the core sports list, and joined  with  baseball and softball (joint bid), climbing, karate, roller sport, squash, wakeboard and wushu   to attempt to gain a place on the program for 2020. In May 2013 the IOC cut Karate, roller sports, sport climbing, wakeboarding and wushu from this list, leaving Baseball-softball, squash and wrestling to be shortlisted. Then in September 2013, they voted to return wrestling to the list of sports for the 2020 Olympic program. In 2015, further voting was held for the inclusion of more sports.

2020 Summer Olympic Sports

(follow the links for more info about each sport)

archery

badminton

baseball and softball

basketball

 beach volleyball

boxing

 canoe       / kayak

climbing

cycling (track, road, mountain, BMX)

diving

equestrian (dressage, jumping and eventing)

fencing

 field hockey

golf

gymnastics

handball

judo

 karate

modern pentathlon

 roller sport

rowing

rugby 7s

sailing

shooting

soccer / football

swimming

 surfing

synchronized swimming

 table tennis

taekwondo

tennis

 track and field

triathlon

volleyball (indoor)

water polo

weightlifting

wrestling

Recently Added Sports

baseball and softball (added for 2020)

 karate (added for 2020)

 roller sport (added for 2020)

climbing  (added for 2020)

 surfing (added for 2020)

golf               (in 2016)

rugby union (in 2016)

Recently Removed Sports

baseball (in 2008)

softball (in 2008)

Possible New Sports

squash

wakeboard

wushu

dancing

bowling

netball

Previous Olympic Sports

(these are just some of the sports that have once been part of the Olympic program. More can be found on Discontinued Olympic Sports)

croquet

motor boating

polo

 tug-of-war

 plunge for distance

 underwater swimming

 obstacle race for swimming

 cricket

lacrosse

jeu de paume

 racquets

Ancient Olympics

These were the events at the ancient Olympic Games. There is more information on the Ancient Events page.

Boxing

Equestrian events:
                Chariot racing,
                Riding

Pankration

Pentathlon:
                Discus,
                Javelin,
                Jump,
                Running,
                Wrestling

Running

Wrestling

Share:

Facebook

Twitter

Google+

Related Pages

future Olympic Games sports

list of sports for each Olympiad

Olympic Sports involving animals

about the number of sports at each Olympiad, and also the changes over time.

what the the most popular Olympic sports?

How sports are selected for the Olympics

POLL: Which of these sports should be next included in the Games? plus other Olympic Games Polls

Please enable JavaScript to view the comments powered by Disqus.

follow Topend Sports

Summer Olympics Menu

Home

Hosts Cities

Countries

Olympic Sports

Science

History

Trivia

Medals

Athletes

Women

Traditions

Boycotts

Doping

Quotes

Random Quote

 more Olympic Quotes

  Olympic Games Clipart

PAGES

home

search

sitemap

SOCIAL

newsletter

facebook

twitter

google+

SECURITY

privacy

disclaimer

copyright

SHOPPING

store

payment

shipping

returns & refunds

ABOUT

contact

author info

advertising

©1997-2017 Topend Sports Network

How to Cite


text: __author__ = 'Solcast API - How To Pandas'


text:
package com.mrprona.brawlassistant.base.util;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.widget.ArrayAdapter;

import com.mrprona.brawlassistant.R;

import java.util.Arrays;

/**
 * User: Histler
 * Date: 16.01.14
 */
public class SteamUtils {
    private static final long STEAM64ID = 76561197960265728L;

    public static long steam32to64(long steam32) {
        return STEAM64ID + steam32;
    }

    public static long steam64to32(long steam64) {
        return steam64 - STEAM64ID;
    }

    public static void addPlayerToListDialog(final Context context, DialogInterface.OnClickListener listener) {
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setTitle(R.string.add_player_title);
        String[] list = context.getResources().getStringArray(R.array.match_history_title);

        builder.setAdapter(new ArrayAdapter<>(context, android.R.layout.simple_spinner_dropdown_item, android.R.id.text1, Arrays.copyOfRange(list, 1, 3)), listener);
        builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });
        builder.show();
    }

    public static String getItemImage(String itemDotaId) {
        return "file:///android_asset/items/" + itemDotaId + ".png";
    }

    public static String getHeroFullImage(String heroDotaId) {
        return "file:///android_asset/heroes/" + heroDotaId + "/full.png";
    }

    public static String getHeroPortraitImage(String heroDotaId) {
        return "file:///android_asset/heroes/" + heroDotaId + "/vert.jpg";
    }

    public static String getHeroMiniImage(String heroDotaId) {
        return "file:///android_asset/heroes/" + heroDotaId + "/mini.png";
    }

    public static String getSkillImage(String skillName) {
        return "file:///android_asset/skills/" + skillName + ".png";
    }
}


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;

#if !NOT_UNITY3D
using UnityEngine;
#endif

namespace ModestTree
{
    public static class ReflectionUtil
    {
        public static Array CreateArray(Type elementType, List<object> instances)
        {
            var array = Array.CreateInstance(elementType, instances.Count);

            for (int i = 0; i < instances.Count; i++)
            {
                var instance = instances[i];

                if (instance != null)
                {
                    Assert.That(instance.GetType().DerivesFromOrEqual(elementType),
                        "Wrong type when creating array, expected something assignable from '"+ elementType +"', but found '" + instance.GetType() + "'");
                }

                array.SetValue(instance, i);
            }

            return array;
        }

        public static IList CreateGenericList(Type elementType, List<object> instances)
        {
            var genericType = typeof(List<>).MakeGenericType(elementType);

            var list = (IList)Activator.CreateInstance(genericType);

            for (int i = 0; i < instances.Count; i++)
            {
                var instance = instances[i];

                if (instance != null)
                {
                    Assert.That(instance.GetType().DerivesFromOrEqual(elementType),
                        "Wrong type when creating generic list, expected something assignable from '"+ elementType +"', but found '" + instance.GetType() + "'");
                }

                list.Add(instance);
            }

            return list;
        }

        public static string ToDebugString(this MethodInfo method)
        {
            return "{0}.{1}".Fmt(method.DeclaringType.PrettyName(), method.Name);
        }

        public static string ToDebugString(this Action action)
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return action.ToString();
#else
            return action.Method.ToDebugString();
#endif
        }

        public static string ToDebugString<TParam1>(this Action<TParam1> action)
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return action.ToString();
#else
            return action.Method.ToDebugString();
#endif
        }

        public static string ToDebugString<TParam1, TParam2>(this Action<TParam1, TParam2> action)
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return action.ToString();
#else
            return action.Method.ToDebugString();
#endif
        }

        public static string ToDebugString<TParam1, TParam2, TParam3>(this Action<TParam1, TParam2, TParam3> action)
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return action.ToString();
#else
            return action.Method.ToDebugString();
#endif
        }

        public static string ToDebugString<TParam1, TParam2, TParam3, TParam4>(this Action<TParam1, TParam2, TParam3, TParam4> action)
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return action.ToString();
#else
            return action.Method.ToDebugString();
#endif
        }

        public static string ToDebugString<TParam1, TParam2, TParam3, TParam4, TParam5>(this
#if NET_4_6
            Action<TParam1, TParam2, TParam3, TParam4, TParam5> action)
#else
            ModestTree.Util.Action<TParam1, TParam2, TParam3, TParam4, TParam5> action)
#endif
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return action.ToString();
#else
            return action.Method.ToDebugString();
#endif
        }

        public static string ToDebugString<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6>(this
#if NET_4_6
            Action<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6> action)
#else
            ModestTree.Util.Action<TParam1, TParam2, TParam3, TParam4, TParam5, TParam6> action)
#endif
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return action.ToString();
#else
            return action.Method.ToDebugString();
#endif
        }

        public static string ToDebugString<TParam1>(this Func<TParam1> func)
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return func.ToString();
#else
            return func.Method.ToDebugString();
#endif
        }

        public static string ToDebugString<TParam1, TParam2>(this Func<TParam1, TParam2> func)
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return func.ToString();
#else
            return func.Method.ToDebugString();
#endif
        }

        public static string ToDebugString<TParam1, TParam2, TParam3>(this Func<TParam1, TParam2, TParam3> func)
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return func.ToString();
#else
            return func.Method.ToDebugString();
#endif
        }

        public static string ToDebugString<TParam1, TParam2, TParam3, TParam4>(this Func<TParam1, TParam2, TParam3, TParam4> func)
        {
#if UNITY_WSA && ENABLE_DOTNET && !UNITY_EDITOR
            return func.ToString();
#else
            return func.Method.ToDebugString();
#endif
        }
    }
}


text:
package de.geeksfactory.opacclient.objects;

/**
 * Object representing a library account
 *
 * @author Raphael Michel
 */
public class Account {
	private long id;
	private String library;

	private String label;
	private String name;
	private String password;
	private long cached;

	@Override
	public String toString() {
		return "Account [id=" + id + ", library=" + library + ", label="
				+ label + ", name=" + name + ", cached=" + cached + "]";
	}

	/**
	 * Get ID this account is stored with in AccountDataStore
	 *
	 * @return Account ID
	 */
	public long getId() {
		return id;
	}

	/**
	 * Set ID this account is stored with in AccountDataStore
	 *
	 * @param id
	 *            Account ID
	 */
	public void setId(long id) {
		this.id = id;
	}

	/**
	 * Get library identifier this Account belongs to.
	 *
	 * @return Library identifier (see {@link Library#getIdent()})
	 */
	public String getLibrary() {
		return library;
	}

	/**
	 * Set library identifier this Account belongs to.
	 *
	 * @param library
	 *            Library identifier (see {@link Library#getIdent()})
	 */
	public void setLibrary(String library) {
		this.library = library;
	}

	/**
	 * Get user-configured Account label.
	 *
	 * @return Label
	 */
	public String getLabel() {
		return label;
	}

	/**
	 * Set user-configured Account label.
	 *
	 * @param label
	 *            Label
	 */
	public void setLabel(String label) {
		this.label = label;
	}

	/**
	 * Get user name / identification
	 *
	 * @return User name or ID
	 */
	public String getName() {
		return name;
	}

	/**
	 * Set user name / identification
	 *
	 * @param name
	 *            User name or ID
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * Set user password
	 *
	 * @return Password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * Get user password
	 *
	 * @param password
	 *            Password
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * Set date of last caching
	 *
	 * @return Timestamp in milliseconds
	 */
	public long getCached() {
		return cached;
	}

	/**
	 * Set date of last caching
	 *
	 * @param cached
	 *            Timestamp in milliseconds (use
	 *            System.currentTimeMillis)
	 */
	public void setCached(long cached) {
		this.cached = cached;
	}
}


text:
* npm init -- fill detail as required

###ExpressJs
* npm install express --save
```js
const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`)
})
```

### MERN
* npm i -s express body-parser cors mongoose dotenv
* **Note :mongodb://localhost/dbName" if you type Port number in connection, sometime It did not responde but shows connect with db , so try it without port**


text:
/*!
 * \file
 * \brief Intel(R) EPID 2.0 parameters C++ wrapper interface.
 */
#ifndef EPID_INTERNAL_TESTHELPER_INCLUDE_TESTHELPER_EPID_PARAMS_TESTHELPER_H_
#define EPID_INTERNAL_TESTHELPER_INCLUDE_TESTHELPER_EPID_PARAMS_TESTHELPER_H_

#include <memory>
#include "epid/types.h"

extern "C" {
#include "ippmath/bignum.h"
#include "ippmath/ecgroup.h"
#include "ippmath/finitefield.h"
}

#include "testhelper/bignum_wrapper-testhelper.h"
#include "testhelper/ecgroup_wrapper-testhelper.h"
#include "testhelper/ecpoint_wrapper-testhelper.h"
#include "testhelper/ffelement_wrapper-testhelper.h"
#include "testhelper/finite_field_wrapper-testhelper.h"

typedef struct Epid2Params_ Epid2Params_;

class Epid20Params {
 public:
  Epid20Params();

  // This class instances are not meant to be copied.
  // Explicitly delete copy constructor and assignment operator.
  Epid20Params(const Epid20Params&) = delete;
  Epid20Params& operator=(const Epid20Params&) = delete;

  virtual ~Epid20Params() {}

  FiniteFieldObj GT;
  EcGroupObj G1;
  EcGroupObj G2;
  FiniteFieldObj fq;
  FiniteFieldObj fp;

 private:
  static const BigNumStr q_str_;
  static const FqElemStr beta_str_;
  static const Fq6ElemStr v_str_;

  static const BigNumStr p_str_;
  static const FqElemStr b_str_;
  static const FqElemStr h_str_;
  static const G1ElemStr g1_str_;

  static const Fq2ElemStr xi_str_;
  static const G2ElemStr g2_str_;

  FiniteFieldObj fq2;
  FiniteFieldObj fq6;
};

#endif  // EPID_INTERNAL_TESTHELPER_INCLUDE_TESTHELPER_EPID_PARAMS_TESTHELPER_H_


text:
package org.apache.camel.component.cxf;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Endpoint;
import javax.xml.ws.Holder;

import org.apache.camel.CamelContext;
import org.apache.camel.test.spring.CamelSpringTestSupport;
import org.apache.camel.wsdl_first.Person;
import org.apache.camel.wsdl_first.PersonImpl;
import org.apache.camel.wsdl_first.PersonService;
import org.apache.camel.wsdl_first.UnknownPersonFault;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class CXFWsdlOnlyTest extends CamelSpringTestSupport {

    private static Endpoint endpoint1;
    private static Endpoint endpoint2;

    private static int port1 = CXFTestSupport.getPort1();
    private static int port2 = CXFTestSupport.getPort2();
    private static int port3 = CXFTestSupport.getPort3();
    private static int port4 = CXFTestSupport.getPort4();

    @Override
    public boolean isCreateCamelContextPerClass() {
        return true;
    }

    @Override
    protected ClassPathXmlApplicationContext createApplicationContext() {
        System.setProperty("CXFWsdlOnlyTest.port1", Integer.toString(port1));
        System.setProperty("CXFWsdlOnlyTest.port2", Integer.toString(port2));
        System.setProperty("CXFWsdlOnlyTest.port3", Integer.toString(port3));
        System.setProperty("CXFWsdlOnlyTest.port4", Integer.toString(port4));

        // When the Application is closed, the camel-cxf endpoint will be shutdown,
        // this will cause the issue of the new http server doesn't send the response back.
        return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/WsdlOnlyBeans.xml");
    }

    @Override
    protected void assertValidContext(CamelContext context) {
        assertNotNull("No context found!", context);
    }

    @BeforeClass
    public static void startServices() {
        Object implementor = new PersonImpl();
        String address = "http://localhost:" + port1 + "/CXFWsdlOnlyTest/PersonService/";
        endpoint1 = Endpoint.publish(address, implementor);

        address = "http://localhost:" + port2 + "/CXFWsdlOnlyTest/PersonService/";
        endpoint2 = Endpoint.publish(address, implementor);
    }

    @AfterClass
    public static void stopServices() {
        if (endpoint1 != null) {
            endpoint1.stop();
        }

        if (endpoint2 != null) {
            endpoint2.stop();
        }
    }

    @Test
    public void testRoutesWithFault() throws Exception {
        URL wsdlURL = getClass().getClassLoader().getResource("person.wsdl");
        PersonService ss = new PersonService(wsdlURL, new QName("http://camel.apache.org/wsdl-first",
                                                                "PersonService"));
        Person client = ss.getSoap();

        ((BindingProvider)client).getRequestContext()
            .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                 "http://localhost:" + port3 + "/CXFWsdlOnlyTest/PersonService/");
        Holder<String> personId = new Holder<>();
        personId.value = "hello";
        Holder<String> ssn = new Holder<>();
        Holder<String> name = new Holder<>();
        client.getPerson(personId, ssn, name);
        assertEquals("Bonjour", name.value);

        personId.value = "";
        ssn = new Holder<>();
        name = new Holder<>();
        Throwable t = null;
        try {
            client.getPerson(personId, ssn, name);
            fail("Expect exception");
        } catch (UnknownPersonFault e) {
            t = e;
        }
        assertTrue(t instanceof UnknownPersonFault);

        Person client2 = ss.getSoap2();
        ((BindingProvider)client2).getRequestContext()
            .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                 "http://localhost:" + port4 + "/CXFWsdlOnlyTest/PersonService/");
        Holder<String> personId2 = new Holder<>();
        personId2.value = "hello";
        Holder<String> ssn2 = new Holder<>();
        Holder<String> name2 = new Holder<>();
        client2.getPerson(personId2, ssn2, name2);
        assertEquals("Bonjour", name2.value);

        personId2.value = "";
        ssn2 = new Holder<>();
        name2 = new Holder<>();
        try {
            client2.getPerson(personId2, ssn2, name2);
            fail("Expect exception");
        } catch (UnknownPersonFault e) {
            t = e;
        }
        assertTrue(t instanceof UnknownPersonFault);
    }

}


text:
package com.vito16.shop.model;

import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author Vito
 * @email zhouwentao16@gmail.com
 * @date 2013-7-9
 */
@Entity
@DynamicUpdate
@Table(name = "T_PRODUCT")
public class Product implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private Integer id;
    private String title;//名称
    private Integer point;//价格
    private Picture masterPic;//主图
    private List<Picture> slavePic;//关联图
    private String note;//描述
    private Date createTime;//创建时间
    private String code;//商品编码
    private String model;//型号
    private Long stock;//库存
    private Admin inputUser;//创建人

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

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

    public String getTitle() {
        return title;
    }

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

    @Lob
    @Column(columnDefinition = "TEXT")
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public Integer getPoint() {
        return point;
    }

    public void setPoint(Integer point) {
        this.point = point;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public Long getStock() {
        return stock;
    }

    public void setStock(Long stock) {
        this.stock = stock;
    }

    @ManyToOne
    @JoinColumn
    public Admin getInputUser() {
        return inputUser;
    }

    public void setInputUser(Admin inputUser) {
        this.inputUser = inputUser;
    }

    @ManyToOne
    @JoinColumn
    public Picture getMasterPic() {
        return masterPic;
    }

    public void setMasterPic(Picture masterPic) {
        this.masterPic = masterPic;
    }

    @ManyToMany
    public List<Picture> getSlavePic() {
        return slavePic;
    }

    public void setSlavePic(List<Picture> slavePic) {
        this.slavePic = slavePic;
    }
}