text:
#import <Foundation/Foundation.h>

#import <Bolts/BFTask.h>

#import <Parse/PFConstants.h>

PF_ASSUME_NONNULL_BEGIN

/*!
 `PFFile` representes a file of binary data stored on the Parse servers.
 This can be a image, video, or anything else that an application needs to reference in a non-relational way.
 */
@interface PFFile : NSObject

///--------------------------------------
/// @name Creating a PFFile
///--------------------------------------

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

/*!
 @abstract Creates a file with given data. A name will be assigned to it by the server.

 @param data The contents of the new `PFFile`.

 @returns A new `PFFile`.
 */
+ (PF_NULLABLE instancetype)fileWithData:(NSData *)data;

/*!
 @abstract Creates a file with given data and name.

 @param name The name of the new PFFile. The file name must begin with and
 alphanumeric character, and consist of alphanumeric characters, periods,
 spaces, underscores, or dashes.
 @param data The contents of the new `PFFile`.

 @returns A new `PFFile` object.
 */
+ (PF_NULLABLE instancetype)fileWithName:(PF_NULLABLE NSString *)name data:(NSData *)data;

/*!
 @abstract Creates a file with the contents of another file.

 @warning This method raises an exception if the file at path is not accessible
 or if there is not enough disk space left.

 @param name  The name of the new `PFFile`. The file name must begin with and alphanumeric character,
 and consist of alphanumeric characters, periods, spaces, underscores, or dashes.
 @param path  The path to the file that will be uploaded to Parse.

 @returns A new `PFFile` instance.
 */
+ (PF_NULLABLE instancetype)fileWithName:(PF_NULLABLE NSString *)name
                          contentsAtPath:(NSString *)path PF_SWIFT_UNAVAILABLE;

/*!
 @abstract Creates a file with the contents of another file.

 @param name  The name of the new `PFFile`. The file name must begin with and alphanumeric character,
 and consist of alphanumeric characters, periods, spaces, underscores, or dashes.
 @param path  The path to the file that will be uploaded to Parse.
 @param error On input, a pointer to an error object.
 If an error occurs, this pointer is set to an actual error object containing the error information.
 You may specify `nil` for this parameter if you do not want the error information.

 @returns A new `PFFile` instance or `nil` if the error occured.
 */
+ (PF_NULLABLE instancetype)fileWithName:(PF_NULLABLE NSString *)name
                          contentsAtPath:(NSString *)path
                                   error:(NSError **)error;

/*!
 @abstract Creates a file with given data, name and content type.

 @warning This method raises an exception if the data supplied is not accessible or could not be saved.

 @param name        The name of the new `PFFile`. The file name must begin with and alphanumeric character,
 and consist of alphanumeric characters, periods, spaces, underscores, or dashes.
 @param data        The contents of the new `PFFile`.
 @param contentType Represents MIME type of the data.

 @returns A new `PFFile` instance.
 */
+ (PF_NULLABLE instancetype)fileWithName:(PF_NULLABLE NSString *)name
                                    data:(NSData *)data
                             contentType:(PF_NULLABLE NSString *)contentType PF_SWIFT_UNAVAILABLE;

/*!
 @abstract Creates a file with given data, name and content type.

 @param name        The name of the new `PFFile`. The file name must begin with and alphanumeric character,
 and consist of alphanumeric characters, periods, spaces, underscores, or dashes.
 @param data        The contents of the new `PFFile`.
 @param contentType Represents MIME type of the data.
 @param error On input, a pointer to an error object.
 If an error occurs, this pointer is set to an actual error object containing the error information.
 You may specify `nil` for this parameter if you do not want the error information.

 @returns A new `PFFile` instance or `nil` if the error occured.
 */
+ (PF_NULLABLE instancetype)fileWithName:(PF_NULLABLE NSString *)name
                                    data:(NSData *)data
                             contentType:(PF_NULLABLE NSString *)contentType
                                   error:(NSError **)error;

/*!
 @abstract Creates a file with given data and content type.

 @param data The contents of the new `PFFile`.
 @param contentType Represents MIME type of the data.

 @returns A new `PFFile` object.
 */
+ (instancetype)fileWithData:(NSData *)data contentType:(PF_NULLABLE NSString *)contentType;

///--------------------------------------
/// @name File Properties
///--------------------------------------

/*!
 @abstract The name of the file.

 @discussion Before the file is saved, this is the filename given by
 the user. After the file is saved, that name gets prefixed with a unique
 identifier.
 */
@property (nonatomic, copy, readonly) NSString *name;

/*!
 @abstract The url of the file.
 */
@property (PF_NULLABLE_PROPERTY nonatomic, copy, readonly) NSString *url;

/*!
 @abstract Whether the file has been uploaded for the first time.
 */
@property (nonatomic, assign, readonly) BOOL isDirty;

///--------------------------------------
/// @name Storing Data with Parse
///--------------------------------------

/*!
 @abstract Saves the file *synchronously*.

 @returns Returns whether the save succeeded.
 */
- (BOOL)save PF_SWIFT_UNAVAILABLE;

/*!
 @abstract Saves the file *synchronously* and sets an error if it occurs.

 @param error Pointer to an `NSError` that will be set if necessary.

 @returns Returns whether the save succeeded.
 */
- (BOOL)save:(NSError **)error;

/*!
 @abstract Saves the file *asynchronously*.

 @returns The task, that encapsulates the work being done.
 */
- (BFTask PF_GENERIC(NSNumber *)*)saveInBackground;

/*!
 @abstract Saves the file *asynchronously*

 @param progressBlock The block should have the following argument signature: `^(int percentDone)`

 @returns The task, that encapsulates the work being done.
 */
- (BFTask PF_GENERIC(NSNumber *)*)saveInBackgroundWithProgressBlock:(PF_NULLABLE PFProgressBlock)progressBlock;

/*!
 @abstract Saves the file *asynchronously* and executes the given block.

 @param block The block should have the following argument signature: `^(BOOL succeeded, NSError *error)`.
 */
- (void)saveInBackgroundWithBlock:(PF_NULLABLE PFBooleanResultBlock)block;

/*!
 @abstract Saves the file *asynchronously* and executes the given block.

 @discussion This method will execute the progressBlock periodically with the percent progress.
 `progressBlock` will get called with `100` before `resultBlock` is called.

 @param block The block should have the following argument signature: `^(BOOL succeeded, NSError *error)`
 @param progressBlock The block should have the following argument signature: `^(int percentDone)`
 */
- (void)saveInBackgroundWithBlock:(PF_NULLABLE PFBooleanResultBlock)block
                    progressBlock:(PF_NULLABLE PFProgressBlock)progressBlock;

/*
 @abstract Saves the file *asynchronously* and calls the given callback.

 @param target The object to call selector on.
 @param selector The selector to call.
 It should have the following signature: `(void)callbackWithResult:(NSNumber *)result error:(NSError *)error`.
 `error` will be `nil` on success and set if there was an error.
 `[result boolValue]` will tell you whether the call succeeded or not.
 */
- (void)saveInBackgroundWithTarget:(PF_NULLABLE_S id)target selector:(PF_NULLABLE_S SEL)selector;

///--------------------------------------
/// @name Getting Data from Parse
///--------------------------------------

/*!
 @abstract Whether the data is available in memory or needs to be downloaded.
 */
@property (assign, readonly) BOOL isDataAvailable;

/*!
 @abstract *Synchronously* gets the data from cache if available or fetches its contents from the network.

 @returns The `NSData` object containing file data. Returns `nil` if there was an error in fetching.
 */
- (PF_NULLABLE NSData *)getData PF_SWIFT_UNAVAILABLE;

/*!
 @abstract This method is like <getData> but avoids ever holding the entire `PFFile` contents in memory at once.

 @discussion This can help applications with many large files avoid memory warnings.

 @returns A stream containing the data. Returns `nil` if there was an error in fetching.
 */
- (PF_NULLABLE NSInputStream *)getDataStream PF_SWIFT_UNAVAILABLE;

/*!
 @abstract *Synchronously* gets the data from cache if available or fetches its contents from the network.
 Sets an error if it occurs.

 @param error Pointer to an `NSError` that will be set if necessary.

 @returns The `NSData` object containing file data. Returns `nil` if there was an error in fetching.
 */
- (PF_NULLABLE NSData *)getData:(NSError **)error;

/*!
 @abstract This method is like <getData> but avoids ever holding the entire `PFFile` contents in memory at once.

 @param error Pointer to an `NSError` that will be set if necessary.

 @returns A stream containing the data. Returns nil if there was an error in
 fetching.
 */
- (PF_NULLABLE NSInputStream *)getDataStream:(NSError **)error;

/*!
 @abstract This method is like <getData> but it fetches asynchronously to avoid blocking the current thread.

 @see getData

 @returns The task, that encapsulates the work being done.
 */
- (BFTask PF_GENERIC(NSData *)*)getDataInBackground;

/*!
 @abstract This method is like <getData> but it fetches asynchronously to avoid blocking the current thread.

 @discussion This can help applications with many large files avoid memory warnings.

 @see getData

 @param progressBlock The block should have the following argument signature: ^(int percentDone)

 @returns The task, that encapsulates the work being done.
 */
- (BFTask PF_GENERIC(NSData *)*)getDataInBackgroundWithProgressBlock:(PF_NULLABLE PFProgressBlock)progressBlock;

/*!
 @abstract This method is like <getDataInBackground> but avoids
 ever holding the entire `PFFile` contents in memory at once.

 @discussion This can help applications with many large files avoid memory warnings.

 @returns The task, that encapsulates the work being done.
 */
- (BFTask PF_GENERIC(NSInputStream *)*)getDataStreamInBackground;

/*!
 @abstract This method is like <getDataStreamInBackground>, but yields a live-updating stream.

 @discussion Instead of <getDataStream>, which yields a stream that can be read from only after the request has
 completed, this method gives you a stream directly written to by the HTTP session. As this stream is not pre-buffered,
 it is strongly advised to use the `NSStreamDelegate` methods, in combination with a run loop, to consume the data in
 the stream, to do proper async file downloading.

 @note You MUST open this stream before reading from it.
 @note Do NOT call <waitUntilFinished> on this task from the main thread. It may result in a deadlock.

 @returns A task that produces a *live* stream that is being written to with the data from the server.
 */
- (BFTask PF_GENERIC(NSInputStream *)*)getDataDownloadStreamInBackground;

/*!
 @abstract This method is like <getDataInBackground> but avoids
 ever holding the entire `PFFile` contents in memory at once.

 @discussion This can help applications with many large files avoid memory warnings.
 @param progressBlock The block should have the following argument signature: ^(int percentDone)

 @returns The task, that encapsulates the work being done.
 */
- (BFTask PF_GENERIC(NSInputStream *)*)getDataStreamInBackgroundWithProgressBlock:(PF_NULLABLE PFProgressBlock)progressBlock;

/*!
 @abstract This method is like <getDataStreamInBackgroundWithProgrssBlock>, but yields a live-updating stream.

 @discussion Instead of <getDataStream>, which yields a stream that can be read from only after the request has
 completed, this method gives you a stream directly written to by the HTTP session. As this stream is not pre-buffered,
 it is strongly advised to use the `NSStreamDelegate` methods, in combination with a run loop, to consume the data in
 the stream, to do proper async file downloading.

 @note You MUST open this stream before reading from it.
 @note Do NOT call <waitUntilFinished> on this task from the main thread. It may result in a deadlock.

 @param progressBlock The block should have the following argument signature: `^(int percentDone)`

 @returns A task that produces a *live* stream that is being written to with the data from the server.
 */
- (BFTask PF_GENERIC(NSInputStream *)*)getDataDownloadStreamInBackgroundWithProgressBlock:(PF_NULLABLE PFProgressBlock)progressBlock;

/*!
 @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network.

 @param block The block should have the following argument signature: `^(NSData *result, NSError *error)`
 */
- (void)getDataInBackgroundWithBlock:(PF_NULLABLE PFDataResultBlock)block;

/*!
 @abstract This method is like <getDataInBackgroundWithBlock:> but avoids
 ever holding the entire `PFFile` contents in memory at once.

 @discussion This can help applications with many large files avoid memory warnings.

 @param block The block should have the following argument signature: `(NSInputStream *result, NSError *error)`
 */
- (void)getDataStreamInBackgroundWithBlock:(PF_NULLABLE PFDataStreamResultBlock)block;

/*!
 @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network.

 @discussion This method will execute the progressBlock periodically with the percent progress.
 `progressBlock` will get called with `100` before `resultBlock` is called.

 @param resultBlock The block should have the following argument signature: ^(NSData *result, NSError *error)
 @param progressBlock The block should have the following argument signature: ^(int percentDone)
 */
- (void)getDataInBackgroundWithBlock:(PF_NULLABLE PFDataResultBlock)resultBlock
                       progressBlock:(PF_NULLABLE PFProgressBlock)progressBlock;

/*!
 @abstract This method is like <getDataInBackgroundWithBlock:progressBlock:> but avoids
 ever holding the entire `PFFile` contents in memory at once.

 @discussion This can help applications with many large files avoid memory warnings.

 @param resultBlock The block should have the following argument signature: `^(NSInputStream *result, NSError *error)`.
 @param progressBlock The block should have the following argument signature: `^(int percentDone)`.
 */
- (void)getDataStreamInBackgroundWithBlock:(PF_NULLABLE PFDataStreamResultBlock)resultBlock
                             progressBlock:(PF_NULLABLE PFProgressBlock)progressBlock;

/*
 @abstract *Asynchronously* gets the data from cache if available or fetches its contents from the network.

 @param target The object to call selector on.
 @param selector The selector to call.
 It should have the following signature: `(void)callbackWithResult:(NSData *)result error:(NSError *)error`.
 `error` will be `nil` on success and set if there was an error.
 */
- (void)getDataInBackgroundWithTarget:(PF_NULLABLE_S id)target selector:(PF_NULLABLE_S SEL)selector;

/*!
 @abstract *Asynchronously* gets the file path for file from cache if available or fetches its contents from the network.

 @note The file path may change between versions of SDK.
 @note If you overwrite the contents of the file at returned path it will persist those change
 until the file cache is cleared.

 @returns The task, with the result set to `NSString` representation of a file path.
 */
- (BFTask PF_GENERIC(NSString *)*)getFilePathInBackground;

/*!
 @abstract *Asynchronously* gets the file path for file from cache if available or fetches its contents from the network.

 @note The file path may change between versions of SDK.
 @note If you overwrite the contents of the file at returned path it will persist those change
 until the file cache is cleared.

 @param progressBlock The block should have the following argument signature: `^(int percentDone)`.

 @returns The task, with the result set to `NSString` representation of a file path.
 */
- (BFTask PF_GENERIC(NSString *)*)getFilePathInBackgroundWithProgressBlock:(PF_NULLABLE PFProgressBlock)progressBlock;

/*!
 @abstract *Asynchronously* gets the file path for file from cache if available or fetches its contents from the network.

 @note The file path may change between versions of SDK.
 @note If you overwrite the contents of the file at returned path it will persist those change
 until the file cache is cleared.

 @param block The block should have the following argument signature: `^(NSString *filePath, NSError *error)`.
 */
- (void)getFilePathInBackgroundWithBlock:(PF_NULLABLE PFFilePathResultBlock)block;

/*!
 @abstract *Asynchronously* gets the file path for file from cache if available or fetches its contents from the network.

 @note The file path may change between versions of SDK.
 @note If you overwrite the contents of the file at returned path it will persist those change
 until the file cache is cleared.

 @param block The block should have the following argument signature: `^(NSString *filePath, NSError *error)`.
 @param progressBlock The block should have the following argument signature: `^(int percentDone)`.
 */
- (void)getFilePathInBackgroundWithBlock:(PF_NULLABLE PFFilePathResultBlock)block
                           progressBlock:(PF_NULLABLE PFProgressBlock)progressBlock;

///--------------------------------------
/// @name Interrupting a Transfer
///--------------------------------------

/*!
 @abstract Cancels the current request (upload or download of file).
 */
- (void)cancel;

@end

PF_ASSUME_NONNULL_END


text:
from pycuda.compiler import SourceModule
from pycuda.tools import context_dependent_memoize

"""
Binary CUDA kernels.
"""

# XNOR GEMM adapted from https://github.com/MatthieuCourbariaux/BinaryNet,
# licensed under the BSD 3-clause license. See details at
# https://github.com/MatthieuCourbariaux/BinaryNet/blob/master/LICENSE.txt
#
# A is shape (m,n), B is shape (n,k) and C is shape (m,k)
# 1 bit operations are simulated by packing 32 bits into a single integer
# and then performing bitwise operations. Matrice dimensions correspond to
# packed integers.
@context_dependent_memoize
def XNOR_gemm():

    code = r"""
#define BLOCK_SIZE 16
__global__ void xnor_gemm(unsigned int* A, unsigned int* B, float* C, int m, int n, int k) {
    // Block row and column
    int blockRow = blockIdx.y;
    int blockCol = blockIdx.x;

    // Thread row and column within Csub
    int row = threadIdx.y;
    int col = threadIdx.x;

    // Each thread block computes one sub-matrix Csub of C
    float* Csub = &C[BLOCK_SIZE * k * blockRow + BLOCK_SIZE * blockCol];

    // Shared memory used to store Asub and Bsub respectively
    __shared__ unsigned int As[BLOCK_SIZE][BLOCK_SIZE];
    __shared__ unsigned int Bs[BLOCK_SIZE][BLOCK_SIZE];

    // Each thread computes one element of Csub
    // by accumulating results into Cvalue
    // BLOCK_SIZE = 16 -> 256 threads, one per Csub element
    unsigned int Cvalue = 0;

    // Loop over all the sub-matrices of A and B that are
    // required to compute Csub
    // Multiply each pair of sub-matrices together
    // and accumulate the results
    for (int i = 0; i < (n / BLOCK_SIZE); ++i) {

        // Get sub-matrix Asub of A
        unsigned int* Asub = &A[BLOCK_SIZE * blockRow * n + BLOCK_SIZE * i];

        // Get sub-matrix Bsub of B
        unsigned int* Bsub = &B[BLOCK_SIZE * k * i + BLOCK_SIZE * blockCol];

        // Load Asub and Bsub from device memory to shared memory
        // Each thread loads one element of each sub-matrix
        As[row][col] = Asub[row*n+col];
        Bs[row][col] = Bsub[row*k+col];

        // Synchronize to make sure the sub-matrices are loaded
        // before starting the computation
        __syncthreads();

        // Multiply Asub and Bsub together
        for (int j = 0; j < BLOCK_SIZE; ++j) {
             Cvalue += __popc(As[row][j]^Bs[j][col]);
        }

        // Synchronize to make sure that the preceding
        // computation is done before loading two new
        // sub-matrices of A and B in the next iteration
        __syncthreads();
    }

    // Write Csub to device memory
    // Each thread writes one element
    if(col + blockCol * BLOCK_SIZE < k && row + blockRow * BLOCK_SIZE < m) {
        Csub[row * k + col] = -(2 * (float) Cvalue - 32 * n);
    }
}
"""

    module = SourceModule(code)
    kernel = module.get_function("xnor_gemm")
    sig = "3P 3I"
    kernel.prepare(sig)
    return kernel

def pack():

    code = r"""
__device__ unsigned int pack(float* array) {
    unsigned int rvalue = 0;
    unsigned int sign;

    for (int i = 0; i < 32; i++) {
        sign = (array[i] >= 0);
        rvalue = rvalue | (sign << i);
    }

    return rvalue;
}
"""

    return code

@context_dependent_memoize
def pack_rows():

    code = pack() + r"""
__global__ void pack_rows(float *a, unsigned int *b, int size) {
    int i = blockIdx.x * blockDim.x + threadIdx.x;

    if (i < size) {
        b[i] = pack(&a[i * 32]);
    }
}
"""

    module = SourceModule(code)
    kernel = module.get_function("pack_rows")
    sig = "2P I"
    kernel.prepare(sig)
    return kernel

@context_dependent_memoize
def pack_cols():

    code = r"""
__global__ void pack_cols(float *a, unsigned int *b, int m, int n) {
    int j = blockIdx.x * blockDim.x + threadIdx.x;
    int i = blockIdx.y * blockDim.y + threadIdx.y;

    if (j < n && 32 * i < m) {
        float num;
        unsigned int rvalue = 0;
        unsigned int sign;

        for(int k = 0; k < 32; k++) {
            num = a[j + n * (32 * i + k)];
            sign = (num >= 0);
            rvalue = rvalue | (sign << k);
        }
        b[j + n * i] = rvalue;
    }
}
"""

    module = SourceModule(code)
    kernel = module.get_function("pack_cols")
    sig = "2P 2I"
    kernel.prepare(sig)
    return kernel

def shift_element():

    code = r"""
__device__ float shift_element(float a, float b, bool value) {
    float result;

    int expb;
    if (value && b == 0) {
        return 0;
    } else if (value) {
        expb = round(log2(abs(b)));
    } else {
        expb = b;
    }

    int expa;
    double mantissa = frexp(a, &expa);
    result = ldexp(mantissa, expa + expb);

    if (value && b < 0) result = -result;

    return result;
}
"""

    return code

@context_dependent_memoize
def shift():

    code = shift_element() + r"""
__global__ void shift(
    float *a, float *b, float *c, bool value, int sizea, int b_rows, int b_cols)
{
    int i = blockIdx.x * blockDim.x + threadIdx.x;

    if (i < sizea) {
        float bi;
        if (b_rows > 1 && b_cols > 1) {
            bi = b[i];
        } else if (b_rows > 1 && b_cols == 1) {
            int step = sizea/b_rows;
            bi = b[i/step];
        } else if (b_rows == 1 && b_cols > 1) {
            bi = b[i % b_cols];
        } else if (b_rows == 1 && b_cols == 1) {
            bi = b[0];
        }

        c[i] = shift_element(a[i], bi, value);
    }
}
"""

    module = SourceModule(code)
    kernel = module.get_function("shift")
    sig = "3P 4I"
    kernel.prepare(sig)
    return kernel

redpajama_set_name: RedPajamaGithub


text:
$(function() {
  // Set a listener for the experienced_hacker radio buttons
  $('section#apply input[name=experienced_hacker]').change(function() {
    console.log(this.value);
    if (this.value === "true") {
      $('#noob-form').addClass('hidden');
      $('#experienced-form').removeClass('hidden');
    } else {
      $('#experienced-form').addClass('hidden');
      $('#noob-form').removeClass('hidden');
    }
    viewportUnitsBuggyfill.refresh();
  });

  // should really disable the return key because people keep submitting incomplete apps
  $('form').bind("keyup keypress", function(e) {
    var code = e.keyCode || e.which;
    if (code  == 13) {
      e.preventDefault();
      return false;
    }
  });

  // handler for form submission
  $('form').submit(function(event) {
    $('#submit').button('loading');
    var $form = $(this);
    var $target = $($form.attr('data-target'));

    // Log the user out in case they're still logged in
    Parse.User.logOut();

    var data = convertFormToJSON($form);
    data.password = Math.random().toString(36).substring(2);
    data.username = data.email;
    console.log(data);
    var user = new Parse.User();
    user.signUp(data, {
      success: function(user) {
        // window.alert("Thanks for your application! Please check your email to confirm your address.");
        window.location = "/success.html"
        $('#submit').button('reset');
      },
      error: function(user, error) {
        window.alert("There was an error with your application: " + error.message);
        $('#submit').button('reset');
      }
    });

    event.preventDefault();
  });
});

function convertFormToJSON(form){
  var array = $(form).serializeArray();
  var json = {};

  jQuery.each(array, function() {
      json[this.name] = this.value || '';
  });

  return json;
}


text:
<?php

namespace TDN\ConcoursBundle\Form\Model;

use Symfony\Component\Validator\Constraints as Assert;

class Invitations {

    /**
     * @var \Doctrine\Common\Collections\ArrayCollection
     */
    protected $emails;

    protected $token;

    public function addEmail($email)
    {
        $this->emails[] = $email;
    }

    public function removeEmail($email)
    {
        $this->emails->removeElement($email);
    }

    public function getEmails()
    {
        return $this->emails;
    }

    public function setToken(Nana $token)
    {
        $this->token = $token;
    }

    public function getToken()
    {
        return $this->token;
    }

}


text:
<?php

namespace PHPExiftool\Driver\Tag\IFD0;

use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;

/**
 * @ExclusionPolicy("all")
 */
class AsShotProfileName extends AbstractTag
{

    protected $Id = 50934;

    protected $Name = 'AsShotProfileName';

    protected $FullName = 'Exif::Main';

    protected $GroupName = 'IFD0';

    protected $g0 = 'EXIF';

    protected $g1 = 'IFD0';

    protected $g2 = 'Image';

    protected $Type = 'string';

    protected $Writable = true;

    protected $Description = 'As Shot Profile Name';

    protected $flag_Unsafe = true;
}


text:
"""
Created on Tue May 12 13:48:12 2015

@author: pick
"""
import odml
import datetime

def create_2samerows_test_odml():
    """
    creates an odml-document in which there is a property with two same values
    to create a table with two rows that are the same
    """

    doc = odml.Document()
    doc.append(odml.Section(name='section1'))
    doc.append(odml.Section(name='section2'))

    parent = doc['section1']
    parent.append(odml.Property(name='property1', value=[1, 2, 2]))

    parent = doc['section2']
    parent.append(odml.Property(name='property1', value=2))

    return doc

def create_showall_test_odml():
    """
    creates a test-odml-document specifically to test the 'showall'-attributes
    (showall_sections, showall_properties, showall_value_information) to test
    if the right cells are left free
    """
    doc = odml.Document()

    doc.append(odml.Section(name='section1', definition='sec1'))
    doc.append(odml.Section(name='section2', definition='sec2'))
    doc.append(odml.Section(name='section3', definition='sec3'))

    parent = doc['section1']
    parent.append(odml.Property(name='property1', definition='prop1', value=
                                [odml.Value(data='value1',
                                            dtype=odml.DType.string,
                                            unit='g',
                                            uncertainty=1),
                                 odml.Value(data='value2',
                                            dtype=odml.DType.string,
                                            unit='g',
                                            uncertainty=1),
                                 odml.Value(data='value3',
                                            dtype=odml.DType.text,
                                            unit='g',
                                            uncertainty=1)]))

    parent.append(odml.Property(name='property2', definition='prop2', value=
                  odml.Value(data='value1',
                             dtype=odml.DType.text,
                             unit='g',
                             uncertainty=1)))
    parent.append(odml.Property(name='property3', definition='prop3', value=
                  odml.Value(data='value1',
                             dtype=odml.DType.text,
                             unit='g',
                             uncertainty=1)))

    parent = doc['section2']
    parent.append(odml.Property(name='property1', definition='prop1', value=
                  odml.Value(data='value1',
                             dtype=odml.DType.string,
                             unit='g',
                             uncertainty=1)))

    parent = doc['section3']
    parent.append(odml.Property(name='property1', definition='prop1', value=
                  [odml.Value(data='value1',
                              dtype=odml.DType.string,
                              unit='g',
                              uncertainty=1),
                   odml.Value(data='value2',
                              dtype=odml.DType.string,
                              unit='g',
                              uncertainty=2)]))

    return doc

def create_small_test_odml():
    """
    creates a small odml-document with only one section, property and value
    """

    doc = odml.Document()

    doc.append(odml.Section(name='section1'))

    parent = doc['section1']

    parent.append(odml.Property(name='property1',
                                value=odml.Value(data='bla',
                                                 dtype=odml.DType.text)))

    return doc

def create_datatype_test_odml():
    """
    create an odml-document using every odml-datatype at least once
    """

    # data that will be written in the odml-document
    int_values = [odml.Value(data=-10,
                             dtype=odml.DType.int,
                             definition='a negative test int'),
                  odml.Value(data=0,
                             dtype=odml.DType.int,
                             definition='test int null'),
                  odml.Value(data=10,
                             dtype=odml.DType.int,
                             definition='a positive test int')]

    float_values = [odml.Value(data=-1.234,
                               dtype=odml.DType.float,
                               definition='a negative test float'),
                    odml.Value(data=0.0,
                               dtype=odml.DType.float,
                               definition='test float null'),
                    odml.Value(data=1.234,
                               dtype=odml.DType.float,
                               definition='a positive test float')]

    bool_values = ['true', 'false', 'True', 'False', 't', 'f', 'T', 'F', 1, 0]

    text_value = "this is a text. It is longer than a string and contains " +\
                 "punctuation marks!"
    datetime_value = datetime.datetime(2014, 12, 11, 15, 02, 00)
    date_value = datetime.date(2014, 12, 11)
    time_value = datetime.time(15, 02, 00)

    # create a new odml document
    doc = odml.Document(version='0.1')

    # create sections
    doc.append(odml.Section(name='numbers'))
    doc.append(odml.Section(name='texts'))
    doc.append(odml.Section(name='other'))

    # add subsections and properties
    parent = doc['numbers']

    parent.append(odml.Property(name='Integer',
                                value=int_values,
                                definition='contains different int-values'))

    parent.append(odml.Property(name='Float',
                                value=float_values,
                                definition='contains different float-values'))

    parent = doc['texts']

    parent.append(odml.Section(name='datetime'))
    parent.append(odml.Section(name='string-like'))

    parent = doc['texts']['datetime']
    parent.append(odml.Property(name='Datetime',
                                value=odml.Value(data=datetime_value,
                                                 dtype=odml.DType.datetime)))
    parent.append(odml.Property(name='Date',
                                value=odml.Value(data=date_value,
                                                 dtype=odml.DType.date)))

    parent.append(odml.Property(name='Time',
                                value=odml.Value(data=time_value,
                                                 dtype=odml.DType.time)))

    parent = doc['texts']['string-like']

    parent.append(odml.Property(name='String',
                                value=odml.Value(data='this is a string',
                                                 dtype=odml.DType.string)))
    parent.append(odml.Property(name='Text',
                                value=odml.Value(data=text_value,
                                                 dtype=odml.DType.text)))

    parent.append(odml.Property(name='Person',
                                value=odml.Value(data='Jana Pick',
                                                 dtype=odml.DType.person)))

    parent = doc['other']

    parent.append(odml.Property(name='Boolean',
                                value=[odml.Value(data=data,
                                                  dtype=odml.DType.boolean)
                                       for data in bool_values]))
    return doc

def create_compare_test(sections=3, properties=3):
    """
    """

    doc = odml.Document()

    for i in range(sections):
        doc.append(odml.Section(name='Section' + str(i+1)))
        parent = doc['Section' + str(i+1)]
        if(i != 2):
            for j in range(properties):
                parent.append(odml.Property(name='Property' + str(j+1), value= i+j))
        else:
            for j in range(properties-2):
                parent.append(odml.Property(name='Property' + str(j+1), value= i+j))
            parent.append(odml.Property(name='Property' + str(properties), value= i+properties-1))

    doc.append(odml.Section(name='One more Section'))
    parent = doc['One more Section']
    parent.append(odml.Property(name='Property2', value=11))

    return doc


text:
namespace ouzel
{
    std::unique_ptr<Application> main(const std::vector<std::string>& args);

    const std::string SHADER_TEXTURE = "shaderTexture";
    const std::string SHADER_COLOR = "shaderColor";

    const std::string BLEND_NO_BLEND = "blendNoBlend";
    const std::string BLEND_ADD = "blendAdd";
    const std::string BLEND_MULTIPLY = "blendMultiply";
    const std::string BLEND_ALPHA = "blendAlpha";
    const std::string BLEND_SCREEN = "blendScreen";

    const std::string TEXTURE_WHITE_PIXEL = "textureWhitePixel";

    class Engine
    {
    public:
        Engine();
        virtual ~Engine();

        Engine(const Engine&) = delete;
        Engine& operator=(const Engine&) = delete;

        Engine(Engine&&) = delete;
        Engine& operator=(Engine&&) = delete;

        void init();

        inline const std::vector<std::string>& getArgs() const { return args; }

        inline Log log(Log::Level level = Log::Level::INFO) const { return logger.log(level); }
        inline Logger& getLogger() { return logger; }

        inline storage::FileSystem& getFileSystem() { return fileSystem; }
        inline EventDispatcher& getEventDispatcher() { return eventDispatcher; }
        inline assets::Cache& getCache() { return cache; }
        inline Window* getWindow() { return window.get(); }
        inline graphics::Renderer* getRenderer() const { return renderer.get(); }
        inline audio::Audio* getAudio() const { return audio.get(); }
        inline scene::SceneManager& getSceneManager() { return sceneManager; }
        inline input::InputManager* getInputManager() const { return inputManager.get(); }
        inline Localization& getLocalization() { return localization; }
        inline network::Network& getNetwork() { return network; }

        inline const ini::Data& getDefaultSettings() const { return defaultSettings; }
        inline const ini::Data& getUserSettings() const { return userSettings; }

        void start();
        void pause();
        void resume();
        void exit();

        inline bool isPaused() const { return paused; }
        inline bool isActive() const { return active; }

        void update();

        void executeOnMainThread(const std::function<void()>& func);

        virtual void openURL(const std::string& url);

        virtual void setScreenSaverEnabled(bool newScreenSaverEnabled);
        inline bool isScreenSaverEnabled() const { return screenSaverEnabled; }

        inline bool isOneUpdatePerFrame() const { return oneUpdatePerFrame; }
        inline void setOneUpdatePerFrame(bool value) { oneUpdatePerFrame = value; }

    protected:
        class Command final
        {
        public:
            enum class Type
            {
                EXECUTE,
                OPEN_URL,
                SET_SCREENSAVER_ENABLED
            };

            std::function<void()> func;
            std::string url;
            bool enabled = false;
        };

        virtual void main();
        virtual void runOnMainThread(const std::function<void()>& func) = 0;

        Logger logger;
        storage::FileSystem fileSystem;
        EventDispatcher eventDispatcher;
        std::unique_ptr<Window> window;
        std::unique_ptr<graphics::Renderer> renderer;
        std::unique_ptr<audio::Audio> audio;
        std::unique_ptr<input::InputManager> inputManager;
        Localization localization;
        assets::Cache cache;
        assets::Bundle assetBundle;
        scene::SceneManager sceneManager;
        network::Network network;

        ini::Data defaultSettings;
        ini::Data userSettings;

#if !defined(__EMSCRIPTEN__)
        std::thread updateThread;
        std::mutex updateMutex;
        std::condition_variable updateCondition;
#endif
        std::chrono::steady_clock::time_point previousUpdateTime;

        std::atomic_bool active{false};
        std::atomic_bool paused{false};
        std::atomic_bool oneUpdatePerFrame{false};

        std::atomic_bool screenSaverEnabled{true};
        std::vector<std::string> args;
    };

    extern Engine* engine;
}

#endif // OUZEL_CORE_ENGINE_HPP


text:
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

module SPQR

end


text:
package org.elasticsearch.mapping;

import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.*;

import org.elasticsearch.annotation.*;
import org.elasticsearch.annotation.query.*;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.mapping.parser.*;
import org.elasticsearch.util.MapUtil;
import org.springframework.util.ClassUtils;

/**
 * Process fields in a class to fill-in the properties entry in the class definition map.
 *
 * @author luc boutier
 */
public class FieldsMappingBuilder {
    private static final ESLogger LOGGER = Loggers.getLogger(MappingBuilder.class);

    /**
     * Parse fields from the given class to add properties mapping.
     *
     * @param clazz The class for which to parse fields.
     * @param classDefinitionMap The map that contains the class definition (a "properties" entry will be added with field mapping content).
     * @param facetFields A list that contains all the field facet mapping.
     * @param filteredFields A list that contains all the field filters mapping.
     * @param fetchContexts A list that contains all the fetch contexts mapping.
     * @param pathPrefix A prefix which is a path (null for root object, and matching the field names for nested objects).
     * @throws IntrospectionException In case we fail to use reflexion on the given class.
     */
    @SuppressWarnings("unchecked")
    public void parseFieldMappings(Class<?> clazz, Map<String, Object> classDefinitionMap, List<IFacetBuilderHelper> facetFields,
            List<IFilterBuilderHelper> filteredFields, Map<String, SourceFetchContext> fetchContexts, String pathPrefix) throws IntrospectionException {
        if (clazz.getSuperclass() != null && clazz.getSuperclass() != Object.class) {
            parseFieldMappings(clazz.getSuperclass(), classDefinitionMap, facetFields, filteredFields, fetchContexts, pathPrefix);
        }

        List<Indexable> indexables = getIndexables(clazz);

        Map<String, Object> propertiesDefinitionMap = (Map<String, Object>) classDefinitionMap.get("properties");
        if (propertiesDefinitionMap == null) {
            propertiesDefinitionMap = new HashMap<String, Object>();
            classDefinitionMap.put("properties", propertiesDefinitionMap);
        }

        for (Indexable indexable : indexables) {
            parseFieldMappings(clazz, classDefinitionMap, facetFields, filteredFields, fetchContexts, propertiesDefinitionMap, pathPrefix, indexable);
        }
    }

    private void parseFieldMappings(Class<?> clazz, Map<String, Object> classDefinitionMap, List<IFacetBuilderHelper> facetFields,
            List<IFilterBuilderHelper> filteredFields, Map<String, SourceFetchContext> fetchContexts, Map<String, Object> propertiesDefinitionMap,
            String pathPrefix, Indexable indexable) {
        String esFieldName = pathPrefix + indexable.getName();

        if (pathPrefix == null || pathPrefix.isEmpty()) {
            // Id, routing and boost are valid only for root object.
            processIdAnnotation(classDefinitionMap, esFieldName, indexable);
            processRoutingAnnotation(classDefinitionMap, esFieldName, indexable);
            processBoostAnnotation(classDefinitionMap, esFieldName, indexable);
            // Timestamp field annotation
            processTimeStampAnnotation(classDefinitionMap, esFieldName, indexable);
        }

        processFetchContextAnnotation(fetchContexts, esFieldName, indexable);
        processFilterAnnotation(filteredFields, esFieldName, indexable);
        processFacetAnnotation(facetFields, filteredFields, esFieldName, indexable);

        // process the fields
        if (ClassUtils.isPrimitiveOrWrapper(indexable.getType()) || indexable.getType() == String.class) {
            processStringOrPrimitive(clazz, propertiesDefinitionMap, pathPrefix, indexable);
        } else {
            Class<?> arrayType = indexable.getComponentType();
            // mapping of a complex field
            if (arrayType != null) {
                // process the array type.
                if (ClassUtils.isPrimitiveOrWrapper(arrayType) || arrayType == String.class) {
                    processStringOrPrimitive(clazz, propertiesDefinitionMap, pathPrefix, indexable);
                } else if (arrayType.isEnum()) {
                    // if this is an enum and there is a String
                    StringField annotation = indexable.getAnnotation(StringField.class);
                    if (annotation != null) {
                        processStringOrPrimitive(clazz, propertiesDefinitionMap, pathPrefix, indexable);
                    }
                } else {
                    processComplexType(clazz, propertiesDefinitionMap, pathPrefix, indexable, filteredFields, facetFields);
                }
            } else {
                // process the type
                processComplexType(clazz, propertiesDefinitionMap, pathPrefix, indexable, filteredFields, facetFields);
            }
        }
    }

    @SuppressWarnings("unchecked")
    private void processIdAnnotation(Map<String, Object> classDefinitionMap, String esFieldName, Indexable indexable) {
        Id id = indexable.getAnnotation(Id.class);
        if (id != null) {
            if (classDefinitionMap.containsKey("_id")) {
                LOGGER.warn("An Id annotation is defined on field <" + esFieldName + "> of <" + indexable.getDeclaringClassName()
                        + "> but an id has already be defined for <" + ((Map<String, Object>) classDefinitionMap.get("_id")).get("path") + ">");
            } else {
                classDefinitionMap.put("_id", MapUtil.getMap(new String[] { "path", "index", "store" }, new Object[] { esFieldName, id.index(), id.store() }));
            }
        }
    }

    @SuppressWarnings("unchecked")
    private void processRoutingAnnotation(Map<String, Object> classDefinitionMap, String esFieldName, Indexable indexable) {
        Routing routing = indexable.getAnnotation(Routing.class);
        if (routing != null) {
            if (classDefinitionMap.containsKey("_routing")) {
                LOGGER.warn("A Routing annotation is defined on field <" + esFieldName + "> of <" + indexable.getDeclaringClassName()
                        + "> but a routing has already be defined for <" + ((Map<String, Object>) classDefinitionMap.get("_routing")).get("path") + ">");
            } else {
                Map<String, Object> routingDef = new HashMap<String, Object>();
                routingDef.put("path", esFieldName);
                routingDef.put("required", routing.required());
                classDefinitionMap.put("_routing", routingDef);
            }
        }
    }

    @SuppressWarnings("unchecked")
    private void processBoostAnnotation(Map<String, Object> classDefinitionMap, String esFieldName, Indexable indexable) {
        Boost boost = indexable.getAnnotation(Boost.class);
        if (boost != null) {
            if (classDefinitionMap.containsKey("_boost")) {
                LOGGER.warn("A Boost annotation is defined on field <" + esFieldName + "> of <" + indexable.getDeclaringClassName()
                        + "> but a boost has already be defined for <" + ((Map<String, Object>) classDefinitionMap.get("_boost")).get("name") + ">");
            } else {
                Map<String, Object> boostDef = new HashMap<String, Object>();
                boostDef.put("name", esFieldName);
                boostDef.put("null_value", boost.nullValue());
                classDefinitionMap.put("_boost", boostDef);
            }
        }
    }

    @SuppressWarnings("unchecked")
    private void processTimeStampAnnotation(Map<String, Object> classDefinitionMap, String esFieldName, Indexable indexable) {
        TimeStamp timeStamp = indexable.getAnnotation(TimeStamp.class);
        if (timeStamp != null) {
            if (classDefinitionMap.containsKey("_timestamp")) {
                LOGGER.warn("A TimeStamp annotation is defined on field <" + esFieldName + "> of <" + indexable.getDeclaringClassName()
                        + "> but a boost has already be defined for <" + ((Map<String, Object>) classDefinitionMap.get("_timestamp")).get("name") + ">");
            } else {
                Map<String, Object> timeStampDefinition = new HashMap<String, Object>();
                timeStampDefinition.put("enabled", true);
                timeStampDefinition.put("path", indexable.getName());

                if (!timeStamp.format().isEmpty()) {
                    timeStampDefinition.put("format", timeStamp.format());
                }

                classDefinitionMap.put("_timestamp", timeStampDefinition);
            }
        }
    }

    private void processFetchContextAnnotation(Map<String, SourceFetchContext> fetchContexts, String esFieldName, Indexable indexable) {
        FetchContext fetchContext = indexable.getAnnotation(FetchContext.class);
        if (fetchContext == null) {
            return;
        }
        for (int i = 0; i < fetchContext.contexts().length; i++) {
            String context = fetchContext.contexts()[i];
            boolean isInclude = fetchContext.include()[i];

            SourceFetchContext sourceFetchContext = fetchContexts.get(context);
            if (sourceFetchContext == null) {
                sourceFetchContext = new SourceFetchContext();
                fetchContexts.put(context, sourceFetchContext);
            }
            if (isInclude) {
                sourceFetchContext.getIncludes().add(esFieldName);
            } else {
                sourceFetchContext.getExcludes().add(esFieldName);
            }
        }
    }

    private void processFilterAnnotation(List<IFilterBuilderHelper> classFilters, String esFieldName, Indexable indexable) {
        TermFilter termFilter = indexable.getAnnotation(TermFilter.class);
        if (termFilter != null) {
            String[] paths = termFilter.paths();
            for (String path : paths) {
                path = path.trim();
                boolean isAnalyzed = isAnalyzed(indexable);
                String nestedPath = indexable.getAnnotation(NestedObject.class) == null ? null : esFieldName;
                if (nestedPath == null) {
                    int nestedIndicator = esFieldName.lastIndexOf(".");
                    if (nestedIndicator > 0) {
                        nestedPath = esFieldName.substring(0, nestedIndicator);
                        esFieldName = esFieldName.substring(nestedIndicator + 1, esFieldName.length());
                    }
                }
                String filterPath = getFilterPath(path, esFieldName);

                classFilters.add(new TermsFilterBuilderHelper(isAnalyzed, nestedPath, filterPath));
            }
            return;
        }
        RangeFilter rangeFilter = indexable.getAnnotation(RangeFilter.class);
        if (rangeFilter != null) {
            IFilterBuilderHelper facetBuilderHelper = new RangeFilterBuilderHelper(null, esFieldName, rangeFilter);
            classFilters.add(facetBuilderHelper);
        }
    }

    private void processFacetAnnotation(List<IFacetBuilderHelper> classFacets, List<IFilterBuilderHelper> classFilters, String esFieldName, Indexable indexable) {
        TermsFacet termsFacet = indexable.getAnnotation(TermsFacet.class);
        if (termsFacet != null) {
            String[] paths = termsFacet.paths();
            for (String path : paths) {
                path = path.trim();
                boolean isAnalyzed = isAnalyzed(indexable);
                String nestedPath = indexable.getAnnotation(NestedObject.class) == null ? null : esFieldName;
                String filterPath = getFilterPath(path, esFieldName);

                IFacetBuilderHelper facetBuilderHelper = new TermsFacetBuilderHelper(isAnalyzed, nestedPath, filterPath, termsFacet);
                classFacets.add(facetBuilderHelper);
                if (classFilters.contains(facetBuilderHelper)) {
                    classFilters.remove(facetBuilderHelper);
                    LOGGER.warn("Field <" + esFieldName + "> already had a filter that will be replaced by the defined facet. Only a single one is allowed.");
                }
                classFilters.add(facetBuilderHelper);
            }
            return;
        }
        RangeFacet rangeFacet = indexable.getAnnotation(RangeFacet.class);
        if (rangeFacet != null) {
            IFacetBuilderHelper facetBuilderHelper = new RangeFacetBuilderHelper(null, esFieldName, rangeFacet);
            classFacets.add(facetBuilderHelper);
            if (classFilters.contains(facetBuilderHelper)) {
                classFilters.remove(facetBuilderHelper);
                LOGGER.warn("Field <" + esFieldName + "> already had a filter that will be replaced by the defined facet. Only a single one is allowed.");
            }
            classFilters.add(facetBuilderHelper);
        }
    }

    private String getFilterPath(String path, String esFieldName) {
        return path.isEmpty() ? esFieldName : esFieldName + "." + path;
    }

    private boolean isAnalyzed(Indexable indexable) {
        boolean isAnalysed = true;
        StringField stringFieldAnnotation = indexable.getAnnotation(StringField.class);
        if (stringFieldAnnotation != null && !IndexType.analyzed.equals(stringFieldAnnotation.indexType())) {
            isAnalysed = false;
        }
        return isAnalysed;
    }

    private void processStringOrPrimitive(Class<?> clazz, Map<String, Object> propertiesDefinitionMap, String pathPrefix, Indexable indexable) {
        processFieldAnnotation(IndexName.class, new IndexNameAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
        processFieldAnnotation(NullValue.class, new NullValueAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);

        // String field annotations.
        processFieldAnnotation(StringField.class, new StringFieldAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
        processFieldAnnotation(Analyser.class, new AnalyserAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
        processFieldAnnotation(IndexAnalyser.class, new IndexAnalyserAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
        processFieldAnnotation(SearchAnalyser.class, new SearchAnalyserAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);

        // Numeric field annotation
        processFieldAnnotation(NumberField.class, new NumberFieldAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);

        // Date field annotation
        processFieldAnnotation(DateField.class, new DateFieldAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
        processFieldAnnotation(DateFormat.class, new DateFormatAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);

        // Boolean field annotation
        processFieldAnnotation(BooleanField.class, new BooleanFieldAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
        // TODO binary type mapping
    }

    private void processComplexType(Class<?> clazz, Map<String, Object> propertiesDefinitionMap, String pathPrefix, Indexable indexable,
            List<IFilterBuilderHelper> filters, List<IFacetBuilderHelper> facets) {
        NestedObjectFieldAnnotationParser parser = new NestedObjectFieldAnnotationParser(this, filters, facets);
        processFieldAnnotation(NestedObject.class, parser, propertiesDefinitionMap, pathPrefix, indexable);

    }

    @SuppressWarnings("unchecked")
    private <T extends Annotation> void processFieldAnnotation(Class<T> annotationClass, IPropertyAnnotationParser<T> propertyAnnotationParser,
            Map<String, Object> propertiesDefinitionMap, String pathPrefix, Indexable indexable) {
        T annotation = indexable.getAnnotation(annotationClass);
        if (annotation != null) {
            Map<String, Object> fieldDefinition = (Map<String, Object>) propertiesDefinitionMap.get(indexable.getName());
            if (fieldDefinition == null) {
                fieldDefinition = new HashMap<String, Object>();
                propertiesDefinitionMap.put(indexable.getName(), fieldDefinition);
            }
            propertyAnnotationParser.parseAnnotation(annotation, fieldDefinition, pathPrefix, indexable);
        }
    }

    /**
     * Get all indexable member of a class (field or property)
     *
     * @param clazz class to check
     * @return list of all indexable members
     * @throws IntrospectionException
     */
    private List<Indexable> getIndexables(Class<?> clazz) throws IntrospectionException {
        List<Indexable> indexables = new ArrayList<Indexable>();
        Map<String, PropertyDescriptor> pdMap = getValidPropertyDescriptorMap(clazz);
        Map<String, Field> fdMap = new HashMap<String, Field>();

        Field[] fdArr = clazz.getDeclaredFields();
        for (Field field : fdArr) {
            // Check not transient field
            if (Modifier.isTransient(field.getModifiers())) {
                continue;
            }

            String pdName = field.getName();
            if (field.getType().equals(Boolean.TYPE) && field.getName().startsWith("is")) {
                pdName = field.getName().substring(2, 3).toLowerCase() + field.getName().substring(3, field.getName().length());
            }
            PropertyDescriptor propertyDescriptor = pdMap.get(pdName);

            if (propertyDescriptor == null || propertyDescriptor.getReadMethod() == null || propertyDescriptor.getWriteMethod() == null) {
                LOGGER.debug("Field <" + field.getName() + "> of class <" + clazz.getName() + "> has no proper setter/getter and won't be persisted.");
            } else {
                fdMap.put(pdName, field);
            }
        }
        Set<String> allIndexablesName = new HashSet<String>();
        allIndexablesName.addAll(pdMap.keySet());
        allIndexablesName.addAll(fdMap.keySet());
        for (String name : allIndexablesName) {
            indexables.add(new Indexable(fdMap.get(name), pdMap.get(name)));
        }
        return indexables;
    }

    private Map<String, PropertyDescriptor> getValidPropertyDescriptorMap(Class<?> clazz) throws IntrospectionException {
        Map<String, PropertyDescriptor> pdMap = new HashMap<String, PropertyDescriptor>();
        PropertyDescriptor[] pdArr = Introspector.getBeanInfo(clazz, clazz.getSuperclass()).getPropertyDescriptors();

        if (pdArr == null) {
            return pdMap;
        }

        for (PropertyDescriptor pd : pdArr) {
            // Check valid getter setter
            if (pd.getReadMethod() != null && pd.getWriteMethod() != null) {
                pdMap.put(pd.getName(), pd);
            }
        }

        return pdMap;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
  <!--
    Ehcache artifacts are sometimes incorrectly identified as being Gradle artifacts (because they are built using gradle).
    They are then flagged as being vulnerable to https://nvd.nist.gov/vuln/detail/CVE-2019-11065.
  -->
  <suppress>
    <notes><![CDATA[file name: Ehcache modules are not Gradle!]]></notes>
    <packageUrl regex="true">^pkg:maven/org\.ehcache.*@.*$</packageUrl>
    <cve>CVE-2019-11065</cve>
  </suppress>
  <suppress>
    <notes><![CDATA[file name: Ehcache modules are not Gradle!]]></notes>
    <packageUrl regex="true">^pkg:maven/org\.ehcache.*@.*$</packageUrl>
    <cve>CVE-2019-15052</cve>
  </suppress>
  <suppress>
    <notes><![CDATA[file name: Ehcache modules are not Gradle!]]></notes>
    <packageUrl regex="true">^pkg:maven/org\.ehcache.*@.*$</packageUrl>
    <cve>CVE-2019-16370</cve>
  </suppress>
  <suppress>
    <notes><![CDATA[file name: TC Tripwire is unrelated to the other Tripwire]]></notes>
    <packageUrl regex="true">^pkg:maven/org\.terracotta/tc\-tripwire\-plugin@.*$</packageUrl>
    <cpe>cpe:/a:tripwire:tripwire</cpe>
  </suppress>
</suppressions>


text:
const addClass = (el, className) => el.classList.add(className);

export default addClass;


text:
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 15.2.3.3-3-15
description: >
    Object.getOwnPropertyDescriptor applied to a Function object which
    implements its own property get method
---*/

        var obj = function (a, b) {
            return a + b;
        };
        obj[1] = "ownProperty";

        var desc = Object.getOwnPropertyDescriptor(obj, "1");

assert.sameValue(desc.value, "ownProperty", 'desc.value');


text:
package jj.css;

import java.lang.annotation.*;

/**
 * @author Jason Miller
 */
@Documented
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@interface LessLogger {
	String NAME = "less";
}


text:
using Google.Apis.RealTimeBidding.v1;
using Google.Apis.RealTimeBidding.v1.Data;
using Mono.Options;

using System;
using System.Collections.Generic;

namespace Google.Apis.RealTimeBidding.Examples.v1.Bidders.Creatives
{
    /// <summary>
    /// Enables monitoring of changes in creative statuses for a given bidder.
    ///
    /// Watched creatives will have changes to their status posted to Google Cloud Pub/Sub. For
    /// more details on Google Cloud Pub/Sub, see: https://cloud.google.com/pubsub/docs
    ///
    /// For an example of pulling creative status changes from a Google Cloud Pub/Sub subscription,
    /// see PullWatchedCreativesSubscription.cs.
    /// </summary>
    public class WatchCreatives : ExampleBase
    {
        private RealTimeBiddingService rtbService;

        /// <summary>
        /// Constructor.
        /// </summary>
        public WatchCreatives()
        {
            rtbService = Utilities.GetRealTimeBiddingService();
        }

        /// <summary>
        /// Returns a description about the code example.
        /// </summary>
        public override string Description
        {
            get => "Enables watching creative status changes for the given bidder account.";
        }

        /// <summary>
        /// Parse specified arguments.
        /// </summary>
        protected override Dictionary<string, object> ParseArguments(List<string> exampleArgs) {
            string[] requiredOptions = new string[] {"account_id"};
            bool showHelp = false;

            string accountId = null;

            OptionSet options = new OptionSet {
                "Patches the specified creative.",
                {
                    "h|help",
                    "Show help message and exit.",
                    h => showHelp = h != null
                },
                {
                    "a|account_id=",
                    ("[Required] The resource ID of the buyers resource under which the " +
                     "creatives were created. This will be used to construct the name used as " +
                     "a path parameter for the creatives.get request."),
                    a => accountId = a
                }
            };

            List<string> extras = options.Parse(exampleArgs);
            var parsedArgs = new Dictionary<string, object>();

            // Show help message.
            if(showHelp == true)
            {
                options.WriteOptionDescriptions(Console.Out);
                Environment.Exit(0);
            }
            // Set arguments.
            parsedArgs["account_id"] = accountId;
            // Validate that options were set correctly.
            Utilities.ValidateOptions(options, parsedArgs, requiredOptions, extras);

            return parsedArgs;
        }

        /// <summary>
        /// Run the example.
        /// </summary>
        /// <param name="parsedArgs">Parsed arguments for the example.</param>
        protected override void Run(Dictionary<string, object> parsedArgs)
        {
            var accountId = (string) parsedArgs["account_id"];
            var parentBidderName = $"bidders/{accountId}";

            WatchCreativesRequest body = new WatchCreativesRequest();

            BiddersResource.CreativesResource.WatchRequest request =
                rtbService.Bidders.Creatives.Watch(body, parentBidderName);

            WatchCreativesResponse response = null;

            Console.WriteLine("Watching creative status changes for bidder account with name: {0}",
                              parentBidderName);

            try
            {
                response = request.Execute();
            }
            catch (System.Exception exception)
            {
                throw new ApplicationException(
                    $"Real-time Bidding API returned error response:\n{exception.Message}");
            }

            Console.WriteLine("- Topic: {0}", response.Topic);
            Console.WriteLine("- Subscription: {0}", response.Subscription);
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>Qt 4.8: QLinkedList Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />

  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />

      Home

    Qt Reference Documentation

Qt HOME

DEV

          DOC

BLOG

Qt 4.8

ALL VERSIONS

API Lookup

Class index

Function index

Modules

Namespaces

Global Declarations

QML elements

Qt Topics

Programming with Qt

Device UIs & Qt Quick

UI Design with Qt

Supported Platforms

Qt and Key Technologies

How-To's and Best Practices

Examples

Examples

Tutorials

Demos

QML Examples

          Search index:

          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />

 Close

All | API | Articles | Examples

 results:

            </fieldset>
          </form>

            API Lookup

Class index

Function index

Modules

Namespaces

Global Declarations

QML elements

            Qt Topics

Programming with Qt

Device UIs & Qt Quick

UI Design with Qt

Supported Platforms

Qt and Key Technologies

How-To's and Best Practices

            Examples

Examples

Tutorials

Demos

QML Examples

Home

Modules

QtCore

QLinkedList

A

A

A

                Print

Contents

Public Types

Public Functions

Static Public Members

Related Non-Members

Detailed Description

QLinkedList Class Reference

The QLinkedList class is a template class that provides linked lists. More...

 #include <QLinkedList>

Inherited by: Q3ValueList.

Note: All functions in this class are reentrant.

List of all members, including inherited members

Qt 3 support members

Public Types

 class 	const_iterator

 class 	iterator

 typedef 	ConstIterator

 typedef 	Iterator

 typedef 	const_pointer

 typedef 	const_reference

 typedef 	difference_type

 typedef 	pointer

 typedef 	reference

 typedef 	size_type

 typedef 	value_type

Public Functions

 	QLinkedList ()

 	QLinkedList ( const QLinkedList<T> & other )

 	~QLinkedList ()

 void 	append ( const T & value )

 T & 	back ()

 const T & 	back () const

 iterator 	begin ()

 const_iterator 	begin () const

 void 	clear ()

 const_iterator 	constBegin () const

 const_iterator 	constEnd () const

 bool 	contains ( const T & value ) const

 int 	count ( const T & value ) const

 int 	count () const

 bool 	empty () const

 iterator 	end ()

 const_iterator 	end () const

 bool 	endsWith ( const T & value ) const

 iterator 	erase ( iterator pos )

 iterator 	erase ( iterator begin, iterator end )

 T & 	first ()

 const T & 	first () const

 T & 	front ()

 const T & 	front () const

 iterator 	insert ( iterator before, const T & value )

 bool 	isEmpty () const

 T & 	last ()

 const T & 	last () const

 void 	pop_back ()

 void 	pop_front ()

 void 	prepend ( const T & value )

 void 	push_back ( const T & value )

 void 	push_front ( const T & value )

 int 	removeAll ( const T & value )

 void 	removeFirst ()

 void 	removeLast ()

 bool 	removeOne ( const T & value )

 int 	size () const

 bool 	startsWith ( const T & value ) const

 void 	swap ( QLinkedList<T> & other )

 T 	takeFirst ()

 T 	takeLast ()

 std::list<T> 	toStdList () const

 bool 	operator!= ( const QLinkedList<T> & other ) const

 QLinkedList<T> 	operator+ ( const QLinkedList<T> & other ) const

 QLinkedList<T> & 	operator+= ( const QLinkedList<T> & other )

 QLinkedList<T> & 	operator+= ( const T & value )

 QLinkedList<T> & 	operator<< ( const QLinkedList<T> & other )

 QLinkedList<T> & 	operator<< ( const T & value )

 QLinkedList<T> & 	operator= ( const QLinkedList<T> & other )

 bool 	operator== ( const QLinkedList<T> & other ) const

Static Public Members

 QLinkedList<T> 	fromStdList ( const std::list<T> & list )

Related Non-Members

 QDataStream & 	operator<< ( QDataStream & out, const QLinkedList<T> & list )

 QDataStream & 	operator>> ( QDataStream & in, QLinkedList<T> & list )

Detailed Description

The QLinkedList class is a template class that provides linked lists.

QLinkedList<T> is one of Qt's generic container classes. It stores a list of values and provides iterator-based access as well as constant time insertions and removals.

QList<T>, QLinkedList<T>, and QVector<T> provide similar functionality. Here's an overview:

For most purposes, QList is the right class to use. Its index-based API is more convenient than QLinkedList's iterator-based API, and it is usually faster than QVector because of the way it stores its items in memory (see Algorithmic Complexity for details). It also expands to less code in your executable.

If you need a real linked list, with guarantees of constant time insertions in the middle of the list and iterators to items rather than indexes, use QLinkedList.

If you want the items to occupy adjacent memory positions, use QVector.

Here's an example of a QLinkedList that stores integers and a QLinkedList that stores QTime values:

 QLinkedList<int> integerList;
 QLinkedList<QTime> timeList;

QLinkedList stores a list of items. The default constructor creates an empty list. To insert items into the list, you can use operator<<():

 QLinkedList<QString> list;
 list << "one" << "two" << "three";
 // list: ["one", "two", "three"]

If you want to get the first or last item in a linked list, use first() or last(). If you want to remove an item from either end of the list, use removeFirst() or removeLast(). If you want to remove all occurrences of a given value in the list, use removeAll().

A common requirement is to remove the first or last item in the list and do something with it. For this, QLinkedList provides takeFirst() and takeLast(). Here's a loop that removes the items from a list one at a time and calls <tt>delete</tt> on them:

 QLinkedList<QWidget *> list;
 ...
 while (!list.isEmpty())
     delete list.takeFirst();

QLinkedList's value type must be an assignable data type. This covers most data types that are commonly used, but the compiler won't let you, for example, store a QWidget as a value; instead, store a QWidget *. A few functions have additional requirements; for example, contains() and removeAll() expect the value type to support <tt>operator==()</tt>. These requirements are documented on a per-function basis.

If you want to insert, modify, or remove items in the middle of the list, you must use an iterator. QLinkedList provides both Java-style iterators (QLinkedListIterator and QMutableLinkedListIterator) and STL-style iterators (QLinkedList::const_iterator and QLinkedList::iterator). See the documentation for these classes for details.

See also QLinkedListIterator, QMutableLinkedListIterator, QList, and QVector.

Member Type Documentation

typedef QLinkedList::ConstIterator

Qt-style synonym for QLinkedList::const_iterator.

typedef QLinkedList::Iterator

Qt-style synonym for QLinkedList::iterator.

typedef QLinkedList::const_pointer

Typedef for const T *. Provided for STL compatibility.

typedef QLinkedList::const_reference

Typedef for const T &. Provided for STL compatibility.

typedef QLinkedList::difference_type

Typedef for ptrdiff_t. Provided for STL compatibility.

typedef QLinkedList::pointer

Typedef for T *. Provided for STL compatibility.

typedef QLinkedList::reference

Typedef for T &. Provided for STL compatibility.

typedef QLinkedList::size_type

Typedef for int. Provided for STL compatibility.

typedef QLinkedList::value_type

Typedef for T. Provided for STL compatibility.

Member Function Documentation

QLinkedList::QLinkedList ()

Constructs an empty list.

QLinkedList::QLinkedList ( const QLinkedList<T> & other )

Constructs a copy of other.

This operation occurs in constant time, because QLinkedList is implicitly shared. This makes returning a QLinkedList from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and this takes linear time.

See also operator=().

QLinkedList::~QLinkedList ()

Destroys the list. References to the values in the list, and all iterators over this list, become invalid.

void QLinkedList::append ( const T & value )

Inserts value at the end of the list.

Example:

 QLinkedList<QString> list;
 list.append("one");
 list.append("two");
 list.append("three");
 // list: ["one", "two", "three"]

This is the same as list.insert(end(), value).

See also operator<<(), prepend(), and insert().

T & QLinkedList::back ()

This function is provided for STL compatibility. It is equivalent to last().

const T & QLinkedList::back () const

This is an overloaded function.

iterator QLinkedList::begin ()

Returns an STL-style iterator pointing to the first item in the list.

See also constBegin() and end().

const_iterator QLinkedList::begin () const

This is an overloaded function.

void QLinkedList::clear ()

Removes all the items in the list.

See also removeAll().

const_iterator QLinkedList::constBegin () const

Returns a const STL-style iterator pointing to the first item in the list.

See also begin() and constEnd().

const_iterator QLinkedList::constEnd () const

Returns a const STL-style iterator pointing to the imaginary item after the last item in the list.

See also constBegin() and end().

bool QLinkedList::contains ( const T & value ) const

Returns true if the list contains an occurrence of value; otherwise returns false.

This function requires the value type to have an implementation of <tt>operator==()</tt>.

See also QLinkedListIterator::findNext() and QLinkedListIterator::findPrevious().

int QLinkedList::count ( const T & value ) const

Returns the number of occurrences of value in the list.

This function requires the value type to have an implementation of <tt>operator==()</tt>.

See also contains().

int QLinkedList::count () const

Same as size().

bool QLinkedList::empty () const

This function is provided for STL compatibility. It is equivalent to isEmpty() and returns true if the list is empty.

iterator QLinkedList::end ()

Returns an STL-style iterator pointing to the imaginary item after the last item in the list.

See also begin() and constEnd().

const_iterator QLinkedList::end () const

This is an overloaded function.

bool QLinkedList::endsWith ( const T & value ) const

Returns true if the list is not empty and its last item is equal to value; otherwise returns false.

This function was introduced in Qt 4.5.

See also isEmpty() and last().

iterator QLinkedList::erase ( iterator pos )

Removes the item pointed to by the iterator pos from the list, and returns an iterator to the next item in the list (which may be end()).

See also insert().

iterator QLinkedList::erase ( iterator begin, iterator end )

This is an overloaded function.

Removes all the items from begin up to (but not including) end.

T & QLinkedList::first ()

Returns a reference to the first item in the list. This function assumes that the list isn't empty.

See also last() and isEmpty().

const T & QLinkedList::first () const

This is an overloaded function.

QLinkedList<T> QLinkedList::fromStdList ( const std::list<T> & list )<tt> [static]</tt>

Returns a QLinkedList object with the data contained in list. The order of the elements in the QLinkedList is the same as in list.

Example:

 std::list<double> stdlist;
 list.push_back(1.2);
 list.push_back(0.5);
 list.push_back(3.14);

 QLinkedList<double> list = QLinkedList<double>::fromStdList(stdlist);

This function was introduced in Qt 4.1.

See also toStdList().

T & QLinkedList::front ()

This function is provided for STL compatibility. It is equivalent to first().

const T & QLinkedList::front () const

This is an overloaded function.

iterator QLinkedList::insert ( iterator before, const T & value )

Inserts value in front of the item pointed to by the iterator before. Returns an iterator pointing at the inserted item.

See also erase().

bool QLinkedList::isEmpty () const

Returns true if the list contains no items; otherwise returns false.

See also size().

T & QLinkedList::last ()

Returns a reference to the last item in the list. This function assumes that the list isn't empty.

See also first() and isEmpty().

const T & QLinkedList::last () const

This is an overloaded function.

void QLinkedList::pop_back ()

This function is provided for STL compatibility. It is equivalent to removeLast().

void QLinkedList::pop_front ()

This function is provided for STL compatibility. It is equivalent to removeFirst().

void QLinkedList::prepend ( const T & value )

Inserts value at the beginning of the list.

Example:

 QLinkedList<QString> list;
 list.prepend("one");
 list.prepend("two");
 list.prepend("three");
 // list: ["three", "two", "one"]

This is the same as list.insert(begin(), value).

See also append() and insert().

void QLinkedList::push_back ( const T & value )

This function is provided for STL compatibility. It is equivalent to append(value).

void QLinkedList::push_front ( const T & value )

This function is provided for STL compatibility. It is equivalent to prepend(value).

int QLinkedList::removeAll ( const T & value )

Removes all occurrences of value in the list.

Example:

 QList<QString> list;
 list << "sun" << "cloud" << "sun" << "rain";
 list.removeAll("sun");
 // list: ["cloud", "rain"]

This function requires the value type to have an implementation of <tt>operator==()</tt>.

See also insert().

void QLinkedList::removeFirst ()

Removes the first item in the list.

This is the same as erase(begin()).

See also removeLast() and erase().

void QLinkedList::removeLast ()

Removes the last item in the list.

See also removeFirst() and erase().

bool QLinkedList::removeOne ( const T & value )

Removes the first occurrences of value in the list. Returns true on success; otherwise returns false.

Example:

 QList<QString> list;
 list << "sun" << "cloud" << "sun" << "rain";
 list.removeOne("sun");
 // list: ["cloud", "sun", "rain"]

This function requires the value type to have an implementation of <tt>operator==()</tt>.

This function was introduced in Qt 4.4.

See also insert().

int QLinkedList::size () const

Returns the number of items in the list.

See also isEmpty() and count().

bool QLinkedList::startsWith ( const T & value ) const

Returns true if the list is not empty and its first item is equal to value; otherwise returns false.

This function was introduced in Qt 4.5.

See also isEmpty() and first().

void QLinkedList::swap ( QLinkedList<T> & other )

Swaps list other with this list. This operation is very fast and never fails.

This function was introduced in Qt 4.8.

T QLinkedList::takeFirst ()

Removes the first item in the list and returns it.

If you don't use the return value, removeFirst() is more efficient.

See also takeLast() and removeFirst().

T QLinkedList::takeLast ()

Removes the last item in the list and returns it.

If you don't use the return value, removeLast() is more efficient.

See also takeFirst() and removeLast().

std::list<T> QLinkedList::toStdList () const

Returns a std::list object with the data contained in this QLinkedList. Example:

 QLinkedList<double> list;
 list << 1.2 << 0.5 << 3.14;

 std::list<double> stdlist = list.toStdList();

This function was introduced in Qt 4.1.

See also fromStdList().

bool QLinkedList::operator!= ( const QLinkedList<T> & other ) const

Returns true if other is not equal to this list; otherwise returns false.

Two lists are considered equal if they contain the same values in the same order.

This function requires the value type to implement <tt>operator==()</tt>.

See also operator==().

QLinkedList<T> QLinkedList::operator+ ( const QLinkedList<T> & other ) const

Returns a list that contains all the items in this list followed by all the items in the other list.

See also operator+=().

QLinkedList<T> & QLinkedList::operator+= ( const QLinkedList<T> & other )

Appends the items of the other list to this list and returns a reference to this list.

See also operator+() and append().

QLinkedList<T> & QLinkedList::operator+= ( const T & value )

This is an overloaded function.

Appends value to the list.

QLinkedList<T> & QLinkedList::operator<< ( const QLinkedList<T> & other )

Appends the items of the other list to this list and returns a reference to this list.

See also operator+=() and append().

QLinkedList<T> & QLinkedList::operator<< ( const T & value )

This is an overloaded function.

Appends value to the list.

QLinkedList<T> & QLinkedList::operator= ( const QLinkedList<T> & other )

Assigns other to this list and returns a reference to this list.

bool QLinkedList::operator== ( const QLinkedList<T> & other ) const

Returns true if other is equal to this list; otherwise returns false.

Two lists are considered equal if they contain the same values in the same order.

This function requires the value type to implement <tt>operator==()</tt>.

See also operator!=().

Related Non-Members

QDataStream & operator<< ( QDataStream & out, const QLinkedList<T> & list )

Writes the linked list list to stream out.

This function requires the value type to implement <tt>operator<<()</tt>.

See also Format of the QDataStream operators.

QDataStream & operator>> ( QDataStream & in, QLinkedList<T> & list )

Reads a linked list from stream in into list.

This function requires the value type to implement <tt>operator>>()</tt>.

See also Format of the QDataStream operators.

      <acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.

      The documentation provided herein is licensed under the terms of the
      GNU Free Documentation
      License version 1.3 as published by the Free Software Foundation.

      Documentation sources may be obtained from
      www.qt-project.org.

      Digia, Qt and their respective logos are trademarks of Digia Plc
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. Privacy Policy


text:
<?xml version="1.0" encoding="utf-8"?>

<apidoc>
	<namespace name="SEIDS::LinkedLists">
		<class name="OutOfRangeException" version="1.0">
			<extends>::OutOfRangeException</extends>
			<implements>ExceptionInterface</implements>

			<description>

					Exception objects of this class are thrown when one calls
					the many of the methods in <class>LinkedList</class> with an
					invalid offset as an argument.

					It is only intended that users should test for this
					exception, when necessary, rather than throwing it in their
					own code.

			</description>
		</class>
	</namespace>
</apidoc>


text:
/* eslint-disable no-var */
/* eslint-disable no-console */
const chalk = require('chalk');
const chalkSuccess = chalk.green;
const chalkProcessing = chalk.blue;
const chalkWarning = chalk.yellow;
const rimraf = require('rimraf');
const childProcess = require('child_process');
const replace = require("replace");
const prompt = require("prompt");
const prompts = require('./setupPrompt');

prompt.start();

function updatePackage() {
  prompt.get(prompts, function(err, result) {
    // parse user responses
    // default values provided for fields that will cause npm to complain if left empty
    const responses = [
      {key: 'name', value: result.projectName || 'project'},
      {key: 'version', value: '0.0.1'},
      {key: 'author', value: result.author || 'Developer'},
      {key: 'license', value: result.license || 'MIT'},
      {key: 'description', value: ''},
      // simply use an empty URL here to clear the existing repo URL
      {key: 'url', value: ''}
    ];

    // update package.json with the user's values
    responses.forEach(function(res) {
      replace({
        regex: `("${res.key}"): "(.*?)"`,
        replacement: `$1: "${res.value}"`,
        paths: ['package.json'],
        recursive: false,
        silent: true
      });
    });

    // reset package.json 'keywords' field to empty state
    replace({
      regex: /"keywords": \[[\s\S]+?\]/,
      replacement: `"keywords": []`,
      paths: ['package.json'],
      recursive: false,
      silent: true
    });

    // remove setup script from package.json
    replace({
      regex: /\s*"setup":.*,/,
      replacement: "",
      paths: ['package.json'],
      recursive: false,
      silent: true
    });

    console.log(chalkProcessing('Cleaning up...'));
    rimraf('./tools/setup', function(error) {
      if (error) throw new Error(error);
      console.log(chalkSuccess('\nSetup complete!\n'));
    });
  });
}

console.log(chalkSuccess('Dependencies successfully installed.'));
console.log(chalkWarning("WARNING:  Preparing to delete local git repository..."));

// remove the original git repository
rimraf('.git', function(error) {
  if (error) throw new Error(error);
  console.log(chalkProcessing('Initializing new git repository...'));
  childProcess.exec('git init');
  updatePackage();
});


text:
using System;
using System.Linq;
using System.Windows.Forms;

namespace Linq2TwitterDemos_WindowsForms
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new TwitterForm());
        }
    }
}